In [ ]:
. ./nbs_header.ps1
. ./core.ps1
In [ ]:
{ pwsh ../apps/builder/build.ps1 } | Invoke-Block
── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ # DibParser (Polyglot) │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── #r @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan dard2.1/FSharp.Control.AsyncSeq.dll" #r @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6. 0/System.Reactive.dll" #r @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/ netstandard2.0/System.Reactive.Linq.dll" #r @"../../../../../../../.nuget/packages/argu/6.2.4/lib/netstandard2.0/Argu.dll" #r @"../../../../../../../.nuget/packages/fparsec/2.0.0-beta2/lib/netstandard2.1/FP arsec.dll" #r @"../../../../../../../.nuget/packages/fparsec/2.0.0-beta2/lib/netstandard2.1/FP arsecCS.dll" ── pwsh ──────────────────────────────────────────────────────────────────────── ls ~/.nuget/packages/argu ╭─[ 710.44ms - stdout ]────────────────────────────────────────────────────────╮ │ │ │ Directory: C:\Users\i574n\.nuget\packages\argu │ │ │ │ Mode LastWriteTime Length[ │ │ 32;1m Name │ │ ---- ------------- ------ [ │ │ 32;1m---- │ │ d---- 2023-05-17 3:38 PM 6.1.1 │ │ d---- 2024-03-12 8:22 PM 6.1.4 │ │ d---- 2024-01-29 5:12 PM 6.1.5 │ │ d---- 2024-03-12 8:20 PM 6.2.0 │ │ d---- 2024-02-23 6:50 PM 6.2.1 │ │ d---- 2024-03-12 8:15 PM 6.2.2 │ │ d---- 2024-05-14 8:20 PM 6.2.3 │ │ d---- 2024-06-06 7:37 PM 6.2.4 │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── #if !INTERACTIVE open Lib #endif ── fsharp ────────────────────────────────────────────────────────────────────── open Common open FParsec open SpiralFileSystem.Operators ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## escapeCell (test) │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test let inline escapeCell input = input |> SpiralSm.split "\n" |> Array.map (function | line when line |> SpiralSm.starts_with "\\#!" || line |> SpiralSm.starts_with "\\#r" -> System.Text.RegularExpressions.Regex.Replace (line, "^\\\\#", "#") | line -> line ) |> SpiralSm.concat "\n" ── fsharp ────────────────────────────────────────────────────────────────────── //// test $"a{nl}\\#!magic{nl}b{nl}" |> escapeCell |> _assertEqual ( $"a{nl}#!magic{nl}b{nl}" ) ╭─[ 112.78ms - stdout ]────────────────────────────────────────────────────────╮ │ "a │ │ #!magic │ │ b │ │ " │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## magicMarker │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let magicMarker : Parser<string, unit> = pstring "#!" ── fsharp ────────────────────────────────────────────────────────────────────── //// test "#!magic" |> run magicMarker |> _assertEqual ( Success ("#!", (), Position ("", 2, 1, 3)) ) ╭─[ 66.08ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success: "#!" │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test "##!magic" |> run magicMarker |> _assertEqual ( Failure ( $"Error in Ln: 1 Col: 1{nl}##!magic{nl}^{nl}Expecting: '#!'{nl}", ParserError ( Position ("", 0, 1, 1), (), ErrorMessageList (ExpectedString "#!") ), () ) ) ╭─[ 72.58ms - stdout ]─────────────────────────────────────────────────────────╮ │ Failure: │ │ Error in Ln: 1 Col: 1 │ │ ##!magic │ │ ^ │ │ Expecting: '#!' │ │ │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## magicCommand │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let magicCommand = magicMarker >>. manyTill anyChar newline |>> (System.String.Concat >> SpiralSm.trim) ── fsharp ────────────────────────────────────────────────────────────────────── //// test "#!magic a" |> run magicCommand |> _assertEqual ( Success ("magic", (), Position ("", 8, 2, 1)) ) ╭─[ 45.18ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success: "magic" │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test " #!magic a" |> run magicCommand |> _assertEqual ( Failure ( $"Error in Ln: 1 Col: 1{nl} #!magic{nl}^{nl}Expecting: '#!'{nl}", ParserError ( Position ("", 0, 1, 1), (), ErrorMessageList (ExpectedString "#!") ), () ) ) ╭─[ 43.29ms - stdout ]─────────────────────────────────────────────────────────╮ │ Failure: │ │ Error in Ln: 1 Col: 1 │ │ #!magic │ │ ^ │ │ Expecting: '#!' │ │ │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## content │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let content = (newline >>. magicMarker) <|> (eof >>. preturn "") |> attempt |> lookAhead |> manyTill anyChar |>> (System.String.Concat >> SpiralSm.trim) ── fsharp ────────────────────────────────────────────────────────────────────── //// test "#!magic a " |> run content |> _assertEqual ( Success ("#!magic a", (), Position ("", 14, 7, 1)) ) ╭─[ 36.54ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success: "#!magic │ │ │ │ │ │ a" │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## Output │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── type Output = | Fs | Md | Spi | Spir ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## Magic │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── type Magic = | Fsharp | Markdown | Spiral of Output | Magic of string ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## kernelOutputs │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline kernelOutputs magic = match magic with | Fsharp -> [[ Fs ]] | Markdown -> [[ Md ]] | Spiral output -> [[ output ]] | _ -> [[]] ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## Block │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── type Block = { magic : Magic content : string } ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## block │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let block = pipe2 magicCommand content (fun magic content -> let magic, content = match magic with | "fsharp" -> Fsharp, content | "markdown" -> Markdown, content | "spiral" -> let output = if content |> SpiralSm.contains "//// real\n" then Spir else Spi let content = if output = Spi then content else content |> SpiralSm.replace "//// real\n\n" "" |> SpiralSm.replace "//// real\n" "" Spiral output, content | magic -> magic |> Magic, content { magic = magic content = content }) ── fsharp ────────────────────────────────────────────────────────────────────── //// test "#!magic a " |> run block |> _assertEqual ( Success ( { magic = Magic "magic"; content = "a" }, (), Position ("", 14, 7, 1) ) ) ╭─[ 86.30ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success: { magic = Magic "magic" │ │ content = "a" } │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## blocks │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let blocks = skipMany newline >>. sepEndBy block (skipMany1 newline) ── fsharp ────────────────────────────────────────────────────────────────────── //// test "#!magic1 a \#!magic2 b " |> escapeCell |> run blocks |> _assertEqual ( Success ( [[ { magic = Magic "magic1"; content = "a" } { magic = Magic "magic2"; content = "b" } ]], (), Position ("", 26, 9, 1) ) ) ╭─[ 93.76ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success: [{ magic = Magic "magic1" │ │ content = "a" }; { magic = Magic "magic2" │ │ content = "b" }] │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## formatBlock │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline formatBlock output (block : Block) = match output, block with | output, { magic = Markdown; content = content } -> let markdownComment = match output with | Spi | Spir -> "/// " | Fs -> "/// " | _ -> "" content |> SpiralSm.split "\n" |> Array.map (SpiralSm.trim_end [[||]]) |> Array.filter (SpiralSm.ends_with " (test)" >> not) |> Array.map (function | "" -> markdownComment | line -> System.Text.RegularExpressions.Regex.Replace (line, "^\\s*", $"$&{markdownComment}") ) |> SpiralSm.concat "\n" | Fs, { magic = Fsharp; content = content } -> let trimmedContent = content |> SpiralSm.trim if trimmedContent |> SpiralSm.contains "//// test\n" || trimmedContent |> SpiralSm.contains "//// ignore\n" then "" else content |> SpiralSm.split "\n" |> Array.filter (SpiralSm.trim_start [[||]] >> SpiralSm.starts_with "#r" >> not) |> SpiralSm.concat "\n" | (Spi | Spir), { magic = Spiral output'; content = content } when output' = output -> let trimmedContent = content |> SpiralSm.trim if trimmedContent |> SpiralSm.contains "//// test\n" || trimmedContent |> SpiralSm.contains "//// ignore\n" then "" else content | _ -> "" ── fsharp ────────────────────────────────────────────────────────────────────── //// test "#!markdown a b c \#!markdown c \#!fsharp let a = 1" |> escapeCell |> run block |> function | Success (block, _, _) -> formatBlock Fs block | Failure (msg, _, _) -> failwith msg |> _assertEqual "/// a /// /// b /// /// c" ╭─[ 80.06ms - stdout ]─────────────────────────────────────────────────────────╮ │ "/// a │ │ /// │ │ /// b │ │ /// │ │ /// c" │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## formatBlocks │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline formatBlocks output blocks = blocks |> List.map (fun block -> block, formatBlock output block ) |> List.filter (snd >> (<>) "") |> fun list -> (list, (None, [[]])) ||> List.foldBack (fun (block, content) (lastMagic, acc) -> let lineBreak = if block.magic = Markdown && lastMagic <> Some Markdown && lastMagic <> None then "" else "\n" Some block.magic, $"{content}{lineBreak}" :: acc ) |> snd |> SpiralSm.concat "\n" ── fsharp ────────────────────────────────────────────────────────────────────── //// test "#!markdown a b \#!markdown c \#!fsharp let a = 1 \#!markdown d (test) \#!fsharp //// test let a = 2 \#!markdown e \#!fsharp let a = 3" |> escapeCell |> run blocks |> function | Success (blocks, _, _) -> formatBlocks Fs blocks | Failure (msg, _, _) -> failwith msg |> _assertEqual "/// a /// /// b /// c let a = 1 /// e let a = 3 " ╭─[ 111.77ms - stdout ]────────────────────────────────────────────────────────╮ │ "/// a │ │ /// │ │ /// b │ │ │ │ /// c │ │ let a = 1 │ │ │ │ /// e │ │ let a = 3 │ │ " │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## parse │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline parse output input = match run blocks input with | Success (blocks, _, _) -> let blocks = blocks |> List.filter (fun block -> block.magic |> kernelOutputs |> List.contains output || block.magic = Markdown ) match blocks with | { magic = Markdown; content = content } :: _ when output = Fs && content |> SpiralSm.starts_with "# " && content |> SpiralSm.ends_with ")" -> let inline indentBlock (block : Block) = { block with content = block.content |> SpiralSm.split "\n" |> Array.fold (fun (lines, isMultiline) line -> let trimmedLine = line |> SpiralSm.trim if trimmedLine = "" then "" :: lines, isMultiline else let inline singleQuoteLine () = trimmedLine |> Seq.sumBy ((=) '"' >> System.Convert.ToInt32) = 1 && trimmedLine |> SpiralSm.contains @"'""'" |> not && trimmedLine |> SpiralSm.ends_with "{" |> not && trimmedLine |> SpiralSm.ends_with "{|" |> not && trimmedLine |> SpiralSm.starts_with "}" |> not && trimmedLine |> SpiralSm.starts_with "|}" |> not match isMultiline, trimmedLine |> SpiralSm.split_string [[| $"{q}{q}{q}" |]] with | false, [[| _; _ |]] -> $" {line}" :: lines, true | true, [[| _; _ |]] -> line :: lines, false | false, _ when singleQuoteLine () -> $" {line}" :: lines, true | false, _ when line |> SpiralSm.starts_with "#" && block.magic = Fsharp -> line :: lines, false | false, _ -> $" {line}" :: lines, false | true, _ when singleQuoteLine () && line |> SpiralSm.starts_with " " -> $" {line}" :: lines, false | true, _ when singleQuoteLine () -> line :: lines, false | true, _ -> line :: lines, true ) ([[]], false) |> fst |> List.rev |> SpiralSm.concat "\n" } let moduleName, namespaceName = System.Text.RegularExpressions.Regex.Match (content, @"# (.*) \((.*)\)$") |> fun m -> m.Groups.[[1]].Value, m.Groups.[[2]].Value let moduleBlock = { magic = Fsharp content = $"#if !INTERACTIVE namespace {namespaceName} #endif module {moduleName} =" } blocks |> List.indexed |> List.fold (fun blocks (index, block) -> match index with | 0 -> blocks | 1 -> indentBlock block :: moduleBlock :: blocks | _ -> indentBlock block :: blocks ) [[]] |> List.rev | _ -> blocks |> Result.Ok | Failure (errorMsg, _, _) -> Result.Error errorMsg ── fsharp ────────────────────────────────────────────────────────────────────── //// test let example1 = $"""#!meta {{"kernelInfo":{{"defaultKernelName":"fsharp","items":[[{{"aliases":[[]],"name": "fsharp"}},{{"aliases":[[]],"name":"fsharp"}}]]}}}} \#!markdown # TestModule (TestNamespace) \#!fsharp \#!import file.dib \#!fsharp \#r "nuget:Expecto" \#!markdown ## ParserLibrary \#!fsharp open System \#!markdown ## x (test) \#!fsharp //// ignore let x = 1 \#!spiral //// test inl x = 1i32 \#!spiral //// real inl x = 2i32 \#!spiral inl x = 3i32 \#!markdown ### TextInput \#!fsharp let str1 = "abc def" let str2 = "abc\ def" let str3 = $"1{{ 1 }}1" let str4 = $"1{{({{| a = 1 |}}).a}}1" let str5 = "abc \ def" let x = match '"' with | '"' -> true | _ -> false let long1 = {q}{q}{q}a{q}{q}{q} let long2 = {q}{q}{q} a {q}{q}{q} \#!fsharp type Position = {{ #if INTERACTIVE line : string #else line : int #endif column : int }}""" |> escapeCell ── fsharp ────────────────────────────────────────────────────────────────────── //// test example1 |> parse Fs |> Result.toOption |> Option.get |> (formatBlocks Fs) |> _assertEqual $"""#if !INTERACTIVE namespace TestNamespace #endif module TestModule = /// ## ParserLibrary open System /// ### TextInput let str1 = "abc def" let str2 = "abc\ def" let str3 = $"1{{ 1 }}1" let str4 = $"1{{({{| a = 1 |}}).a}}1" let str5 = "abc \ def" let x = match '"' with | '"' -> true | _ -> false let long1 = {q}{q}{q}a{q}{q}{q} let long2 = {q}{q}{q} a {q}{q}{q} type Position = {{ #if INTERACTIVE line : string #else line : int #endif column : int }} """ ╭─[ 281.69ms - stdout ]────────────────────────────────────────────────────────╮ │ "#if !INTERACTIVE │ │ namespace TestNamespace │ │ #endif │ │ │ │ module TestModule = │ │ │ │ /// ## ParserLibrary │ │ open System │ │ │ │ /// ### TextInput │ │ let str1 = "abc │ │ def" │ │ │ │ let str2 = │ │ "abc\ │ │ def" │ │ │ │ let str3 = │ │ $"1{ │ │ 1 │ │ }1" │ │ │ │ let str4 = │ │ $"1{({| │ │ a = 1 │ │ |}).a}1" │ │ │ │ let str5 = │ │ "abc \ │ │ def" │ │ │ │ let x = │ │ match '"' with │ │ | '"' -> true │ │ | _ -> false │ │ │ │ let long1 = """a""" │ │ │ │ let long2 = │ │ """ │ │ a │ │ """ │ │ │ │ type Position = │ │ { │ │ #if INTERACTIVE │ │ line : string │ │ #else │ │ line : int │ │ #endif │ │ column : int │ │ } │ │ " │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test example1 |> parse Md |> Result.toOption |> Option.get |> (formatBlocks Md) |> _assertEqual "# TestModule (TestNamespace) ## ParserLibrary ### TextInput " ╭─[ 319.93ms - stdout ]────────────────────────────────────────────────────────╮ │ "# TestModule (TestNamespace) │ │ │ │ ## ParserLibrary │ │ │ │ ### TextInput │ │ " │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test example1 |> parse Spi |> Result.toOption |> Option.get |> (formatBlocks Spi) |> _assertEqual "/// # TestModule (TestNamespace) /// ## ParserLibrary inl x = 3i32 /// ### TextInput " ╭─[ 225.29ms - stdout ]────────────────────────────────────────────────────────╮ │ "/// # TestModule (TestNamespace) │ │ │ │ /// ## ParserLibrary │ │ inl x = 3i32 │ │ │ │ /// ### TextInput │ │ " │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test example1 |> parse Spir |> Result.toOption |> Option.get |> (formatBlocks Spir) |> _assertEqual "/// # TestModule (TestNamespace) /// ## ParserLibrary inl x = 2i32 /// ### TextInput " ╭─[ 197.24ms - stdout ]────────────────────────────────────────────────────────╮ │ "/// # TestModule (TestNamespace) │ │ │ │ /// ## ParserLibrary │ │ inl x = 2i32 │ │ │ │ /// ### TextInput │ │ " │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## parseDibCode │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline parseDibCode output file = async { trace Debug (fun () -> "parseDibCode") (fun () -> $"output: {output} / file: {file} / {_locals ()}") let! input = file |> SpiralFileSystem.read_all_text_async match parse output input with | Result.Ok blocks -> return blocks |> formatBlocks output | Result.Error msg -> return failwith msg } ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## writeDibCode │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline writeDibCode output path = async { trace Debug (fun () -> "writeDibCode") (fun () -> $"output: {output} / path: {path} / {_locals ()}") let! result = parseDibCode output path let pathDir = path |> System.IO.Path.GetDirectoryName let fileNameWithoutExt = match output, path |> System.IO.Path.GetFileNameWithoutExtension with | Spir, fileNameWithoutExt -> $"{fileNameWithoutExt}_real" | _, fileNameWithoutExt -> fileNameWithoutExt let outputPath = pathDir </> $"{fileNameWithoutExt}.{output |> string |> SpiralSm.to_lower}" do! result |> SpiralFileSystem.write_all_text_async outputPath } ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## Arguments │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── [[<RequireQualifiedAccess>]] type Arguments = | [[<Argu.ArguAttributes.MainCommand; Argu.ArguAttributes.Mandatory>]] File of file : string * Output interface Argu.IArgParserTemplate with member s.Usage = match s with | File _ -> nameof File ── fsharp ────────────────────────────────────────────────────────────────────── //// test Argu.ArgumentParser.Create<Arguments>().PrintUsage () ╭─[ 151.27ms - return value ]──────────────────────────────────────────────────╮ │ "USAGE: dotnet-repl [--help] <file> <fs|md|spi|spir> │ │ │ │ FILE: │ │ │ │ <file> <fs|md|spi|spir> │ │ File │ │ │ │ OPTIONS: │ │ │ │ --help display this list of options. │ │ " │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## main │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let main args = let argsMap = args |> Runtime.parseArgsMap<Arguments> let files = argsMap.[[nameof Arguments.File]] |> List.map (function | Arguments.File (path, output) -> path, output ) files |> List.map (fun (path, output) -> path |> writeDibCode output) |> Async.Parallel |> Async.Ignore |> Async.runWithTimeout 30000 |> function | Some () -> 0 | None -> 1 ── fsharp ────────────────────────────────────────────────────────────────────── //// test let args = System.Environment.GetEnvironmentVariable "ARGS" |> SpiralRuntime.split_args |> Result.toArray |> Array.collect id match args with | [[||]] -> 0 | args -> if main args = 0 then 0 else failwith "main failed" ╭─[ 246.35ms - return value ]──────────────────────────────────────────────────╮ │ <div class="dni-plaintext"><pre>0 │ │ </pre></div><style> │ │ .dni-code-hint { │ │ font-style: italic; │ │ overflow: hidden; │ │ white-space: nowrap; │ │ } │ │ .dni-treeview { │ │ white-space: nowrap; │ │ } │ │ .dni-treeview td { │ │ vertical-align: top; │ │ text-align: start; │ │ } │ │ details.dni-treeview { │ │ padding-left: 1em; │ │ } │ │ table td { │ │ text-align: start; │ │ } │ │ table tr { │ │ vertical-align: top; │ │ margin: 0em 0px; │ │ } │ │ table tr td pre │ │ { │ │ vertical-align: top !important; │ │ margin: 0em 0px !important; │ │ } │ │ table th { │ │ text-align: start; │ │ } │ │ </style> │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 249.84ms - stdout ]────────────────────────────────────────────────────────╮ │ 00:00:09 debug #1 writeDibCode / output: Fs / path: Builder.dib │ │ 00:00:09 debug #2 parseDibCode / output: Fs / file: Builder.dib │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "Builder.dib"])) } 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ "repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/builder/Builder.dib", "--output-path", "c:/home/git/polyglot/apps/builder/Builder.dib.ipynb", ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/builder/Builder.dib" --output-path "c:/home/git/polyglot/apps/builder/Builder.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ # Builder (Polyglot) │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > #r > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan > dard2.1/FSharp.Control.AsyncSeq.dll" > #r > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6. > 0/System.Reactive.dll" > #r > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/ > netstandard2.0/System.Reactive.Linq.dll" > #r > @"../../../../../../../.nuget/packages/argu/6.2.4/lib/netstandard2.0/Argu.dll" > > ── fsharp ────────────────────────────────────────────────────────────────────── > #if !INTERACTIVE > open Lib > #endif > > ── fsharp ────────────────────────────────────────────────────────────────────── > open Common > open SpiralFileSystem.Operators > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## buildProject │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline buildProject runtime outputDir path = async { > let fullPath = path |> System.IO.Path.GetFullPath > let fileDir = fullPath |> System.IO.Path.GetDirectoryName > let extension = fullPath |> System.IO.Path.GetExtension > > trace Debug > (fun () -> "buildProject") > (fun () -> $"fullPath: {fullPath} / {_locals ()}") > > match extension with > | ".fsproj" -> () > | _ -> failwith "Invalid project file" > > let runtimes = > runtime > |> Option.map List.singleton > |> Option.defaultValue [[ "linux-x64"; "win-x64" ]] > > let outputDir = outputDir |> Option.defaultValue "dist" > > return! > runtimes > |> List.map (fun runtime -> async { > let command = $@"dotnet publish ""{path}"" --configuration Release > --output ""{outputDir}"" --runtime {runtime}" > let! exitCode, _result = > SpiralRuntime.execution_options (fun x -> > { x with > l0 = command > l6 = Some fileDir > } > ) > |> SpiralRuntime.execute_with_options_async > return exitCode > }) > |> Async.Sequential > |> Async.map Array.sum > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## persistCodeProject │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline persistCodeProject packages modules name hash code = async { > trace Debug > (fun () -> "persistCodeProject") > (fun () -> $"packages: {packages} / modules: {modules} / name: {name} / > hash: {hash} / code.Length: {code |> String.length} / {_locals ()}") > > let workspaceRoot = SpiralFileSystem.get_workspace_root () > > let targetDir = > let targetDir = workspaceRoot </> "target/Builder" </> name > match hash with > | Some hash -> targetDir </> "packages" </> hash > | None -> targetDir > targetDir |> System.IO.Directory.CreateDirectory |> ignore > > let filePath = targetDir </> $"{name}.fs" |> System.IO.Path.GetFullPath > do! code |> SpiralFileSystem.write_all_text_exists filePath > > let modulesCode = > modules > |> List.map (fun path -> $"""<Compile Include="{workspaceRoot </> path}" > />""") > |> SpiralSm.concat "\n " > > let fsprojPath = targetDir </> $"{name}.fsproj" > let fsprojCode = $"""<Project Sdk="Microsoft.NET.Sdk"> > <PropertyGroup> > <TargetFramework>net9.0</TargetFramework> > <LangVersion>preview</LangVersion> > <RollForward>Major</RollForward> > <TargetLatestRuntimePatch>true</TargetLatestRuntimePatch> > <PublishAot>false</PublishAot> > <PublishTrimmed>false</PublishTrimmed> > <PublishSingleFile>true</PublishSingleFile> > <SelfContained>true</SelfContained> > <Version>0.0.1-alpha.1</Version> > <OutputType>Exe</OutputType> > </PropertyGroup> > > <PropertyGroup Condition="$([[MSBuild]]::IsOSPlatform('FreeBSD'))"> > <DefineConstants>_FREEBSD</DefineConstants> > </PropertyGroup> > > <PropertyGroup Condition="$([[MSBuild]]::IsOSPlatform('Linux'))"> > <DefineConstants>_LINUX</DefineConstants> > </PropertyGroup> > > <PropertyGroup Condition="$([[MSBuild]]::IsOSPlatform('OSX'))"> > <DefineConstants>_OSX</DefineConstants> > </PropertyGroup> > > <PropertyGroup Condition="$([[MSBuild]]::IsOSPlatform('Windows'))"> > <DefineConstants>_WINDOWS</DefineConstants> > </PropertyGroup> > > <ItemGroup> > {modulesCode} > <Compile Include="{filePath}" /> > </ItemGroup> > > <Import Project="{workspaceRoot}/.paket/Paket.Restore.targets" /> > </Project> > """ > do! fsprojCode |> SpiralFileSystem.write_all_text_exists fsprojPath > > let paketReferencesPath = targetDir </> "paket.references" > let paketReferencesCode = > "FSharp.Core" :: packages > |> SpiralSm.concat "\n" > do! paketReferencesCode |> SpiralFileSystem.write_all_text_exists > paketReferencesPath > > return fsprojPath > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## buildCode │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline buildCode runtime packages modules outputDir name code = async { > let! fsprojPath = code |> persistCodeProject packages modules name None > let! exitCode = fsprojPath |> buildProject runtime outputDir > if exitCode <> 0 then > let! fsprojText = fsprojPath |> SpiralFileSystem.read_all_text_async > trace Critical > (fun () -> "buildCode") > (fun () -> $"code: {code |> SpiralSm.ellipsis_end 400} / fsprojText: > {fsprojText} / {_locals ()}") > return exitCode > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > "1 + 1 |> ignore" > |> buildCode None [[]] [[]] None "test1" > |> Async.runWithTimeout 180000 > |> _assertEqual (Some 0) > > ╭─[ 8.84s - stdout ]───────────────────────────────────────────────────────────╮ > │ 00:00:03 debug #1 persistCodeProject / packages: [] / modules: [] / │ > │ name: test1 / hash: / code.Length: 15 │ > │ 00:00:03 debug #2 buildProject / fullPath: │ > │ C:\home\git\polyglot\target\Builder\test1\test1.fsproj │ > │ 00:00:09 debug #1 runtime.execute_with_options_async / { options = { │ > │ command = dotnet publish │ > │ "C:\home\git\polyglot\target/Builder\test1\test1.fsproj" --configuration │ > │ Release --output "dist" --runtime linux-x64; cancellation_token = None; │ > │ environment_variables = [||]; on_line = None; stdin = None; trace = true; │ > │ working_directory = Some "C:\home\git\polyglot\target\Builder\test1" } } │ > │ 00:00:10 verbose #2 > MSBuild version │ > │ 17.10.0-preview-24101-01+07fd5d51f for .NET │ > │ 00:00:11 verbose #3 > Determining projects to restore... │ > │ 00:00:12 verbose #4 > Restored │ > │ C:\home\git\polyglot\target\Builder\test1\test1.fsproj (in 781 ms). │ > │ 00:00:12 verbose #5 > │ > │ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │ > │ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │ > │ ce.targets(313,5): message NETSDK1057: You are using a preview version of │ > │ .NET. See: https://aka.ms/dotnet-support-policy [ │ > │ C:\home\git\polyglot\target\Builder\test1\test1.fsproj] │ > │ 00:00:13 verbose #6 > test1 -> │ > │ C:\home\git\polyglot\target\Builder\test1\bin\Release\net9.0\linux-x64\test1 │ > │ .dll │ > │ 00:00:14 verbose #7 > test1 -> │ > │ C:\home\git\polyglot\target\Builder\test1\dist\ │ > │ 00:00:14 debug #8 runtime.execute_with_options_async / { exit_code = │ > │ 0; output_length = 657 } │ > │ 00:00:14 debug #9 runtime.execute_with_options_async / { options = { │ > │ command = dotnet publish │ > │ "C:\home\git\polyglot\target/Builder\test1\test1.fsproj" --configuration │ > │ Release --output "dist" --runtime win-x64; cancellation_token = None; │ > │ environment_variables = [||]; on_line = None; stdin = None; trace = true; │ > │ working_directory = Some "C:\home\git\polyglot\target\Builder\test1" } } │ > │ 00:00:14 verbose #10 > MSBuild version │ > │ 17.10.0-preview-24101-01+07fd5d51f for .NET │ > │ 00:00:15 verbose #11 > Determining projects to restore... │ > │ 00:00:16 verbose #12 > Restored │ > │ C:\home\git\polyglot\target\Builder\test1\test1.fsproj (in 453 ms). │ > │ 00:00:16 verbose #13 > │ > │ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │ > │ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │ > │ ce.targets(313,5): message NETSDK1057: You are using a preview version of │ > │ .NET. See: https://aka.ms/dotnet-support-policy [ │ > │ C:\home\git\polyglot\target\Builder\test1\test1.fsproj] │ > │ 00:00:17 verbose #14 > test1 -> │ > │ C:\home\git\polyglot\target\Builder\test1\bin\Release\net9.0\win-x64\test1.d │ > │ ll │ > │ 00:00:18 verbose #15 > test1 -> │ > │ C:\home\git\polyglot\target\Builder\test1\dist\ │ > │ 00:00:18 debug #16 runtime.execute_with_options_async / { exit_code = │ > │ 0; output_length = 655 } │ > │ Some 0 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > "1 + a |> ignore" > |> buildCode None [[]] [[]] None "test2" > |> Async.runWithTimeout 180000 > |> _assertEqual (Some 2) > > ╭─[ 8.59s - stdout ]───────────────────────────────────────────────────────────╮ > │ 00:00:12 debug #3 persistCodeProject / packages: [] / modules: [] / │ > │ name: test2 / hash: / code.Length: 15 │ > │ 00:00:12 debug #4 buildProject / fullPath: │ > │ C:\home\git\polyglot\target\Builder\test2\test2.fsproj │ > │ 00:00:18 debug #17 runtime.execute_with_options_async / { options = { │ > │ command = dotnet publish │ > │ "C:\home\git\polyglot\target/Builder\test2\test2.fsproj" --configuration │ > │ Release --output "dist" --runtime linux-x64; cancellation_token = None; │ > │ environment_variables = [||]; on_line = None; stdin = None; trace = true; │ > │ working_directory = Some "C:\home\git\polyglot\target\Builder\test2" } } │ > │ 00:00:18 verbose #18 > MSBuild version │ > │ 17.10.0-preview-24101-01+07fd5d51f for .NET │ > │ 00:00:19 verbose #19 > Determining projects to restore... │ > │ 00:00:20 verbose #20 > Restored │ > │ C:\home\git\polyglot\target\Builder\test2\test2.fsproj (in 429 ms). │ > │ 00:00:20 verbose #21 > │ > │ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │ > │ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │ > │ ce.targets(313,5): message NETSDK1057: You are using a preview version of │ > │ .NET. See: https://aka.ms/dotnet-support-policy [ │ > │ C:\home\git\polyglot\target\Builder\test2\test2.fsproj] │ > │ 00:00:22 verbose #22 > │ > │ C:\home\git\polyglot\target\Builder\test2\test2.fs(1,5): error FS0039: The │ > │ value or constructor 'a' is not defined. [ │ > │ C:\home\git\polyglot\target\Builder\test2\test2.fsproj] │ > │ 00:00:22 debug #23 runtime.execute_with_options_async / { exit_code = │ > │ 1; output_length = 679 } │ > │ 00:00:22 debug #24 runtime.execute_with_options_async / { options = { │ > │ command = dotnet publish │ > │ "C:\home\git\polyglot\target/Builder\test2\test2.fsproj" --configuration │ > │ Release --output "dist" --runtime win-x64; cancellation_token = None; │ > │ environment_variables = [||]; on_line = None; stdin = None; trace = true; │ > │ working_directory = Some "C:\home\git\polyglot\target\Builder\test2" } } │ > │ 00:00:22 verbose #25 > MSBuild version │ > │ 17.10.0-preview-24101-01+07fd5d51f for .NET │ > │ 00:00:23 verbose #26 > Determining projects to restore... │ > │ 00:00:24 verbose #27 > Restored │ > │ C:\home\git\polyglot\target\Builder\test2\test2.fsproj (in 436 ms). │ > │ 00:00:24 verbose #28 > │ > │ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │ > │ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │ > │ ce.targets(313,5): message NETSDK1057: You are using a preview version of │ > │ .NET. See: https://aka.ms/dotnet-support-policy [ │ > │ C:\home\git\polyglot\target\Builder\test2\test2.fsproj] │ > │ 00:00:26 verbose #29 > │ > │ C:\home\git\polyglot\target\Builder\test2\test2.fs(1,5): error FS0039: The │ > │ value or constructor 'a' is not defined. [ │ > │ C:\home\git\polyglot\target\Builder\test2\test2.fsproj] │ > │ 00:00:26 debug #30 runtime.execute_with_options_async / { exit_code = │ > │ 1; output_length = 679 } │ > │ 00:00:20 critical #5 buildCode / code: 1 + a |> ignore / fsprojText: │ > │ <Project Sdk="Microsoft.NET.Sdk"> │ > │ <PropertyGroup> │ > │ <TargetFramework>net9.0</TargetFramework> │ > │ <LangVersion>preview</LangVersion> │ > │ <RollForward>Major</RollForward> │ > │ <TargetLatestRuntimePatch>true</TargetLatestRuntimePatch> │ > │ <PublishAot>false</PublishAot> │ > │ <PublishTrimmed>false</PublishTrimmed> │ > │ <PublishSingleFile>true</PublishSingleFile> │ > │ <SelfContained>true</SelfContained> │ > │ <Version>0.0.1-alpha.1</Version> │ > │ <OutputType>Exe</OutputType> │ > │ </PropertyGroup> │ > │ │ > │ <PropertyGroup Condition="$([MSBuild]::IsOSPlatform('FreeBSD'))"> │ > │ <DefineConstants>_FREEBSD</DefineConstants> │ > │ </PropertyGroup> │ > │ │ > │ <PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Linux'))"> │ > │ <DefineConstants>_LINUX</DefineConstants> │ > │ </PropertyGroup> │ > │ │ > │ <PropertyGroup Condition="$([MSBuild]::IsOSPlatform('OSX'))"> │ > │ <DefineConstants>_OSX</DefineConstants> │ > │ </PropertyGroup> │ > │ │ > │ <PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))"> │ > │ <DefineConstants>_WINDOWS</DefineConstants> │ > │ </PropertyGroup> │ > │ │ > │ <ItemGroup> │ > │ │ > │ <Compile │ > │ Include="C:\home\git\polyglot\target\Builder\test2\test2.fs" /> │ > │ </ItemGroup> │ > │ │ > │ <Import Project="C:\home\git\polyglot/.paket/Paket.Restore.targets" /> │ > │ </Project> │ > │ │ > │ Some 2 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## readFile │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline readFile path = async { > let! code = path |> SpiralFileSystem.read_all_text_async > > let code = System.Text.RegularExpressions.Regex.Replace ( > code, > @"( *)(let\s+main\s+.*?\s*=)", > fun m -> m.Groups.[[1]].Value + "[[<EntryPoint>]]\n" + > m.Groups.[[1]].Value + m.Groups.[[2]].Value > ) > > let codeTrim = code |> SpiralSm.trim_end [[||]] > return > if codeTrim |> SpiralSm.ends_with "\n()" > then codeTrim |> SpiralSm.slice 0 ((codeTrim |> String.length) - 3) > else code > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## buildFile │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline buildFile runtime packages modules path = async { > let fullPath = path |> System.IO.Path.GetFullPath > let dir = fullPath |> System.IO.Path.GetDirectoryName > let name = fullPath |> System.IO.Path.GetFileNameWithoutExtension > let! code = fullPath |> readFile > return! code |> buildCode runtime packages modules (dir </> "dist" |> Some) > name > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## persistFile │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline persistFile packages modules path = async { > let fullPath = path |> System.IO.Path.GetFullPath > let name = fullPath |> System.IO.Path.GetFileNameWithoutExtension > let! code = fullPath |> readFile > return! code |> persistCodeProject packages modules name None > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## Arguments │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > [[<RequireQualifiedAccess>]] > type Arguments = > | [[<Argu.ArguAttributes.MainCommand; Argu.ArguAttributes.ExactlyOnce>]] > Path of path : string > | [[<Argu.ArguAttributes.Unique>]] Packages of packages : string list > | [[<Argu.ArguAttributes.Unique>]] Modules of modules : string list > | [[<Argu.ArguAttributes.Unique>]] Runtime of runtime : string > | [[<Argu.ArguAttributes.Unique>]] Persist_Only > > interface Argu.IArgParserTemplate with > member s.Usage = > match s with > | Path _ -> nameof Path > | Packages _ -> nameof Packages > | Modules _ -> nameof Modules > | Runtime _ -> nameof Runtime > | Persist_Only -> nameof Persist_Only > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > Argu.ArgumentParser.Create<Arguments>().PrintUsage () > > ╭─[ 124.33ms - return value ]──────────────────────────────────────────────────╮ > │ "USAGE: dotnet-repl [--help] [--packages [<packages>...]] │ > │ [--modules [<modules>...]] [--runtime <runtime>] │ > │ [--persist-only] <path> │ > │ │ > │ PATH: │ > │ │ > │ <path> Path │ > │ │ > │ OPTIONS: │ > │ │ > │ --packages [<packages>...] │ > │ Packages │ > │ --modules [<modules>...] │ > │ Modules │ > │ --runtime <runtime> Runtime │ > │ --persist-only Persist_Only │ > │ --help display this list of options. │ > │ " │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## main │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let main args = > let argsMap = args |> Runtime.parseArgsMap<Arguments> > > let path = > match argsMap.[[nameof Arguments.Path]] with > | [[ Arguments.Path path ]] -> Some path > | _ -> None > |> Option.get > > let packages = > match argsMap |> Map.tryFind (nameof Arguments.Packages) with > | Some [[ Arguments.Packages packages ]] -> packages > | _ -> [[]] > > let modules = > match argsMap |> Map.tryFind (nameof Arguments.Modules) with > | Some [[ Arguments.Modules modules ]] -> modules > | _ -> [[]] > > let runtime = > match argsMap |> Map.tryFind (nameof Arguments.Runtime) with > | Some [[ Arguments.Runtime runtime ]] -> Some runtime > | _ -> None > > let persistOnly = argsMap |> Map.containsKey (nameof Arguments.Persist_Only) > > if persistOnly > then path |> persistFile packages modules |> Async.map (fun _ -> 0) > else path |> buildFile runtime packages modules > |> Async.runWithTimeout (60000 * 60) > |> function > | Some exitCode -> exitCode > | None -> 1 > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let args = > System.Environment.GetEnvironmentVariable "ARGS" > |> SpiralRuntime.split_args > |> Result.toArray > |> Array.collect id > > match args with > | [[||]] -> 0 > | args -> if main args = 0 then 0 else failwith "main failed" > > ╭─[ 50.24s - return value ]────────────────────────────────────────────────────╮ > │ <div class="dni-plaintext"><pre>0 │ > │ </pre></div><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 50.24s - stdout ]──────────────────────────────────────────────────────────╮ > │ 00:00:22 debug #6 persistCodeProject / packages: [Argu; │ > │ FSharp.Control.AsyncSeq; System.Reactive.Linq] / modules: [ │ > │ lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / │ > │ name: Builder / hash: / code.Length: 8210 │ > │ 00:00:22 debug #7 buildProject / fullPath: │ > │ C:\home\git\polyglot\target\Builder\Builder\Builder.fsproj │ > │ 00:00:28 debug #31 runtime.execute_with_options_async / { options = { │ > │ command = dotnet publish │ > │ "C:\home\git\polyglot\target/Builder\Builder\Builder.fsproj" --configuration │ > │ Release --output "C:\home\git\polyglot\apps\builder\dist" --runtime │ > │ linux-x64; cancellation_token = None; environment_variables = [||]; on_line │ > │ = None; stdin = None; trace = true; working_directory = Some │ > │ "C:\home\git\polyglot\target\Builder\Builder" } } │ > │ 00:00:28 verbose #32 > MSBuild version │ > │ 17.10.0-preview-24101-01+07fd5d51f for .NET │ > │ 00:00:29 verbose #33 > Determining projects to restore... │ > │ 00:00:30 verbose #34 > Restored │ > │ C:\home\git\polyglot\target\Builder\Builder\Builder.fsproj (in 483 ms). │ > │ 00:00:30 verbose #35 > │ > │ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │ > │ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │ > │ ce.targets(313,5): message NETSDK1057: You are using a preview version of │ > │ .NET. See: https://aka.ms/dotnet-support-policy [ │ > │ C:\home\git\polyglot\target\Builder\Builder\Builder.fsproj] │ > │ 00:00:56 verbose #36 > Builder -> │ > │ C:\home\git\polyglot\target\Builder\Builder\bin\Release\net9.0\linux-x64\Bui │ > │ lder.dll │ > │ 00:00:58 verbose #37 > Builder -> │ > │ C:\home\git\polyglot\apps\builder\dist\ │ > │ 00:00:58 debug #38 runtime.execute_with_options_async / { exit_code = │ > │ 0; output_length = 665 } │ > │ 00:00:58 debug #39 runtime.execute_with_options_async / { options = { │ > │ command = dotnet publish │ > │ "C:\home\git\polyglot\target/Builder\Builder\Builder.fsproj" --configuration │ > │ Release --output "C:\home\git\polyglot\apps\builder\dist" --runtime win-x64; │ > │ cancellation_token = None; environment_variables = [||]; on_line = None; │ > │ stdin = None; trace = true; working_directory = Some │ > │ "C:\home\git\polyglot\target\Builder\Builder" } } │ > │ 00:00:58 verbose #40 > MSBuild version │ > │ 17.10.0-preview-24101-01+07fd5d51f for .NET │ > │ 00:00:59 verbose #41 > Determining projects to restore... │ > │ 00:01:00 verbose #42 > Restored │ > │ C:\home\git\polyglot\target\Builder\Builder\Builder.fsproj (in 488 ms). │ > │ 00:01:00 verbose #43 > │ > │ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │ > │ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │ > │ ce.targets(313,5): message NETSDK1057: You are using a preview version of │ > │ .NET. See: https://aka.ms/dotnet-support-policy [ │ > │ C:\home\git\polyglot\target\Builder\Builder\Builder.fsproj] │ > │ 00:01:17 verbose #44 > Builder -> │ > │ C:\home\git\polyglot\target\Builder\Builder\bin\Release\net9.0\win-x64\Build │ > │ er.dll │ > │ 00:01:18 verbose #45 > Builder -> │ > │ C:\home\git\polyglot\apps\builder\dist\ │ > │ 00:01:18 debug #46 runtime.execute_with_options_async / { exit_code = │ > │ 0; output_length = 663 } │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:44 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 34436 } 00:01:44 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ "nbconvert", "c:/home/git/polyglot/apps/builder/Builder.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark", ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/apps/builder/Builder.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:01:46 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/builder/Builder.dib.ipynb to html 00:01:46 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:01:46 verbose #7 ! validate(nb) 00:01:49 verbose #8 ! [NbConvertApp] Writing 335132 bytes to c:\home\git\polyglot\apps\builder\Builder.dib.html 00:01:49 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 649 } 00:01:49 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 649 } 00:01:49 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ "-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/builder/Builder.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/builder/Builder.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:01:49 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:01:49 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:01:49 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 35144 }
In [ ]:
{ pwsh ../apps/spiral/builder/build.ps1 -SkipFsx 1 } | Invoke-Block
00:00:04 debug #1 persistCodeProject / packages: [Fable.Core] / modules: [lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / name: spiral_builder / hash: / code.Length: 6719754 targetDir: C:\home\git\polyglot\target\Builder\spiral_builder Fable 4.21.0: F# to Rust compiler (status: alpha) Thanks to the contributor! @selketjah Stand with Ukraine! https://standwithukraine.com.ua/ Parsing target\Builder\spiral_builder\spiral_builder.fsproj... Retrieving project options from cache, in case of issues run `dotnet fable clean` or try `--noCache` option. Project and references (14 source files) parsed in 356ms Started Fable compilation... Fable compilation finished in 20417ms .\lib\spiral\common.fsx(1458,0): (1458,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\sm.fsx(450,0): (450,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\crypto.fsx(1612,0): (1612,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\date_time.fsx(997,0): (997,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\async_.fsx(76,0): (76,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\threading.fsx(127,0): (127,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\networking.fsx(3719,0): (3719,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\platform.fsx(104,0): (104,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\runtime.fsx(4778,0): (4778,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\file_system.fsx(55820,0): (55820,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\trace.fsx(1490,0): (1490,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! Directory: C:\home\git\polyglot\target\Builder\spiral_builder\target Mode LastWriteTime Length Name ---- ------------- ------ ---- d---- 2024-09-21 8:56 PM rs Compiling fable_library_rust v0.1.0 (C:\home\git\polyglot\lib\rust\fable\fable_modules\fable-library-rust) Compiling spiral_builder v0.0.1 (C:\home\git\polyglot\apps\spiral\builder) Finished `release` profile [optimized] target(s) in 36.94s Running unittests spiral_builder.rs (C:\home\git\polyglot\workspace\target\release\deps\spiral_builder-ea3eb4a16337e451.exe) running 1 test test module_7e2cd9e0::Spiral_builder::verify_app ... ok successes: successes: module_7e2cd9e0::Spiral_builder::verify_app test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Compiling fable_library_rust v0.1.0 (C:\home\git\polyglot\lib\rust\fable\fable_modules\fable-library-rust) Compiling spiral_builder v0.0.1 (C:\home\git\polyglot\apps\spiral\builder) error: failed to remove file `C:\home\git\polyglot\workspace\target\release\spiral_builder.exe` Caused by: Access is denied. (os error 5) # Invoke-Block / $retry: 1/1 / $Location: / Get-Location: C:\home\git\polyglot\apps\spiral\builder / $OnError: Continue / $exitcode: 101 / $EnvVars: { "PATH": "C:\\Users\\i574n\\scoop\\apps\\pwsh\\current;C:\\Program Files\\NVIDIA\\CUDNN\\v9.1\\bin;C:\\ProgramData\\scoop\\shims;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\dotnet\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Program Files\\Perforce;C:\\Program Files\\Wasmtime\\bin;C:\\Program Files\\Perforce\\;C:\\Users\\i574n\\scoop\\apps\\vscode-insiders\\current\\bin;C:\\Users\\i574n\\scoop\\apps\\python\\current\\Scripts;C:\\Users\\i574n\\scoop\\apps\\python\\current\\.;C:\\Users\\i574n\\scoop\\apps\\elixir\\current\\bin;C:\\Users\\i574n\\scoop\\apps\\rustup\\current\\.cargo\\bin;C:\\Users\\i574n\\scoop\\apps\\latex\\current\\texmfs\\install\\miktex\\bin\\x64;C:\\Users\\i574n\\scoop\\apps\\dotnet-sdk-preview\\current;C:\\Users\\i574n\\scoop\\apps\\dotnet-sdk\\current;C:\\Users\\i574n\\scoop\\apps\\gsudo\\current;C:\\Users\\i574n\\scoop\\apps\\python\\current;C:\\Users\\i574n\\scoop\\apps\\nircmd\\current;C:\\Users\\i574n\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\i574n/scoop/buckets/mold/home/windows/path;C:\\Users\\i574n/scoop/persist/rustup/.cargo/bin;C:\\Users\\i574n/scoop/apps/nvm/current/nodejs/nodejs;C:\\Users\\i574n/scoop/apps/cygwin/current/root/bin;C:\\Users\\i574n\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\i574n\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\i574n\\.bun\\bin;C:\\Users\\i574n\\.dotnet\\tools;C:\\Users\\i574n\\scoop\\shims;C:\\Users\\i574n\\.fly\\bin;C:\\Program Files\\Wasmtime\\bin;C:\\Users\\i574n/.cargo/bin;C:\\Users\\i574n/.bun/bin;C:\\Users\\i574n/.cargo/bin;C:\\Users\\i574n/.bun/bin;C:\\Users\\i574n/.cargo/bin;C:\\Users\\i574n/.bun/bin" } / $Error: '' / $ScriptBlock: 'cargo build --release'
In [ ]:
{ pwsh ../apps/parser/build.ps1 } | Invoke-Block
00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "DibParser.dib"])) } 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ "repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/parser/DibParser.dib", "--output-path", "c:/home/git/polyglot/apps/parser/DibParser.dib.ipynb", ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/parser/DibParser.dib" --output-path "c:/home/git/polyglot/apps/parser/DibParser.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ # DibParser (Polyglot) │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > #r > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan > dard2.1/FSharp.Control.AsyncSeq.dll" > #r > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6. > 0/System.Reactive.dll" > #r > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/ > netstandard2.0/System.Reactive.Linq.dll" > #r > @"../../../../../../../.nuget/packages/argu/6.2.4/lib/netstandard2.0/Argu.dll" > #r > @"../../../../../../../.nuget/packages/fparsec/2.0.0-beta2/lib/netstandard2.1/FP > arsec.dll" > #r > @"../../../../../../../.nuget/packages/fparsec/2.0.0-beta2/lib/netstandard2.1/FP > arsecCS.dll" > > ── pwsh ──────────────────────────────────────────────────────────────────────── > ls ~/.nuget/packages/argu > > ╭─[ 684.80ms - stdout ]────────────────────────────────────────────────────────╮ > │ │ > │ Directory: C:\Users\i574n\.nuget\packages\argu │ > │ │ > │ Mode LastWriteTime Length[ │ > │ 32;1m Name │ > │ ---- ------------- ------ [ │ > │ 32;1m---- │ > │ d---- 2023-05-17 3:38 PM 6.1.1 │ > │ d---- 2024-03-12 8:22 PM 6.1.4 │ > │ d---- 2024-01-29 5:12 PM 6.1.5 │ > │ d---- 2024-03-12 8:20 PM 6.2.0 │ > │ d---- 2024-02-23 6:50 PM 6.2.1 │ > │ d---- 2024-03-12 8:15 PM 6.2.2 │ > │ d---- 2024-05-14 8:20 PM 6.2.3 │ > │ d---- 2024-06-06 7:37 PM 6.2.4 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > #if !INTERACTIVE > open Lib > #endif > > ── fsharp ────────────────────────────────────────────────────────────────────── > open Common > open FParsec > open SpiralFileSystem.Operators > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## escapeCell (test) │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let inline escapeCell input = > input > |> SpiralSm.split "\n" > |> Array.map (function > | line when line |> SpiralSm.starts_with "\\#!" || line |> > SpiralSm.starts_with "\\#r" -> > System.Text.RegularExpressions.Regex.Replace (line, "^\\\\#", "#") > | line -> line > ) > |> SpiralSm.concat "\n" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > $"a{nl}\\#!magic{nl}b{nl}" > |> escapeCell > |> _assertEqual ( > $"a{nl}#!magic{nl}b{nl}" > ) > > ╭─[ 96.75ms - stdout ]─────────────────────────────────────────────────────────╮ > │ "a │ > │ #!magic │ > │ b │ > │ " │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## magicMarker │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let magicMarker : Parser<string, unit> = pstring "#!" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > "#!magic" > |> run magicMarker > |> _assertEqual ( > Success ("#!", (), Position ("", 2, 1, 3)) > ) > > ╭─[ 44.67ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success: "#!" │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > "##!magic" > |> run magicMarker > |> _assertEqual ( > Failure ( > $"Error in Ln: 1 Col: 1{nl}##!magic{nl}^{nl}Expecting: '#!'{nl}", > ParserError ( > Position ("", 0, 1, 1), > (), > ErrorMessageList (ExpectedString "#!") > ), > () > ) > ) > > ╭─[ 57.08ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Failure: │ > │ Error in Ln: 1 Col: 1 │ > │ ##!magic │ > │ ^ │ > │ Expecting: '#!' │ > │ │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## magicCommand │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let magicCommand = > magicMarker > >>. manyTill anyChar newline > |>> (System.String.Concat >> SpiralSm.trim) > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > "#!magic > > a" > |> run magicCommand > |> _assertEqual ( > Success ("magic", (), Position ("", 8, 2, 1)) > ) > > ╭─[ 33.49ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success: "magic" │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > " #!magic > > a" > |> run magicCommand > |> _assertEqual ( > Failure ( > $"Error in Ln: 1 Col: 1{nl} #!magic{nl}^{nl}Expecting: '#!'{nl}", > ParserError ( > Position ("", 0, 1, 1), > (), > ErrorMessageList (ExpectedString "#!") > ), > () > ) > ) > > ╭─[ 34.91ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Failure: │ > │ Error in Ln: 1 Col: 1 │ > │ #!magic │ > │ ^ │ > │ Expecting: '#!' │ > │ │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## content │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let content = > (newline >>. magicMarker) <|> (eof >>. preturn "") > |> attempt > |> lookAhead > |> manyTill anyChar > |>> (System.String.Concat >> SpiralSm.trim) > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > "#!magic > > > a > > > " > |> run content > |> _assertEqual ( > Success ("#!magic > > > a", (), Position ("", 14, 7, 1)) > ) > > ╭─[ 28.53ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success: "#!magic │ > │ │ > │ │ > │ a" │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## Output │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > type Output = > | Fs > | Md > | Spi > | Spir > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## Magic │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > type Magic = > | Fsharp > | Markdown > | Spiral of Output > | Magic of string > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## kernelOutputs │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline kernelOutputs magic = > match magic with > | Fsharp -> [[ Fs ]] > | Markdown -> [[ Md ]] > | Spiral output -> [[ output ]] > | _ -> [[]] > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## Block │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > type Block = > { > magic : Magic > content : string > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## block │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let block = > pipe2 > magicCommand > content > (fun magic content -> > let magic, content = > match magic with > | "fsharp" -> Fsharp, content > | "markdown" -> Markdown, content > | "spiral" -> > let output = if content |> SpiralSm.contains "//// real\n" > then Spir else Spi > let content = > if output = Spi > then content > else > content > |> SpiralSm.replace "//// real\n\n" "" > |> SpiralSm.replace "//// real\n" "" > Spiral output, content > | magic -> magic |> Magic, content > { > magic = magic > content = content > }) > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > "#!magic > > > a > > > " > |> run block > |> _assertEqual ( > Success ( > { magic = Magic "magic"; content = "a" }, > (), > Position ("", 14, 7, 1) > ) > ) > > ╭─[ 52.71ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success: { magic = Magic "magic" │ > │ content = "a" } │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## blocks │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let blocks = > skipMany newline > >>. sepEndBy block (skipMany1 newline) > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > > "#!magic1 > > a > > \#!magic2 > > b > > " > |> escapeCell > |> run blocks > |> _assertEqual ( > Success ( > [[ > { magic = Magic "magic1"; content = "a" } > { magic = Magic "magic2"; content = "b" } > ]], > (), > Position ("", 26, 9, 1) > ) > ) > > ╭─[ 55.04ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success: [{ magic = Magic "magic1" │ > │ content = "a" }; { magic = Magic "magic2" │ > │ content = "b" }] │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## formatBlock │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline formatBlock output (block : Block) = > match output, block with > | output, { magic = Markdown; content = content } -> > let markdownComment = > match output with > | Spi | Spir -> "/// " > | Fs -> "/// " > | _ -> "" > content > |> SpiralSm.split "\n" > |> Array.map (SpiralSm.trim_end [[||]]) > |> Array.filter (SpiralSm.ends_with " (test)" >> not) > |> Array.map (function > | "" -> markdownComment > | line -> System.Text.RegularExpressions.Regex.Replace (line, > "^\\s*", $"$&{markdownComment}") > ) > |> SpiralSm.concat "\n" > | Fs, { magic = Fsharp; content = content } -> > let trimmedContent = content |> SpiralSm.trim > if trimmedContent |> SpiralSm.contains "//// test\n" > || trimmedContent |> SpiralSm.contains "//// ignore\n" > then "" > else > content > |> SpiralSm.split "\n" > |> Array.filter (SpiralSm.trim_start [[||]] >> SpiralSm.starts_with > "#r" >> not) > |> SpiralSm.concat "\n" > | (Spi | Spir), { magic = Spiral output'; content = content } when output' = > output -> > let trimmedContent = content |> SpiralSm.trim > if trimmedContent |> SpiralSm.contains "//// test\n" > || trimmedContent |> SpiralSm.contains "//// ignore\n" > then "" > else content > | _ -> "" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > "#!markdown > > > a > > b > > c > > > \#!markdown > > > c > > > \#!fsharp > > > let a = 1" > |> escapeCell > |> run block > |> function > | Success (block, _, _) -> formatBlock Fs block > | Failure (msg, _, _) -> failwith msg > |> _assertEqual "/// a > /// > /// b > /// > /// c" > > ╭─[ 72.28ms - stdout ]─────────────────────────────────────────────────────────╮ > │ "/// a │ > │ /// │ > │ /// b │ > │ /// │ > │ /// c" │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## formatBlocks │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline formatBlocks output blocks = > blocks > |> List.map (fun block -> > block, formatBlock output block > ) > |> List.filter (snd >> (<>) "") > |> fun list -> > (list, (None, [[]])) > ||> List.foldBack (fun (block, content) (lastMagic, acc) -> > let lineBreak = > if block.magic = Markdown && lastMagic <> Some Markdown && > lastMagic <> None > then "" > else "\n" > Some block.magic, $"{content}{lineBreak}" :: acc > ) > |> snd > |> SpiralSm.concat "\n" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > "#!markdown > > > a > > b > > > \#!markdown > > > c > > > \#!fsharp > > > let a = 1 > > \#!markdown > > d (test) > > \#!fsharp > > //// test > > let a = 2 > > \#!markdown > > e > > \#!fsharp > > let a = 3" > |> escapeCell > |> run blocks > |> function > | Success (blocks, _, _) -> formatBlocks Fs blocks > | Failure (msg, _, _) -> failwith msg > |> _assertEqual "/// a > /// > /// b > > /// c > let a = 1 > > /// e > let a = 3 > " > > ╭─[ 90.17ms - stdout ]─────────────────────────────────────────────────────────╮ > │ "/// a │ > │ /// │ > │ /// b │ > │ │ > │ /// c │ > │ let a = 1 │ > │ │ > │ /// e │ > │ let a = 3 │ > │ " │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## parse │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline parse output input = > match run blocks input with > | Success (blocks, _, _) -> > let blocks = > blocks > |> List.filter (fun block -> > block.magic |> kernelOutputs |> List.contains output || > block.magic = Markdown > ) > > match blocks with > | { magic = Markdown; content = content } :: _ > when output = Fs > && content |> SpiralSm.starts_with "# " > && content |> SpiralSm.ends_with ")" > -> > let inline indentBlock (block : Block) = > { block with > content = > block.content > |> SpiralSm.split "\n" > |> Array.fold > (fun (lines, isMultiline) line -> > let trimmedLine = line |> SpiralSm.trim > if trimmedLine = "" > then "" :: lines, isMultiline > else > let inline singleQuoteLine () = > trimmedLine |> Seq.sumBy ((=) '"' >> > System.Convert.ToInt32) = 1 > && trimmedLine |> SpiralSm.contains > @"'""'" |> not > && trimmedLine |> SpiralSm.ends_with "{" > |> not > && trimmedLine |> SpiralSm.ends_with > "{|" |> not > && trimmedLine |> SpiralSm.starts_with > "}" |> not > && trimmedLine |> SpiralSm.starts_with > "|}" |> not > > match isMultiline, trimmedLine |> > SpiralSm.split_string [[| $"{q}{q}{q}" |]] with > | false, [[| _; _ |]] -> > $" {line}" :: lines, true > > | true, [[| _; _ |]] -> > line :: lines, false > > | false, _ when singleQuoteLine () -> > $" {line}" :: lines, true > > | false, _ when line |> SpiralSm.starts_with > "#" && block.magic = Fsharp -> > line :: lines, false > > | false, _ -> > $" {line}" :: lines, false > > | true, _ when singleQuoteLine () && line |> > SpiralSm.starts_with " " -> > $" {line}" :: lines, false > > | true, _ when singleQuoteLine () -> > line :: lines, false > > | true, _ -> > line :: lines, true > ) > ([[]], false) > |> fst > |> List.rev > |> SpiralSm.concat "\n" > } > > let moduleName, namespaceName = > System.Text.RegularExpressions.Regex.Match (content, @"# (.*) > \((.*)\)$") > |> fun m -> m.Groups.[[1]].Value, m.Groups.[[2]].Value > > let moduleBlock = > { > magic = Fsharp > content = > $"#if !INTERACTIVE > namespace {namespaceName} > #endif > > module {moduleName} =" > } > > blocks > |> List.indexed > |> List.fold > (fun blocks (index, block) -> > match index with > | 0 -> blocks > | 1 -> indentBlock block :: moduleBlock :: blocks > | _ -> indentBlock block :: blocks > ) > [[]] > |> List.rev > | _ -> blocks > |> Result.Ok > | Failure (errorMsg, _, _) -> Result.Error errorMsg > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let example1 = > $"""#!meta > > {{"kernelInfo":{{"defaultKernelName":"fsharp","items":[[{{"aliases":[[]],"name": > "fsharp"}},{{"aliases":[[]],"name":"fsharp"}}]]}}}} > > \#!markdown > > # TestModule (TestNamespace) > > \#!fsharp > > \#!import file.dib > > \#!fsharp > > \#r "nuget:Expecto" > > \#!markdown > > ## ParserLibrary > > \#!fsharp > > open System > > \#!markdown > > ## x (test) > > \#!fsharp > > //// ignore > > let x = 1 > > \#!spiral > > //// test > > inl x = 1i32 > > \#!spiral > > //// real > > inl x = 2i32 > > \#!spiral > > inl x = 3i32 > > \#!markdown > > ### TextInput > > \#!fsharp > > let str1 = "abc > def" > > let str2 = > "abc\ > def" > > let str3 = > $"1{{ > 1 > }}1" > > let str4 = > $"1{{({{| > a = 1 > |}}).a}}1" > > let str5 = > "abc \ > def" > > let x = > match '"' with > | '"' -> true > | _ -> false > > let long1 = {q}{q}{q}a{q}{q}{q} > > let long2 = > {q}{q}{q} > a > {q}{q}{q} > > \#!fsharp > > type Position = > {{ > #if INTERACTIVE > line : string > #else > line : int > #endif > column : int > }}""" > |> escapeCell > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > example1 > |> parse Fs > |> Result.toOption > |> Option.get > |> (formatBlocks Fs) > |> _assertEqual $"""#if !INTERACTIVE > namespace TestNamespace > #endif > > module TestModule = > > /// ## ParserLibrary > open System > > /// ### TextInput > let str1 = "abc > def" > > let str2 = > "abc\ > def" > > let str3 = > $"1{{ > 1 > }}1" > > let str4 = > $"1{{({{| > a = 1 > |}}).a}}1" > > let str5 = > "abc \ > def" > > let x = > match '"' with > | '"' -> true > | _ -> false > > let long1 = {q}{q}{q}a{q}{q}{q} > > let long2 = > {q}{q}{q} > a > {q}{q}{q} > > type Position = > {{ > #if INTERACTIVE > line : string > #else > line : int > #endif > column : int > }} > """ > > ╭─[ 242.77ms - stdout ]────────────────────────────────────────────────────────╮ > │ "#if !INTERACTIVE │ > │ namespace TestNamespace │ > │ #endif │ > │ │ > │ module TestModule = │ > │ │ > │ /// ## ParserLibrary │ > │ open System │ > │ │ > │ /// ### TextInput │ > │ let str1 = "abc │ > │ def" │ > │ │ > │ let str2 = │ > │ "abc\ │ > │ def" │ > │ │ > │ let str3 = │ > │ $"1{ │ > │ 1 │ > │ }1" │ > │ │ > │ let str4 = │ > │ $"1{({| │ > │ a = 1 │ > │ |}).a}1" │ > │ │ > │ let str5 = │ > │ "abc \ │ > │ def" │ > │ │ > │ let x = │ > │ match '"' with │ > │ | '"' -> true │ > │ | _ -> false │ > │ │ > │ let long1 = """a""" │ > │ │ > │ let long2 = │ > │ """ │ > │ a │ > │ """ │ > │ │ > │ type Position = │ > │ { │ > │ #if INTERACTIVE │ > │ line : string │ > │ #else │ > │ line : int │ > │ #endif │ > │ column : int │ > │ } │ > │ " │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > example1 > |> parse Md > |> Result.toOption > |> Option.get > |> (formatBlocks Md) > |> _assertEqual "# TestModule (TestNamespace) > > ## ParserLibrary > > ### TextInput > " > > ╭─[ 183.92ms - stdout ]────────────────────────────────────────────────────────╮ > │ "# TestModule (TestNamespace) │ > │ │ > │ ## ParserLibrary │ > │ │ > │ ### TextInput │ > │ " │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > example1 > |> parse Spi > |> Result.toOption > |> Option.get > |> (formatBlocks Spi) > |> _assertEqual "/// # TestModule (TestNamespace) > > /// ## ParserLibrary > inl x = 3i32 > > /// ### TextInput > " > > ╭─[ 205.62ms - stdout ]────────────────────────────────────────────────────────╮ > │ "/// # TestModule (TestNamespace) │ > │ │ > │ /// ## ParserLibrary │ > │ inl x = 3i32 │ > │ │ > │ /// ### TextInput │ > │ " │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > example1 > |> parse Spir > |> Result.toOption > |> Option.get > |> (formatBlocks Spir) > |> _assertEqual "/// # TestModule (TestNamespace) > > /// ## ParserLibrary > inl x = 2i32 > > /// ### TextInput > " > > ╭─[ 213.81ms - stdout ]────────────────────────────────────────────────────────╮ > │ "/// # TestModule (TestNamespace) │ > │ │ > │ /// ## ParserLibrary │ > │ inl x = 2i32 │ > │ │ > │ /// ### TextInput │ > │ " │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## parseDibCode │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline parseDibCode output file = async { > trace Debug > (fun () -> "parseDibCode") > (fun () -> $"output: {output} / file: {file} / {_locals ()}") > let! input = file |> SpiralFileSystem.read_all_text_async > match parse output input with > | Result.Ok blocks -> return blocks |> formatBlocks output > | Result.Error msg -> return failwith msg > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## writeDibCode │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline writeDibCode output path = async { > trace Debug > (fun () -> "writeDibCode") > (fun () -> $"output: {output} / path: {path} / {_locals ()}") > let! result = parseDibCode output path > let pathDir = path |> System.IO.Path.GetDirectoryName > let fileNameWithoutExt = > match output, path |> System.IO.Path.GetFileNameWithoutExtension with > | Spir, fileNameWithoutExt -> $"{fileNameWithoutExt}_real" > | _, fileNameWithoutExt -> fileNameWithoutExt > let outputPath = pathDir </> $"{fileNameWithoutExt}.{output |> string |> > SpiralSm.to_lower}" > do! result |> SpiralFileSystem.write_all_text_async outputPath > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## Arguments │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > [[<RequireQualifiedAccess>]] > type Arguments = > | [[<Argu.ArguAttributes.MainCommand; Argu.ArguAttributes.Mandatory>]] > File of file : string * Output > > interface Argu.IArgParserTemplate with > member s.Usage = > match s with > | File _ -> nameof File > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > Argu.ArgumentParser.Create<Arguments>().PrintUsage () > > ╭─[ 141.85ms - return value ]──────────────────────────────────────────────────╮ > │ "USAGE: dotnet-repl [--help] <file> <fs|md|spi|spir> │ > │ │ > │ FILE: │ > │ │ > │ <file> <fs|md|spi|spir> │ > │ File │ > │ │ > │ OPTIONS: │ > │ │ > │ --help display this list of options. │ > │ " │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## main │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let main args = > let argsMap = args |> Runtime.parseArgsMap<Arguments> > > let files = > argsMap.[[nameof Arguments.File]] > |> List.map (function > | Arguments.File (path, output) -> path, output > ) > > files > |> List.map (fun (path, output) -> path |> writeDibCode output) > |> Async.Parallel > |> Async.Ignore > |> Async.runWithTimeout 30000 > |> function > | Some () -> 0 > | None -> 1 > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let args = > System.Environment.GetEnvironmentVariable "ARGS" > |> SpiralRuntime.split_args > |> Result.toArray > |> Array.collect id > > match args with > | [[||]] -> 0 > | args -> if main args = 0 then 0 else failwith "main failed" > > ╭─[ 243.05ms - return value ]──────────────────────────────────────────────────╮ > │ <div class="dni-plaintext"><pre>0 │ > │ </pre></div><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 247.04ms - stdout ]────────────────────────────────────────────────────────╮ > │ 00:00:08 debug #1 writeDibCode / output: Fs / path: DibParser.dib │ > │ 00:00:08 debug #2 parseDibCode / output: Fs / file: DibParser.dib │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:35 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 44158 } 00:00:35 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ "nbconvert", "c:/home/git/polyglot/apps/parser/DibParser.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark", ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/apps/parser/DibParser.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:37 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/parser/DibParser.dib.ipynb to html 00:00:37 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:00:37 verbose #7 ! validate(nb) 00:00:40 verbose #8 ! [NbConvertApp] Writing 378847 bytes to c:\home\git\polyglot\apps\parser\DibParser.dib.html 00:00:40 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 651 } 00:00:40 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 651 } 00:00:40 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ "-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/parser/DibParser.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/parser/DibParser.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:41 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:00:41 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:00:41 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 44868 } 00:00:00 debug #1 persistCodeProject / packages: [Argu; FParsec; FSharp.Control.AsyncSeq; ... ] / modules: [lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / name: DibParser / hash: / code.Length: 10861 00:00:00 debug #2 buildProject / fullPath: C:\home\git\polyglot\target\Builder\DibParser\DibParser.fsproj 00:00:00 debug #1 runtime.execute_with_options_async / { options = { command = dotnet publish "C:\home\git\polyglot\target/Builder\DibParser\DibParser.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\parser\dist" --runtime linux-x64; cancellation_token = None; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = Some "C:\home\git\polyglot\target\Builder\DibParser" } } 00:00:01 verbose #2 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET 00:00:01 verbose #3 > Determining projects to restore... 00:00:02 verbose #4 > Restored C:\home\git\polyglot\target\Builder\DibParser\DibParser.fsproj (in 695 ms). 00:00:03 verbose #5 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\Builder\DibParser\DibParser.fsproj] 00:00:20 verbose #6 > DibParser -> C:\home\git\polyglot\target\Builder\DibParser\bin\Release\net9.0\linux-x64\DibParser.dll 00:00:22 verbose #7 > DibParser -> C:\home\git\polyglot\apps\parser\dist\ 00:00:22 debug #8 runtime.execute_with_options_async / { exit_code = 0; output_length = 680 } 00:00:22 debug #9 runtime.execute_with_options_async / { options = { command = dotnet publish "C:\home\git\polyglot\target/Builder\DibParser\DibParser.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\parser\dist" --runtime win-x64; cancellation_token = None; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = Some "C:\home\git\polyglot\target\Builder\DibParser" } } 00:00:22 verbose #10 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET 00:00:23 verbose #11 > Determining projects to restore... 00:00:24 verbose #12 > Restored C:\home\git\polyglot\target\Builder\DibParser\DibParser.fsproj (in 505 ms). 00:00:24 verbose #13 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\Builder\DibParser\DibParser.fsproj] 00:00:42 verbose #14 > DibParser -> C:\home\git\polyglot\target\Builder\DibParser\bin\Release\net9.0\win-x64\DibParser.dll 00:00:43 verbose #15 > DibParser -> C:\home\git\polyglot\apps\parser\dist\ 00:00:43 debug #16 runtime.execute_with_options_async / { exit_code = 0; output_length = 678 } 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "JsonParser.dib"])) } 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ "repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/parser/JsonParser.dib", "--output-path", "c:/home/git/polyglot/apps/parser/JsonParser.dib.ipynb", ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/parser/JsonParser.dib" --output-path "c:/home/git/polyglot/apps/parser/JsonParser.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ # JsonParser (Polyglot) │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > open Common > open Parser > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## JsonParser │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > (* > // -------------------------------- > JSON spec from http://www.json.org/ > // -------------------------------- > > The JSON spec is available at [[json.org]](http://www.json.org/). I'll paraphase > it here: > > * A `value` can be a `string` or a `number` or a `bool` or `null` or an `object` > or an `array`. > * These structures can be nested. > * A `string` is a sequence of zero or more Unicode characters, wrapped in double > quotes, using backslash escapes. > * A `number` is very much like a C or Java number, except that the octal and > hexadecimal formats are not used. > * A `boolean` is the literal `true` or `false` > * A `null` is the literal `null` > * An `object` is an unordered set of name/value pairs. > * An object begins with { (left brace) and ends with } (right brace). > * Each name is followed by : (colon) and the name/value pairs are separated by > , (comma). > * An `array` is an ordered collection of values. > * An array begins with [[ (left bracket) and ends with ]] (right bracket). > * Values are separated by , (comma). > * Whitespace can be inserted between any pair of tokens. > *) > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let inline parserEqual (expected : ParseResult<'a>) (actual : ParseResult<'a * > Input>) = > match actual, expected with > | Success (_actual, _), Success _expected -> > printResult actual > _actual |> _assertEqual _expected > | Failure (l1, e1, p1), Failure (l2, e2, p2) when l1 = l2 && e1 = e2 && p1 = > p2 -> > printResult actual > | _ -> > printfn $"Actual: {actual}" > printfn $"Expected: {expected}" > failwith "Parse failed" > actual > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### JValue │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > type JValue = > | JString of string > | JNumber of float > | JBool of bool > | JNull > | JObject of Map<string, JValue> > | JArray of JValue list > > ── fsharp ────────────────────────────────────────────────────────────────────── > let jValue, jValueRef = createParserForwardedToRef<JValue> () > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### jNull │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let jNull = > pstring "null" > >>% JNull > <?> "null" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > jValueRef <| > choice > [[ > jNull > ]] > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jValue "null" > |> parserEqual (Success JNull) > > ╭─[ 310.24ms - return value ]──────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNull, { lines = [ │ > │ |"null"|]<br /> position = { line = 0<br /> │ > │ column = 4 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNull, { lines = [|"null"|]<br /> │ > │ position = { line = 0<br /> column = 4 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNull</code></span></summary><div><table><thead> │ > │ <tr></tr></thead><tbody><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>{ lines = [|"null"|]<br /> position = │ > │ { line = 0<br /> column = 4 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ null │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 4 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>4 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 326.43ms - stdout ]────────────────────────────────────────────────────────╮ > │ JNull │ > │ JNull │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNull "nulp" > |> parserEqual ( > Failure ( > "null", > "Unexpected 'p'", > { currentLine = "nulp"; line = 0; column = 3 } > ) > ) > > ╭─[ 82.07ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Failure ("null", "Unexpected │ > │ 'p'", { currentLine = "nulp"<br /> │ > │ line = 0<br /> column = 3 │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>"null" │ > │ </pre></div></td></tr><tr><td>Item2</td><td><div │ > │ class="dni-plaintext"><pre>"Unexpected 'p'" │ > │ </pre></div></td></tr><tr><td>Item3</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ > │ currentLine = "nulp"<br /> line = 0<br /> column = 3 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ currentLine</td><td><div class="dni-plaintext"><pre>"nulp" │ > │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>3 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ > │ ccess</td><td><div class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 88.01ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Line:0 Col:3 Error parsing null │ > │ nulp │ > │ ^Unexpected 'p' │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### jBool │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let jBool = > let jtrue = > pstring "true" > >>% JBool true > let jfalse = > pstring "false" > >>% JBool false > > jtrue <|> jfalse > <?> "bool" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > jValueRef <| > choice > [[ > jNull > jBool > ]] > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jBool "true" > |> parserEqual (Success (JBool true)) > > ╭─[ 62.37ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JBool true, { lines = [ │ > │ |"true"|]<br /> position = { line = 0<br /> │ > │ column = 4 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JBool true, { lines = [|"true"|]<br │ > │ /> position = { line = 0<br /> column = 4 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JBool │ > │ true</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr>< │ > │ td>Item</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>{ lines = [|"true"|]<br /> position = │ > │ { line = 0<br /> column = 4 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ true │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 4 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>4 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 70.28ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JBool true │ > │ JBool true │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jBool "false" > |> parserEqual (Success (JBool false)) > > ╭─[ 60.96ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JBool false, { lines = [ │ > │ |"false"|]<br /> position = { line = 0<br │ > │ /> column = 5 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JBool false, { lines = [|"false"|]<br │ > │ /> position = { line = 0<br /> column = 5 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JBool │ > │ false</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr> │ > │ <td>Item</td><td><div class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>{ lines = [|"false"|]<br /> position │ > │ = { line = 0<br /> column = 5 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ false │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 5 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>5 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 70.54ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JBool false │ > │ JBool false │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jBool "truX" > |> parserEqual ( > Failure ( > "bool", > "Unexpected 't'", > { currentLine = "truX"; line = 0; column = 0 } > ) > ) > > ╭─[ 51.62ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Failure ("bool", "Unexpected │ > │ 't'", { currentLine = "truX"<br /> │ > │ line = 0<br /> column = 0 │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>"bool" │ > │ </pre></div></td></tr><tr><td>Item2</td><td><div │ > │ class="dni-plaintext"><pre>"Unexpected 't'" │ > │ </pre></div></td></tr><tr><td>Item3</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ > │ currentLine = "truX"<br /> line = 0<br /> column = 0 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ currentLine</td><td><div class="dni-plaintext"><pre>"truX" │ > │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ > │ ccess</td><td><div class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 57.18ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Line:0 Col:0 Error parsing bool │ > │ truX │ > │ ^Unexpected 't' │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### jUnescapedChar │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let jUnescapedChar = > satisfy (fun ch -> ch <> '\\' && ch <> '\"') "char" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jUnescapedChar "a" > |> parserEqual (Success 'a') > > ╭─[ 88.13ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success ('a', { lines = [ │ > │ |"a"|]<br /> position = { line = 0<br /> │ > │ column = 1 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(a, { lines = [|"a"|]<br /> position │ > │ = { line = 0<br /> column = 1 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>'a' │ > │ </pre></div></td></tr><tr><td>Item2</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines = [ │ > │ |"a"|]<br /> position = { line = 0<br /> column = 1 │ > │ } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ a │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 1 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>1 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 97.20ms - stdout ]─────────────────────────────────────────────────────────╮ > │ 'a' │ > │ 'a' │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jUnescapedChar "\\" > |> parserEqual ( > Failure ( > "char", > "Unexpected '\\'", > { currentLine = "\\"; line = 0; column = 0 } > ) > ) > > ╭─[ 69.39ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Failure ("char", "Unexpected │ > │ '\'", { currentLine = "\"<br /> │ > │ line = 0<br /> column = 0 │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>"char" │ > │ </pre></div></td></tr><tr><td>Item2</td><td><div │ > │ class="dni-plaintext"><pre>"Unexpected '\'" │ > │ </pre></div></td></tr><tr><td>Item3</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ > │ currentLine = "\"<br /> line = 0<br /> column = 0 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ currentLine</td><td><div class="dni-plaintext"><pre>"\" │ > │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ > │ ccess</td><td><div class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 76.13ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Line:0 Col:0 Error parsing char │ > │ \ │ > │ ^Unexpected '\' │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### jEscapedChar │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let jEscapedChar = > [[ > ("\\\"",'\"') > ("\\\\",'\\') > ("\\/",'/') > ("\\b",'\b') > ("\\f",'\f') > ("\\n",'\n') > ("\\r",'\r') > ("\\t",'\t') > ]] > |> List.map (fun (toMatch, result) -> > pstring toMatch >>% result > ) > |> choice > <?> "escaped char" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jEscapedChar "\\\\" > |> parserEqual (Success '\\') > > ╭─[ 57.56ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success ('\\', { lines = [ │ > │ |"\\"|]<br /> position = { line = 0<br /> │ > │ column = 2 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(\, { lines = [|"\\"|]<br /> position │ > │ = { line = 0<br /> column = 2 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>'\\' │ > │ </pre></div></td></tr><tr><td>Item2</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines = [ │ > │ |"\\"|]<br /> position = { line = 0<br /> column = │ > │ 2 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ \\ │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 2 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>2 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 64.46ms - stdout ]─────────────────────────────────────────────────────────╮ > │ '\\' │ > │ '\\' │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jEscapedChar "\\t" > |> parserEqual (Success '\t') > > ╭─[ 53.31ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success ('\009', { lines = [ │ > │ |"\t"|]<br /> position = { line = 0<br /> │ > │ column = 2 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>( , { lines = [|"\t"|]<br /> position = │ > │ { line = 0<br /> column = 2 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>'\009' │ > │ </pre></div></td></tr><tr><td>Item2</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines = [ │ > │ |"\t"|]<br /> position = { line = 0<br /> column = │ > │ 2 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ \t │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 2 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>2 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 61.77ms - stdout ]─────────────────────────────────────────────────────────╮ > │ '\009' │ > │ '\009' │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jEscapedChar @"\\" > |> parserEqual (Success '\\') > > ╭─[ 61.43ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success ('\\', { lines = [ │ > │ |"\\"|]<br /> position = { line = 0<br /> │ > │ column = 2 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(\, { lines = [|"\\"|]<br /> position │ > │ = { line = 0<br /> column = 2 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>'\\' │ > │ </pre></div></td></tr><tr><td>Item2</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines = [ │ > │ |"\\"|]<br /> position = { line = 0<br /> column = │ > │ 2 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ \\ │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 2 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>2 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 69.92ms - stdout ]─────────────────────────────────────────────────────────╮ > │ '\\' │ > │ '\\' │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jEscapedChar @"\n" > |> parserEqual (Success '\n') > > ╭─[ 48.17ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success ('\010', { lines = [|"<br │ > │ />"|]<br /> position = { line = 0<br /> │ > │ column = 2 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(<br />, { lines = [|"<br />"|]<br /> │ > │ position = { line = 0<br /> column = 2 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>'\010' │ > │ </pre></div></td></tr><tr><td>Item2</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines = [ │ > │ |"<br />"|]<br /> position = { line = 0<br /> │ > │ column = 2 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ <br /> │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 2 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>2 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 53.70ms - stdout ]─────────────────────────────────────────────────────────╮ > │ '\010' │ > │ '\010' │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jEscapedChar "a" > |> parserEqual ( > Failure ( > "escaped char", > "Unexpected 'a'", > { currentLine = "a"; line = 0; column = 0 } > ) > ) > > ╭─[ 34.01ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Failure ("escaped char", │ > │ "Unexpected 'a'", { currentLine = "a"<br /> │ > │ line = 0<br /> column = 0 │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>"escaped char" │ > │ </pre></div></td></tr><tr><td>Item2</td><td><div │ > │ class="dni-plaintext"><pre>"Unexpected 'a'" │ > │ </pre></div></td></tr><tr><td>Item3</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ > │ currentLine = "a"<br /> line = 0<br /> column = 0 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ currentLine</td><td><div class="dni-plaintext"><pre>"a" │ > │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ > │ ccess</td><td><div class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 39.65ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Line:0 Col:0 Error parsing escaped char │ > │ a │ > │ ^Unexpected 'a' │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### jUnicodeChar │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let jUnicodeChar = > let backslash = pchar '\\' > let uChar = pchar 'u' > let hexdigit = anyOf ([[ '0' .. '9' ]] @ [[ 'A' .. 'F' ]] @ [[ 'a' .. 'f' > ]]) > let fourHexDigits = hexdigit .>>. hexdigit .>>. hexdigit .>>. hexdigit > > let inline convertToChar (((h1, h2), h3), h4) = > let str = $"%c{h1}%c{h2}%c{h3}%c{h4}" > Int32.Parse (str, Globalization.NumberStyles.HexNumber) |> char > > backslash >>. uChar >>. fourHexDigits > |>> convertToChar > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jUnicodeChar "\\u263A" > |> parserEqual (Success '☺') > > ╭─[ 66.09ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success ('☺', { lines = [ │ > │ |"\u263A"|]<br /> position = { line = 0<br /> │ > │ column = 6 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(☺, { lines = [|"\u263A"|]<br /> │ > │ position = { line = 0<br /> column = 6 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>'☺' │ > │ </pre></div></td></tr><tr><td>Item2</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines = [ │ > │ |"\u263A"|]<br /> position = { line = 0<br /> │ > │ column = 6 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ \u263A │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 6 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>6 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 72.79ms - stdout ]─────────────────────────────────────────────────────────╮ > │ '☺' │ > │ '☺' │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### jString │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let quotedString = > let quote = pchar '\"' <?> "quote" > let jchar = jUnescapedChar <|> jEscapedChar <|> jUnicodeChar > > quote >>. manyChars jchar .>> quote > > ── fsharp ────────────────────────────────────────────────────────────────────── > let jString = > quotedString > |>> JString > <?> "quoted string" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > jValueRef <| > choice > [[ > jNull > jBool > jString > ]] > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jString "\"\"" > |> parserEqual (Success (JString "")) > > ╭─[ 72.91ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JString "", { lines = [ │ > │ |""""|]<br /> position = { line = │ > │ 0<br /> column = 2 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JString "", { lines = [ │ > │ |""""|]<br /> position = { line = 0<br /> │ > │ column = 2 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JString │ > │ ""</code></span></summary><div><table><thead><tr></tr></thead><tbo │ > │ dy><tr><td>Item</td><td><div class="dni-plaintext"><pre>"" │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><su...span │ > │ class="dni-code-hint"><code>{ lines = [|""""|]<br /> │ > │ position = { line = 0<br /> column = 2 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ "" │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 2 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>2 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 81.70ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JString "" │ > │ JString "" │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jString "\"a\"" > |> parserEqual (Success (JString "a")) > > ╭─[ 46.75ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JString "a", { lines = [ │ > │ |""a""|]<br /> position = { line │ > │ = 0<br /> column = 3 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JString "a", { lines = [ │ > │ |""a""|]<br /> position = { line = 0<br /> │ > │ column = 3 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JString │ > │ "a"</code></span></summary><div><table><thead><tr></tr></thead><tb │ > │ ody><tr><td>Item</td><td><div class="dni-plaintext"><pre>"a" │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treev...an class="dni-code-hint"><code>{ lines │ > │ = [|""a""|]<br /> position = { line = 0<br /> │ > │ column = 3 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ "a" │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 3 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>3 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 53.72ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JString "a" │ > │ JString "a" │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jString "\"ab\"" > |> parserEqual (Success (JString "ab")) > > ╭─[ 54.09ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JString "ab", { lines = [ │ > │ |""ab""|]<br /> position = { │ > │ line = 0<br /> column = 4 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JString "ab", { lines = [ │ > │ |""ab""|]<br /> position = { line = 0<br /> │ > │ column = 4 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JString │ > │ "ab"</code></span></summary><div><table><thead><tr></tr></thead><t │ > │ body><tr><td>Item</td><td><div class="dni-plaintext"><pre>"ab" │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="d... class="dni-code-hint"><code>{ lines = [ │ > │ |""ab""|]<br /> position = { line = 0<br /> │ > │ column = 4 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ "ab" │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 4 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>4 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 66.75ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JString "ab" │ > │ JString "ab" │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jString "\"ab\\tde\"" > |> parserEqual (Success (JString "ab\tde")) > > ╭─[ 64.24ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JString "ab de", { lines = [ │ > │ |""ab\tde""|]<br /> position │ > │ = { line = 0<br /> column = 8 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JString "ab de", { lines = [ │ > │ |""ab\tde""|]<br /> position = { line = 0<br /> │ > │ column = 8 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JString "ab │ > │ de"</code></span></summary><div><table><thead><tr></tr></thead><tbody>< │ > │ tr><td>Item</td><td><div class="dni-plaintext"><pre>"ab de" │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2...dni-code-hint"><code>{ lines = [|""ab\tde""|]<br /> │ > │ position = { line = 0<br /> column = 8 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ "ab\tde" │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 8 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>8 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 72.93ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JString "ab de" │ > │ JString "ab de" │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jString "\"ab\\u263Ade\"" > |> parserEqual (Success (JString "ab☺de")) > > ╭─[ 65.87ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JString "ab☺de", { lines = [ │ > │ |""ab\u263Ade""|]<br /> │ > │ position = { line = 0<br /> column = │ > │ 12 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JString "ab☺de", { lines = [ │ > │ |""ab\u263Ade""|]<br /> position = { line = 0<br /> │ > │ column = 12 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JString │ > │ "ab☺de"</code></span></summary><div><table><thead><tr></tr></thead │ > │ ><tbody><tr><td>Item</td><td><div │ > │ class="dni-plaintext"><pre>"ab☺de" │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr...nt"><c │ > │ ode>{ lines = [|""ab\u263Ade""|]<br /> position = { │ > │ line = 0<br /> column = 12 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ "ab\u263Ade" │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 12 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>12 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 76.42ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JString "ab☺de" │ > │ JString "ab☺de" │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### jNumber │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let jNumber = > let optSign = opt (pchar '-') > > let zero = pstring "0" > > let digitOneNine = > satisfy (fun ch -> Char.IsDigit ch && ch <> '0') "1-9" > > let digit = > satisfy Char.IsDigit "digit" > > let point = pchar '.' > > let e = pchar 'e' <|> pchar 'E' > > let optPlusMinus = opt (pchar '-' <|> pchar '+') > > let nonZeroInt = > digitOneNine .>>. manyChars digit > |>> fun (first, rest) -> string first + rest > > let intPart = zero <|> nonZeroInt > > let fractionPart = point >>. manyChars1 digit > > let exponentPart = e >>. optPlusMinus .>>. manyChars1 digit > > let inline (|>?) opt f = > match opt with > | None -> "" > | Some x -> f x > > let inline convertToJNumber (((optSign, intPart), fractionPart), expPart) = > let signStr = > optSign > |>? string > > let fractionPartStr = > fractionPart > |>? (fun digits -> "." + digits) > > let expPartStr = > expPart > |>? fun (optSign, digits) -> > let sign = optSign |>? string > "e" + sign + digits > > (signStr + intPart + fractionPartStr + expPartStr) > |> float > |> JNumber > > optSign .>>. intPart .>>. opt fractionPart .>>. opt exponentPart > |>> convertToJNumber > <?> "number" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > jValueRef <| > choice > [[ > jNull > jBool > jString > jNumber > ]] > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber "123" > |> parserEqual (Success (JNumber 123.0)) > > ╭─[ 96.30ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNumber 123.0, { lines = [ │ > │ |"123"|]<br /> position = { line = 0<br │ > │ /> column = 3 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNumber 123.0, { lines = [|"123"|]<br │ > │ /> position = { line = 0<br /> column = 3 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ 123.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr> │ > │ <td>Item</td><td><div class="dni-plaintext"><pre>123.0 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>{ lines = [|"123"|]<br /> position = │ > │ { line = 0<br /> column = 3 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ 123 │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 3 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>3 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 105.94ms - stdout ]────────────────────────────────────────────────────────╮ > │ JNumber 123.0 │ > │ JNumber 123.0 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber "-123" > |> parserEqual (Success (JNumber -123.0)) > > ╭─[ 65.20ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNumber -123.0, { lines = [ │ > │ |"-123"|]<br /> position = { line = 0<br │ > │ /> column = 4 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNumber -123.0, { lines = [ │ > │ |"-123"|]<br /> position = { line = 0<br /> column │ > │ = 4 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ -123.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr │ > │ ><td>Item</td><td><div class="dni-plaintext"><pre>-123.0 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>{ lines = [|"-123"|]<br /> position = │ > │ { line = 0<br /> column = 4 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ -123 │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 4 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>4 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 73.27ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JNumber -123.0 │ > │ JNumber -123.0 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber "123.4" > |> parserEqual (Success (JNumber 123.4)) > > ╭─[ 60.60ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNumber 123.4, { lines = [ │ > │ |"123.4"|]<br /> position = { line = 0<br │ > │ /> column = 5 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNumber 123.4, { lines = [ │ > │ |"123.4"|]<br /> position = { line = 0<br /> column │ > │ = 5 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ 123.4</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr> │ > │ <td>Item</td><td><div class="dni-plaintext"><pre>123.4 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>{ lines = [|"123.4"|]<br /> position │ > │ = { line = 0<br /> column = 5 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ 123.4 │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 5 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>5 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 67.64ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JNumber 123.4 │ > │ JNumber 123.4 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber "-123." > |> parserEqual (Success (JNumber -123.0)) > > ╭─[ 40.47ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNumber -123.0, { lines = [ │ > │ |"-123."|]<br /> position = { line = │ > │ 0<br /> column = 4 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNumber -123.0, { lines = [ │ > │ |"-123."|]<br /> position = { line = 0<br /> column │ > │ = 4 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ -123.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr │ > │ ><td>Item</td><td><div class="dni-plaintext"><pre>-123.0 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>{ lines = [|"-123."|]<br /> position │ > │ = { line = 0<br /> column = 4 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ -123. │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 4 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>4 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 46.72ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JNumber -123.0 │ > │ JNumber -123.0 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber "00.1" > |> parserEqual (Success (JNumber 0.0)) > > ╭─[ 69.67ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNumber 0.0, { lines = [ │ > │ |"00.1"|]<br /> position = { line = 0<br /> │ > │ column = 1 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNumber 0.0, { lines = [|"00.1"|]<br │ > │ /> position = { line = 0<br /> column = 1 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ 0.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><t │ > │ d>Item</td><td><div class="dni-plaintext"><pre>0.0 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>{ lines = [|"00.1"|]<br /> position = │ > │ { line = 0<br /> column = 1 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ 00.1 │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 0<br /> column = 1 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>1 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 81.42ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JNumber 0.0 │ > │ JNumber 0.0 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let jNumber_ = jNumber .>> spaces1 > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber_ "123" > |> parserEqual (Success (JNumber 123.0)) > > ╭─[ 51.74ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNumber 123.0, { lines = [ │ > │ |"123"|]<br /> position = { line = 1<br │ > │ /> column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNumber 123.0, { lines = [|"123"|]<br │ > │ /> position = { line = 1<br /> column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ 123.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr> │ > │ <td>Item</td><td><div class="dni-plaintext"><pre>123.0 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>{ lines = [|"123"|]<br /> position = │ > │ { line = 1<br /> column = 0 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ 123 │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 1<br /> column = 0 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>1 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 58.17ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JNumber 123.0 │ > │ JNumber 123.0 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber_ "-123" > |> parserEqual (Success (JNumber -123.0)) > > ╭─[ 60.19ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNumber -123.0, { lines = [ │ > │ |"-123"|]<br /> position = { line = 1<br │ > │ /> column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNumber -123.0, { lines = [ │ > │ |"-123"|]<br /> position = { line = 1<br /> column │ > │ = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ -123.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr │ > │ ><td>Item</td><td><div class="dni-plaintext"><pre>-123.0 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>{ lines = [|"-123"|]<br /> position = │ > │ { line = 1<br /> column = 0 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ -123 │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 1<br /> column = 0 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>1 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 69.09ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JNumber -123.0 │ > │ JNumber -123.0 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber_ "-123." > |> parserEqual ( > Failure ( > "number andThen many1 whitespace", > "Unexpected '.'", > { currentLine = "-123."; line = 0; column = 4 } > ) > ) > > ╭─[ 47.24ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Failure<br /> ("number andThen many1 │ > │ whitespace", "Unexpected '.'", { currentLine = │ > │ "-123."<br /> │ > │ line = 0<br /> │ > │ column = 4 │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>"number andThen many1 │ > │ whitespace" │ > │ </pre></div></td></tr><tr><td>Item2</td><td><div │ > │ class="dni-plaintext"><pre>"Unexpected '.'" │ > │ </pre></div></td></tr><tr><td>Item3</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ > │ currentLine = "-123."<br /> line = 0<br /> column = 4 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ currentLine</td><td><div class="dni-plaintext"><pre>"-123." │ > │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>4 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ > │ ccess</td><td><div class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 52.26ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Line:0 Col:4 Error parsing number andThen many1 whitespace │ > │ -123. │ > │ ^Unexpected '.' │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber_ "123.4" > |> parserEqual (Success (JNumber 123.4)) > > ╭─[ 50.62ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNumber 123.4, { lines = [ │ > │ |"123.4"|]<br /> position = { line = 1<br │ > │ /> column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNumber 123.4, { lines = [ │ > │ |"123.4"|]<br /> position = { line = 1<br /> column │ > │ = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ 123.4</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr> │ > │ <td>Item</td><td><div class="dni-plaintext"><pre>123.4 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>{ lines = [|"123.4"|]<br /> position │ > │ = { line = 1<br /> column = 0 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ 123.4 │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 1<br /> column = 0 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>1 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 57.79ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JNumber 123.4 │ > │ JNumber 123.4 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber_ "00.4" > |> parserEqual ( > Failure ( > "number andThen many1 whitespace", > "Unexpected '0'", > { currentLine = "00.4"; line = 0; column = 1 } > ) > ) > > ╭─[ 44.86ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Failure<br /> ("number andThen many1 │ > │ whitespace", "Unexpected '0'", { currentLine = │ > │ "00.4"<br /> │ > │ line = 0<br /> │ > │ column = 1 │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>"number andThen many1 │ > │ whitespace" │ > │ </pre></div></td></tr><tr><td>Item2</td><td><div │ > │ class="dni-plaintext"><pre>"Unexpected '0'" │ > │ </pre></div></td></tr><tr><td>Item3</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ > │ currentLine = "00.4"<br /> line = 0<br /> column = 1 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ currentLine</td><td><div class="dni-plaintext"><pre>"00.4" │ > │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>1 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ > │ ccess</td><td><div class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 52.51ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Line:0 Col:1 Error parsing number andThen many1 whitespace │ > │ 00.4 │ > │ ^Unexpected '0' │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber_ "123e4" > |> parserEqual (Success (JNumber 1230000.0)) > > ╭─[ 65.32ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNumber 1230000.0, { lines = [ │ > │ |"123e4"|]<br /> position = { line = │ > │ 1<br /> column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNumber 1230000.0, { lines = [ │ > │ |"123e4"|]<br /> position = { line = 1<br /> column │ > │ = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ 1230000.0</code></span></summary><div><table><thead><tr></tr></thead><tbody> │ > │ <tr><td>Item</td><td><div class="dni-plaintext"><pre>1230000.0 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>{ lines = [|"123e4"|]<br /> position │ > │ = { line = 1<br /> column = 0 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ 123e4 │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 1<br /> column = 0 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>1 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 75.07ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JNumber 1230000.0 │ > │ JNumber 1230000.0 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber_ "123.4e5" > |> parserEqual (Success (JNumber 12340000.0)) > > ╭─[ 52.81ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNumber 12340000.0, { lines = [ │ > │ |"123.4e5"|]<br /> position = { line │ > │ = 1<br /> column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNumber 12340000.0, { lines = [ │ > │ |"123.4e5"|]<br /> position = { line = 1<br /> │ > │ column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ 12340000.0</code></span></summary><div><table><thead><tr></tr></thead><tbody │ > │ ><tr><td>Item</td><td><div class="dni-plaintext"><pre>12340000.0 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>{ lines = [|"123.4e5"|]<br /> │ > │ position = { line = 1<br /> column = 0 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ 123.4e5 │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 1<br /> column = 0 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>1 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 59.87ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JNumber 12340000.0 │ > │ JNumber 12340000.0 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jNumber_ "123.4e-5" > |> parserEqual (Success (JNumber 0.001234)) > > ╭─[ 66.05ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JNumber 0.001234, { lines = [ │ > │ |"123.4e-5"|]<br /> position = { line │ > │ = 1<br /> column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JNumber 0.001234, { lines = [ │ > │ |"123.4e-5"|]<br /> position = { line = 1<br /> │ > │ column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ 0.001234</code></span></summary><div><table><thead><tr></tr></thead><tbody>< │ > │ tr><td>Item</td><td><div class="dni-plaintext"><pre>0.001234 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ > │ 2</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>{ lines = [|"123.4e-5"|]<br /> │ > │ position = { line = 1<br /> column = 0 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ 123.4e-5 │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 1<br /> column = 0 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>1 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 76.55ms - stdout ]─────────────────────────────────────────────────────────╮ > │ JNumber 0.001234 │ > │ JNumber 0.001234 │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### jArray │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let jArray = > let left = pchar '[[' .>> spaces > let right = pchar ']]' .>> spaces > let comma = pchar ',' .>> spaces > let value = jValue .>> spaces > > let values = sepBy value comma > > between left values right > |>> JArray > <?> "array" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > jValueRef <| > choice > [[ > jNull > jBool > jString > jNumber > jArray > ]] > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jArray "[[ 1, 2 ]]" > |> parserEqual (Success (JArray [[ JNumber 1.0; JNumber 2.0 ]])) > > ╭─[ 124.86ms - return value ]──────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success (JArray [JNumber 1.0; JNumber 2.0], { │ > │ lines = [|"[ 1, 2 ]"|]<br /> │ > │ position = { line = 1<br /> │ > │ column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JArray [JNumber 1.0; JNumber 2.0], { lines = [ │ > │ |"[ 1, 2 ]"|]<br /> position = { line = 1<br /> │ > │ column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JArray [JNumber 1.0; JNumber │ > │ 2.0]</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr>< │ > │ td>Item</td><td><table><thead><tr><th><i>index</i></th><th>value</th></tr></ │ > │ thead><tbody><tr><td>0</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ 1.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><t │ > │ d>Item</td><td><div class="dni-plaintext"><pre>1.0 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNull</td><td>...ummary><span │ > │ class="dni-code-hint"><code>{ lines = [|"[ 1, 2 ]"|]<br /> │ > │ position = { line = 1<br /> column = 0 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ [ 1, 2 ] │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 1<br /> column = 0 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>1 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 131.37ms - stdout ]────────────────────────────────────────────────────────╮ > │ JArray [JNumber 1.0; JNumber 2.0] │ > │ JArray [JNumber 1.0; JNumber 2.0] │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jArray "[[ 1, 2, ]]" > |> parserEqual ( > Failure ( > "array", > "Unexpected ','", > { currentLine = "[[ 1, 2, ]]"; line = 0; column = 6 } > ) > ) > > ╭─[ 60.83ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Failure ("array", "Unexpected │ > │ ','", { currentLine = "[ 1, 2, ]"<br /> │ > │ line = 0<br /> column = 6 │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>"array" │ > │ </pre></div></td></tr><tr><td>Item2</td><td><div │ > │ class="dni-plaintext"><pre>"Unexpected ','" │ > │ </pre></div></td></tr><tr><td>Item3</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ > │ currentLine = "[ 1, 2, ]"<br /> line = 0<br /> column = 6 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ currentLine</td><td><div class="dni-plaintext"><pre>"[ 1, 2, ]" │ > │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>6 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ > │ ccess</td><td><div class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 66.71ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Line:0 Col:6 Error parsing array │ > │ [ 1, 2, ] │ > │ ^Unexpected ',' │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### jObject │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let jObject = > let left = spaces >>. pchar '{' .>> spaces > let right = pchar '}' .>> spaces > let colon = pchar ':' .>> spaces > let comma = pchar ',' .>> spaces > let key = quotedString .>> spaces > let value = jValue .>> spaces > > let keyValue = (key .>> colon) .>>. value > let keyValues = sepBy keyValue comma > > between left keyValues right > |>> Map.ofList > |>> JObject > <?> "object" > > ── fsharp ────────────────────────────────────────────────────────────────────── > jValueRef <| > choice > [[ > jNull > jBool > jString > jNumber > jArray > jObject > ]] > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jObject """{ "a":1, "b" : 2 }""" > |> parserEqual ( > Success ( > JObject ( > Map.ofList [[ > "a", JNumber 1.0 > "b", JNumber 2.0 > ]] > ) > ) > ) > > ╭─[ 129.29ms - return value ]──────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success<br /> (JObject (map [("a", │ > │ JNumber 1.0); ("b", JNumber 2.0)]),<br /> { lines = [|"{ │ > │ "a":1, "b" : 2 }"|]<br /> position = { line = │ > │ 1<br /> column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JObject (map [("a", JNumber 1.0); │ > │ ("b", JNumber 2.0)]), { lines = [|"{ "a":1, │ > │ "b" : 2 }"|]<br /> position = { line = 1<br /> │ > │ column = 0 } │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JObject (map [("a", JNumber 1.0); │ > │ ("b", JNumber │ > │ 2.0)])</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr │ > │ ><td>Item</td><td><table><thead><tr><th><i>key</i></th><th>value</th></tr></ │ > │ thead><tbody><tr><td><div class="dni-plaintext"><pre>"a" │ > │ </pre></div></td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JNumber │ > │ 1.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><t │ > │ d>Item</td><td><div class="dni-plaintext"><pre>1.0 │ > │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsJNumber</...ot;a":1, "b" : │ > │ 2 }"|]<br /> position = { line = 1<br /> column = 0 } │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ lines</td><td><div class="dni-plaintext"><pre>[ { "a":1, │ > │ "b" : 2 } │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 1<br /> column = 0 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>1 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 136.42ms - stdout ]────────────────────────────────────────────────────────╮ > │ JObject (map [("a", JNumber 1.0); ("b", JNumber 2.0)]) │ > │ JObject (map [("a", JNumber 1.0); ("b", JNumber 2.0)]) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run jObject """{ "a":1, "b" : 2, }""" > |> parserEqual ( > Failure ( > "object", > "Unexpected ','", > { currentLine = """{ "a":1, "b" : 2, }"""; line = 0; column = 18 } > ) > ) > > ╭─[ 61.96ms - return value ]───────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Failure ("object", "Unexpected │ > │ ','", { currentLine = "{ "a":1, "b" : │ > │ 2, }"<br /> line = 0<br /> │ > │ column = 18 │ > │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ > │ >Item1</td><td><div class="dni-plaintext"><pre>"object" │ > │ </pre></div></td></tr><tr><td>Item2</td><td><div │ > │ class="dni-plaintext"><pre>"Unexpected ','" │ > │ </pre></div></td></tr><tr><td>Item3</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ > │ currentLine = "{ "a":1, "b" : 2, }"<br /> │ > │ line = 0<br /> column = 18 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ currentLine</td><td><div class="dni-plaintext"><pre>"{ "a":1, │ > │ "b" : 2, }" │ > │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>18 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ > │ ccess</td><td><div class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 67.74ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Line:0 Col:18 Error parsing object │ > │ { "a":1, "b" : 2, } │ > │ ^Unexpected ',' │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### jValue │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let example1 = """{ > "name" : "Scott", > "isMale" : true, > "bday" : {"year":2001, "month":12, "day":25 }, > "favouriteColors" : [["blue", "green"]], > "emptyArray" : [[]], > "emptyObject" : {} > }""" > run jValue example1 > |> parserEqual ( > Success ( > JObject ( > Map.ofList [[ > "name", JString "Scott" > "isMale", JBool true > "bday", JObject ( > Map.ofList [[ > "year", JNumber 2001.0 > "month", JNumber 12.0 > "day", JNumber 25.0 > ]] > ) > "favouriteColors", JArray [[ JString "blue"; JString "green" ]] > "emptyArray", JArray [[]] > "emptyObject", JObject Map.empty > ]] > ) > ) > ) > > ╭─[ 229.13ms - return value ]──────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success<br /> (JObject<br /> (map<br /> │ > │ [("bday",<br /> JObject<br /> (map<br /> │ > │ [("day", JNumber 25.0); ("month", JNumber 12.0);<br /> │ > │ ("year", JNumber 2001.0)])); ("emptyArray", JArray [ │ > │ ]);<br /> ("emptyObject", JObject (map []));<br /> │ > │ ("favouriteColors", │ > │ ...</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><t │ > │ d>Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JObject<br /> (map<br /> [ │ > │ ("bday",<br /> JObject<br /> (map<br /> [ │ > │ ("day", JNumber 25.0); ("month", JNumber 12.0);<br /> │ > │ ("year", JNumber 2001.0)])); ("emptyArray", JArray [ │ > │ ]);<br /> ("emptyObject", JObject (map []));<br /> │ > │ ("favouriteColors", JArray [JString "blue"; JString │ > │ "gr...</code></span></summary><div><table><thead><tr></tr></thead><tbod │ > │ y><tr><td>Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JObject<br /> (map<br /> [ │ > │ ("bday",<br /> JObject<br /> (map<br /> [ │ > │ ("day", JNumber 25.0); ("month", JNumber 12.0);<br /> │ > │ ("year", JNumber 2001.0)])); ("emptyArray", JArra...,, │ > │ "isMale" : true,, "bday" : {"year":2001, │ > │ "month":12, "day":25 },, "favouriteColors" │ > │ : ["blue", "green"],, "emptyArray" : [],, │ > │ "emptyObject" : {}, } │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 8<br /> column = 0 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>8 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 234.96ms - stdout ]────────────────────────────────────────────────────────╮ > │ JObject │ > │ (map │ > │ [("bday", │ > │ JObject │ > │ (map │ > │ [("day", JNumber 25.0); ("month", JNumber 12.0); │ > │ ("year", JNumber 2001.0)])); ("emptyArray", JArray []); │ > │ ("emptyObject", JObject (map [])); │ > │ ("favouriteColors", JArray [JString "blue"; JString "green"]); │ > │ ("isMale", JBool true); ("name", JString "Scott")]) │ > │ JObject │ > │ (map │ > │ [("bday", JObject (map [("day", JNumber 25.0); ("month", JNumber 12.0); │ > │ ("year", JNumber 2001.0)])); │ > │ ("emptyArray", JArray []); ("emptyObject", JObject (map [])); │ > │ ("favouriteColors", JArray [JString "blue"; JString "green"]); │ > │ ("isMale", JBool true); ("name", JString "Scott")]) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let example2 = """{"widget": { > "debug": "on", > "window": { > "title": "Sample Konfabulator Widget", > "name": "main_window", > "width": 500, > "height": 500 > }, > "image": { > "src": "Images/Sun.png", > "name": "sun1", > "hOffset": 250, > "vOffset": 250, > "alignment": "center" > }, > "text": { > "data": "Click Here", > "size": 36, > "style": "bold", > "name": "text1", > "hOffset": 250, > "vOffset": 100, > "alignment": "center", > "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;" > } > }}""" > > run jValue example2 > |> parserEqual ( > Success ( > JObject ( > Map.ofList [[ > "widget", JObject ( > Map.ofList [[ > "debug", JString "on" > "window", JObject ( > Map.ofList [[ > "title", JString "Sample Konfabulator Widget" > "name", JString "main_window" > "width", JNumber 500.0 > "height", JNumber 500.0 > ]] > ) > "image", JObject ( > Map.ofList [[ > "src", JString "Images/Sun.png" > "name", JString "sun1" > "hOffset", JNumber 250.0 > "vOffset", JNumber 250.0 > "alignment", JString "center" > ]] > ) > "text", JObject ( > Map.ofList [[ > "data", JString "Click Here" > "size", JNumber 36.0 > "style", JString "bold" > "name", JString "text1" > "hOffset", JNumber 250.0 > "vOffset", JNumber 100.0 > "alignment", JString "center" > "onMouseUp", JString "sun1.opacity = > (sun1.opacity / 100) * 90;" > ]] > ) > ]] > ) > ]] > ) > ) > ) > > ╭─[ 531.89ms - return value ]──────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success<br /> (JObject<br /> (map<br /> │ > │ [("widget",<br /> JObject<br /> (map<br /> │ > │ [("debug", JString "on");<br /> │ > │ ("image",<br /> JObject<br /> │ > │ (map<br /> [("alignment", JString │ > │ "center");<br /> │ > │ ("hOffset"...</code></span></summary><div><table><thead><tr></tr>< │ > │ /thead><tbody><tr><td>Item</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>(JObject<br │ > │ /> (map<br /> [("widget",<br /> JObject<br /> │ > │ (map<br /> [("debug", JString "on");<br /> │ > │ ("image",<br /> JObject<br /> (map<br │ > │ /> [("alignment", JString "center"); │ > │ ("hOffset", JNumber 250.0);<br /> │ > │ ("name", JString │ > │ "sun1"...</code></span></summary><div><table><thead><tr></tr></the │ > │ ad><tbody><tr><td>Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JObject<br /> (map<br /> [ │ > │ ("widget",<br /> JObject<br /> (map<br /> │ > │ [("debug", JString "on");<br /> │ > │ ("image",<br /> JObject<br /> (...t;,, │ > │ "name": "text1",, "hOffset": 250,, │ > │ "vOffset": 100,, "alignment": │ > │ "center",, "onMouseUp": "sun1.opacity = │ > │ (sun1.opacity / 100) * 90;", }, }} │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 26<br /> column = 0 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>26 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 538.84ms - stdout ]────────────────────────────────────────────────────────╮ > │ JObject │ > │ (map │ > │ [("widget", │ > │ JObject │ > │ (map │ > │ [("debug", JString "on"); │ > │ ("image", │ > │ JObject │ > │ (map │ > │ [("alignment", JString "center"); ("hOffset", JNumber │ > │ 250.0); │ > │ ("name", JString "sun1"); ("src", JString │ > │ "Images/Sun.png"); │ > │ ("vOffset", JNumber 250.0)])); │ > │ ("text", │ > │ JObject │ > │ (map │ > │ [("alignment", JString "center"); │ > │ ("data", JString "Click Here"); ("hOffset", JNumber │ > │ 250.0); │ > │ ("name", JString "text1"); │ > │ ("onMouseUp", │ > │ JString "sun1.opacity = (sun1.opacity / 100) * 90;"); │ > │ ("size", JNumber 36.0); ("style", JString "bold"); │ > │ ("vOffset", JNumber 100.0)])); │ > │ ("window", │ > │ JObject │ > │ (map │ > │ [("height", JNumber 500.0); ("name", JString │ > │ "main_window"); │ > │ ("title", JString "Sample Konfabulator Widget"); │ > │ ("width", JNumber 500.0)]))]))]) │ > │ JObject │ > │ (map │ > │ [("widget", │ > │ JObject │ > │ (map │ > │ [("debug", JString "on"); │ > │ ("image", │ > │ JObject │ > │ (map │ > │ [("alignment", JString "center"); ("hOffset", JNumber │ > │ 250.0); ("name", JString "sun1"); │ > │ ("src", JString "Images/Sun.png"); ("vOffset", JNumber │ > │ 250.0)])); │ > │ ("text", │ > │ JObject │ > │ (map │ > │ [("alignment", JString "center"); ("data", JString "Click │ > │ Here"); ("hOffset", JNumber 250.0); │ > │ ("name", JString "text1"); ("onMouseUp", JString │ > │ "sun1.opacity = (sun1.opacity / 100) * 90;"); │ > │ ("size", JNumber 36.0); ("style", JString "bold"); │ > │ ("vOffset", JNumber 100.0)])); │ > │ ("window", │ > │ JObject │ > │ (map │ > │ [("height", JNumber 500.0); ("name", JString │ > │ "main_window"); │ > │ ("title", JString "Sample Konfabulator Widget"); │ > │ ("width", JNumber 500.0)]))]))]) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let example3 = """{ > "string": "Hello, \"World\"!", > "escapedString": "This string contains \\/\\\\\\b\\f\\n\\r\\t\\\"\\'", > "number": 42, > "scientificNumber": 3.14e-10, > "boolean": true, > "nullValue": null, > "array": [[1, 2, 3, 4, 5]], > "unicodeString1": "프리마", > "unicodeString2": "\u0048\u0065\u006C\u006C\u006F, > \u0022\u0057\u006F\u0072\u006C\u0064\u0022!", > "specialCharacters": "!@#$%^&*()", > "emptyArray": [[]], > "emptyObject": {}, > "nestedArrays": [[[[1, 2, 3]], [[4, 5, 6]]]], > "object": { > "nestedString": "Nested Value", > "nestedNumber": 3.14, > "nestedBoolean": false, > "nestedNull": null, > "nestedArray": [["a", "b", "c"]], > "nestedObject": { > "nestedProperty": "Nested Object Value" > } > }, > "nestedObjects": [[ > {"name": "Alice", "age": 25}, > {"name": "Bob", "age": 30} > ]] > }""" > run jValue example3 > |> parserEqual ( > Success ( > JObject ( > Map.ofList [[ > "string", JString @"Hello, ""World""!" > "escapedString", JString @"This string contains > \/\\\b\f\n\r\t\""\'" > "number", JNumber 42.0 > "scientificNumber", JNumber 3.14e-10 > "boolean", JBool true > "nullValue", JNull > "array", JArray [[ > JNumber 1.0; JNumber 2.0; JNumber 3.0; JNumber 4.0; JNumber > 5.0 > ]] > "unicodeString1", JString "프리마" > "unicodeString2", JString @"Hello, ""World""!" > "specialCharacters", JString "!@#$%^&*()" > "emptyArray", JArray [[]] > "emptyObject", JObject Map.empty > "nestedArrays", JArray [[ > JArray [[ JNumber 1.0; JNumber 2.0; JNumber 3.0 ]] > JArray [[ JNumber 4.0; JNumber 5.0; JNumber 6.0 ]] > ]] > "object", JObject ( > Map.ofList [[ > "nestedString", JString "Nested Value" > "nestedNumber", JNumber 3.14 > "nestedBoolean", JBool false > "nestedNull", JNull > "nestedArray", JArray [[JString "a"; JString "b"; > JString "c"]] > "nestedObject", JObject ( > Map.ofList [[ > "nestedProperty", JString "Nested Object Value" > ]] > ) > ]] > ) > "nestedObjects", JArray [[ > JObject (Map.ofList [[ "name", JString "Alice"; "age", JNumber > 25.0 ]]) > JObject (Map.ofList [[ "name", JString "Bob"; "age", JNumber > 30.0 ]]) > ]] > ]] > ) > ) > ) > > ╭─[ 700.74ms - return value ]──────────────────────────────────────────────────╮ > │ <details open="open" class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>Success<br /> (JObject<br /> (map<br /> │ > │ [("array",<br /> JArray<br /> [JNumber 1.0; │ > │ JNumber 2.0; JNumber 3.0; JNumber 4.0; JNumber 5.0]);<br /> │ > │ ("boolean", JBool true); ("emptyArray", JArray []);<br │ > │ /> ("emptyObject", JObject (map []));<br /> │ > │ ("escapedString", JString "This │ > │ s...</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr>< │ > │ td>Item</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>(JObject<br /> (map<br /> [ │ > │ ("array",<br /> JArray [JNumber 1.0; JNumber 2.0; JNumber │ > │ 3.0; JNumber 4.0; JNumber 5.0]);<br /> ("boolean", JBool │ > │ true); ("emptyArray", JArray []);<br /> │ > │ ("emptyObject", JObject (map []));<br /> │ > │ ("escapedString", JString "This string contains \/\\\b\f<br │ > │ />\r\t\"\'");<br /> │ > │ ...</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><t │ > │ d>Item1</td><td><details class="dni-treeview"><summary><span │ > │ class="dni-code-hint"><code>JObject<br /> (map<br /> [ │ > │ ("array",<br /> JArray [JNumber 1.0; JNumber 2.0; JNumber │ > │ 3.0; JNumber 4.0; JNumber 5.0]);<br /> ("boolean", JBool │ > │ true); ("emptyArray", JArray []);<br /> │ > │ ("emptyObject", JObject (map []));<br /> │ > │ ("es...nestedObject": {, "nestedProperty": │ > │ "Nested Object Value", }, },, "nestedObjects": [ │ > │ , {"name": "Alice", "age": 25},, │ > │ {"name": "Bob", "age": 30}, ], } │ > │ ]</pre></div></td></tr><tr><td>position</td><td><details │ > │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ > │ 29<br /> column = 0 │ > │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ > │ line</td><td><div class="dni-plaintext"><pre>29 │ > │ </pre></div></td></tr><tr><td>column</td><td><div │ > │ class="dni-plaintext"><pre>0 │ > │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ > │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ > │ <td>IsSuccess</td><td><div class="dni-plaintext"><pre>true │ > │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ > │ class="dni-plaintext"><pre>false │ > │ </pre></div></td></tr></tbody></table></div></details><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ╭─[ 709.34ms - stdout ]────────────────────────────────────────────────────────╮ > │ JObject │ > │ (map │ > │ [("array", │ > │ JArray [JNumber 1.0; JNumber 2.0; JNumber 3.0; JNumber 4.0; JNumber │ > │ 5.0]); │ > │ ("boolean", JBool true); ("emptyArray", JArray []); │ > │ ("emptyObject", JObject (map [])); │ > │ ("escapedString", JString "This string contains \/\\\b\f\n\r\t\"\'"); │ > │ ("nestedArrays", │ > │ JArray │ > │ [JArray [JNumber 1.0; JNumber 2.0; JNumber 3.0]; │ > │ JArray [JNumber 4.0; JNumber 5.0; JNumber 6.0]]); │ > │ ("nestedObjects", │ > │ JArray │ > │ [JObject (map [("age", JNumber 25.0); ("name", JString "Alice")]); │ > │ JObject (map [("age", JNumber 30.0); ("name", JString "Bob")])]); │ > │ ("nullValue", JNull); ("number", JNumber 42.0); ...]) │ > │ JObject │ > │ (map │ > │ [("array", JArray [JNumber 1.0; JNumber 2.0; JNumber 3.0; JNumber 4.0; │ > │ JNumber 5.0]); ("boolean", JBool true); │ > │ ("emptyArray", JArray []); ("emptyObject", JObject (map [])); │ > │ ("escapedString", JString "This string contains \/\\\b\f\n\r\t\"\'"); │ > │ ("nestedArrays", │ > │ JArray [JArray [JNumber 1.0; JNumber 2.0; JNumber 3.0]; JArray [ │ > │ JNumber 4.0; JNumber 5.0; JNumber 6.0]]); │ > │ ("nestedObjects", │ > │ JArray │ > │ [JObject (map [("age", JNumber 25.0); ("name", JString "Alice")]); │ > │ JObject (map [("age", JNumber 30.0); ("name", JString "Bob")])]); │ > │ ("nullValue", JNull); │ > │ ("number", JNumber 42.0); ...]) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:34 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 266592 } 00:00:34 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ "nbconvert", "c:/home/git/polyglot/apps/parser/JsonParser.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark", ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/apps/parser/JsonParser.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:37 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/parser/JsonParser.dib.ipynb to html 00:00:37 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:00:37 verbose #7 ! validate(nb) 00:00:40 verbose #8 ! [NbConvertApp] Writing 534279 bytes to c:\home\git\polyglot\apps\parser\JsonParser.dib.html 00:00:40 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 653 } 00:00:40 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 653 } 00:00:40 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ "-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/parser/JsonParser.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/parser/JsonParser.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:41 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:00:41 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:00:41 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 267304 } 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "Parser.dib"])) } 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ "repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/parser/Parser.dib", "--output-path", "c:/home/git/polyglot/apps/parser/Parser.dib.ipynb", ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/parser/Parser.dib" --output-path "c:/home/git/polyglot/apps/parser/Parser.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ # Parser (Polyglot) │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > open Common > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### TextInput │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > type Position = > { > line : int > column : int > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > let initialPos = { line = 0; column = 0 } > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline incrCol (pos : Position) = > { pos with column = pos.column + 1 } > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline incrLine pos = > { line = pos.line + 1; column = 0 } > > ── fsharp ────────────────────────────────────────────────────────────────────── > type InputState = > { > lines : string[[]] > position : Position > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline fromStr str = > { > lines = > if str |> String.IsNullOrEmpty > then [[||]] > else str |> SpiralSm.split_string [[| "\r\n"; "\n" |]] > position = initialPos > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > fromStr "" |> _assertEqual { > lines = [[||]] > position = { line = 0; column = 0 } > } > > ╭─[ 87.58ms - stdout ]─────────────────────────────────────────────────────────╮ > │ { lines = [||] │ > │ position = { line = 0 │ > │ column = 0 } } │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > fromStr "Hello \n World" |> _assertEqual { > lines = [[| "Hello "; " World" |]] > position = { line = 0; column = 0 } > } > > ╭─[ 30.96ms - stdout ]─────────────────────────────────────────────────────────╮ > │ { lines = [|"Hello "; " World"|] │ > │ position = { line = 0 │ > │ column = 0 } } │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline currentLine inputState = > let linePos = inputState.position.line > if linePos < inputState.lines.Length > then inputState.lines.[[linePos]] > else "end of file" > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline nextChar input = > let linePos = input.position.line > let colPos = input.position.column > > if linePos >= input.lines.Length > then input, None > else > let currentLine = currentLine input > if colPos < currentLine.Length then > let char = currentLine.[[colPos]] > let newPos = incrCol input.position > let newState = { input with position = newPos } > newState, Some char > else > let char = '\n' > let newPos = incrLine input.position > let newState = { input with position = newPos } > newState, Some char > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let newInput, charOpt = fromStr "Hello World" |> nextChar > > newInput |> _assertEqual { > lines = [[| "Hello World" |]] > position = { line = 0; column = 1 } > } > charOpt |> _assertEqual (Some 'H') > > ╭─[ 65.65ms - stdout ]─────────────────────────────────────────────────────────╮ > │ { lines = [|"Hello World"|] │ > │ position = { line = 0 │ > │ column = 1 } } │ > │ │ > │ Some 'H' │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let newInput, charOpt = fromStr "Hello\n\nWorld" |> nextChar > > newInput |> _assertEqual { > lines = [[| "Hello"; ""; "World" |]] > position = { line = 0; column = 1 } > } > charOpt |> _assertEqual (Some 'H') > > ╭─[ 55.11ms - stdout ]─────────────────────────────────────────────────────────╮ > │ { lines = [|"Hello"; ""; "World"|] │ > │ position = { line = 0 │ > │ column = 1 } } │ > │ │ > │ Some 'H' │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### Parser │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > type Input = InputState > type ParserLabel = string > type ParserError = string > > type ParserPosition = > { > currentLine : string > line : int > column : int > } > > type ParseResult<'a> = > | Success of 'a > | Failure of ParserLabel * ParserError * ParserPosition > > type Parser<'a> = > { > label : ParserLabel > parseFn : Input -> ParseResult<'a * Input> > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline printResult result = > match result with > | Success (value, input) -> > printfn $"%A{value}" > | Failure (label, error, parserPos) -> > let errorLine = parserPos.currentLine > let colPos = parserPos.column > let linePos = parserPos.line > let failureCaret = $"{' ' |> string |> String.replicate colPos}^{error}" > printfn $"Line:%i{linePos} Col:%i{colPos} Error parsing > %s{label}\n%s{errorLine}\n%s{failureCaret}" > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline runOnInput parser input = > parser.parseFn input > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline run parser inputStr = > runOnInput parser (fromStr inputStr) > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline parserPositionFromInputState (inputState : Input) = > { > currentLine = currentLine inputState > line = inputState.position.line > column = inputState.position.column > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline getLabel parser = > parser.label > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline setLabel parser newLabel = > { > label = newLabel > parseFn = fun input -> > match parser.parseFn input with > | Success s -> Success s > | Failure (oldLabel, err, pos) -> Failure (newLabel, err, pos) > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > let (<?>) = setLabel > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline satisfy predicate label = > { > label = label > parseFn = fun input -> > let remainingInput, charOpt = nextChar input > match charOpt with > | None -> > let err = "No more input" > let pos = parserPositionFromInputState input > Failure (label, err, pos) > | Some first -> > if predicate first > then Success (first, remainingInput) > else > let err = $"Unexpected '%c{first}'" > let pos = parserPositionFromInputState input > Failure (label, err, pos) > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello" > let parser = satisfy (fun c -> c = 'H') "H" > runOnInput parser input |> _assertEqual ( > Success ( > 'H', > { > lines = [[| "Hello" |]] > position = { line = 0; column = 1 } > } > ) > ) > > ╭─[ 52.86ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success ('H', { lines = [|"Hello"|] │ > │ position = { line = 0 │ > │ column = 1 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "World" > let parser = satisfy (fun c -> c = 'H') "H" > runOnInput parser input |> _assertEqual ( > Failure ( > "H", > "Unexpected 'W'", > { > currentLine = "World" > line = 0 > column = 0 > } > ) > ) > > ╭─[ 49.18ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Failure ("H", "Unexpected 'W'", { currentLine = "World" │ > │ line = 0 │ > │ column = 0 }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline bindP f p = > { > label = "unknown" > parseFn = fun input -> > match runOnInput p input with > | Failure (label, err, pos) -> Failure (label, err, pos) > | Success (value1, remainingInput) -> runOnInput (f value1) > remainingInput > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline (>>=) p f = bindP f p > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello" > let parser = satisfy (fun c -> c = 'H') "H" > let parser2 = parser >>= fun c -> satisfy (fun c -> c = 'e') "e" > runOnInput parser2 input |> _assertEqual ( > Success ( > 'e', > { > lines = [[| "Hello" |]] > position = { line = 0; column = 2 } > } > ) > ) > > ╭─[ 62.90ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success ('e', { lines = [|"Hello"|] │ > │ position = { line = 0 │ > │ column = 2 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "World" > let parser = satisfy (fun c -> c = 'W') "W" > let parser2 = parser >>= fun c -> satisfy (fun c -> c = 'e') "e" > runOnInput parser2 input |> _assertEqual ( > Failure ( > "e", > "Unexpected 'o'", > { > currentLine = "World" > line = 0 > column = 1 > } > ) > ) > > ╭─[ 60.03ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Failure ("e", "Unexpected 'o'", { currentLine = "World" │ > │ line = 0 │ > │ column = 1 }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline returnP x = > { > label = $"%A{x}" > parseFn = fun input -> Success (x, input) > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello" > let parser = returnP "Hello" > runOnInput parser input |> _assertEqual ( > Success ( > "Hello", > { > lines = [[| "Hello" |]] > position = { line = 0; column = 0 } > } > ) > ) > > ╭─[ 42.03ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success ("Hello", { lines = [|"Hello"|] │ > │ position = { line = 0 │ > │ column = 0 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline mapP f = > bindP (f >> returnP) > > ── fsharp ────────────────────────────────────────────────────────────────────── > let (<!>) = mapP > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline (|>>) x f = f <!> x > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello" > let parser = satisfy (fun c -> c = 'H') "H" > let parser2 = parser |>> string > runOnInput parser2 input |> _assertEqual ( > Success ( > "H", > { > lines = [[| "Hello" |]] > position = { line = 0; column = 1 } > } > ) > ) > > ╭─[ 57.57ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success ("H", { lines = [|"Hello"|] │ > │ position = { line = 0 │ > │ column = 1 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline applyP fP xP = > fP >>= > fun f -> > xP >>= > fun x -> > returnP (f x) > > ── fsharp ────────────────────────────────────────────────────────────────────── > let (<*>) = applyP > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline lift2 f xP yP = > returnP f <*> xP <*> yP > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello" > let parser = satisfy (fun c -> c = 'H') "H" > let parser2 = satisfy (fun c -> c = 'e') "e" > let parser3 = lift2 (fun c1 c2 -> string c1 + string c2) parser parser2 > runOnInput parser3 input |> _assertEqual ( > Success ( > "He", > { > lines = [[| "Hello" |]] > position = { line = 0; column = 2 } > } > ) > ) > > ╭─[ 101.39ms - stdout ]────────────────────────────────────────────────────────╮ > │ Success ("He", { lines = [|"Hello"|] │ > │ position = { line = 0 │ > │ column = 2 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline andThen p1 p2 = > p1 >>= > fun p1Result -> > p2 >>= > fun p2Result -> > returnP (p1Result, p2Result) > <?> $"{getLabel p1} andThen {getLabel p2}" > > ── fsharp ────────────────────────────────────────────────────────────────────── > let (.>>.) = andThen > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello" > let parser = satisfy (fun c -> c = 'H') "H" > let parser2 = satisfy (fun c -> c = 'e') "e" > let parser3 = parser .>>. parser2 > runOnInput parser3 input |> _assertEqual ( > Success ( > ('H', 'e'), > { > lines = [[| "Hello" |]] > position = { line = 0; column = 2 } > } > ) > ) > > ╭─[ 60.15ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success (('H', 'e'), { lines = [|"Hello"|] │ > │ position = { line = 0 │ > │ column = 2 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline orElse p1 p2 = > { > label = $"{getLabel p1} orElse {getLabel p2}" > parseFn = fun input -> > match runOnInput p1 input with > | Success _ as result -> result > | Failure _ -> runOnInput p2 input > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > let (<|>) = orElse > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "hello" > let parser = satisfy (fun c -> c = 'H') "H" > let parser2 = satisfy (fun c -> c = 'h') "h" > let parser3 = parser <|> parser2 > runOnInput parser3 input |> _assertEqual ( > Success ( > 'h', > { > lines = [[| "hello" |]] > position = { line = 0; column = 1 } > } > ) > ) > > ╭─[ 129.84ms - stdout ]────────────────────────────────────────────────────────╮ > │ Success ('h', { lines = [|"hello"|] │ > │ position = { line = 0 │ > │ column = 1 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline choice listOfParsers = > listOfParsers |> List.reduce (<|>) > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "hello" > let parser = satisfy (fun c -> c = 'H') "H" > let parser2 = satisfy (fun c -> c = 'h') "h" > let parser3 = choice [[ parser; parser2 ]] > runOnInput parser3 input |> _assertEqual ( > Success ( > 'h', > { > lines = [[| "hello" |]] > position = { line = 0; column = 1 } > } > ) > ) > > ╭─[ 67.62ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success ('h', { lines = [|"hello"|] │ > │ position = { line = 0 │ > │ column = 1 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let rec sequence parserList = > match parserList with > | [[]] -> returnP [[]] > | head :: tail -> (lift2 cons) head (sequence tail) > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello" > let parser = satisfy (fun c -> c = 'H') "H" > let parser2 = satisfy (fun c -> c = 'e') "e" > let parser3 = sequence [[ parser; parser2 ]] > runOnInput parser3 input |> _assertEqual ( > Success ( > [[ 'H'; 'e' ]], > { > lines = [[| "Hello" |]] > position = { line = 0; column = 2 } > } > ) > ) > > ╭─[ 77.89ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success (['H'; 'e'], { lines = [|"Hello"|] │ > │ position = { line = 0 │ > │ column = 2 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let rec parseZeroOrMore parser input = > match runOnInput parser input with > | Failure (_, _, _) -> > [[]], input > | Success (firstValue, inputAfterFirstParse) -> > let subsequentValues, remainingInput = parseZeroOrMore parser > inputAfterFirstParse > firstValue :: subsequentValues, remainingInput > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline many parser = > { > label = $"many {getLabel parser}" > parseFn = fun input -> Success (parseZeroOrMore parser input) > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "hello" > let parser = satisfy (fun c -> c = 'H') "H" > let parser2 = many parser > runOnInput parser2 input |> _assertEqual ( > Success ( > [[]], > { > lines = [[| "hello" |]] > position = { line = 0; column = 0 } > } > ) > ) > > ╭─[ 53.33ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success ([], { lines = [|"hello"|] │ > │ position = { line = 0 │ > │ column = 0 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline many1 p = > p >>= > fun head -> > many p >>= > fun tail -> > returnP (head :: tail) > <?> $"many1 {getLabel p}" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "hello" > let parser = satisfy (fun c -> c = 'H') "H" > let parser2 = many1 parser > runOnInput parser2 input |> _assertEqual ( > Failure ( > "many1 H", > "Unexpected 'h'", > { > currentLine = "hello" > line = 0 > column = 0 > } > ) > ) > > ╭─[ 84.64ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Failure ("many1 H", "Unexpected 'h'", { currentLine = "hello" │ > │ line = 0 │ > │ column = 0 }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline opt p = > let some = p |>> Some > let none = returnP None > (some <|> none) > <?> $"opt {getLabel p}" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "hello" > let parser = satisfy (fun c -> c = 'H') "H" > let parser2 = opt parser > runOnInput parser2 input |> _assertEqual ( > Success ( > None, > { > lines = [[| "hello" |]] > position = { line = 0; column = 0 } > } > ) > ) > > ╭─[ 79.65ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success (None, { lines = [|"hello"|] │ > │ position = { line = 0 │ > │ column = 0 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline (.>>) p1 p2 = > p1 .>>. p2 > |> mapP fst > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline (>>.) p1 p2 = > p1 .>>. p2 > |> mapP snd > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline between p1 p2 p3 = > p1 >>. p2 .>> p3 > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "[[Hello]]" > let parser = > between > (satisfy (fun c -> c = '[[') "[[") > (many (satisfy (fun c -> [[ 'a' .. 'z' ]] @ [[ 'A' .. 'Z' ]] |> > List.contains c) "letter")) > (satisfy (fun c -> c = ']]') "]]") > runOnInput parser input |> _assertEqual ( > Success ( > [[ 'H'; 'e'; 'l'; 'l'; 'o' ]], > { > lines = [[| "[[Hello]]" |]] > position = { line = 0; column = 7 } > } > ) > ) > > ╭─[ 186.72ms - stdout ]────────────────────────────────────────────────────────╮ > │ Success (['H'; 'e'; 'l'; 'l'; 'o'], { lines = [|"[Hello]"|] │ > │ position = { line = 0 │ > │ column = 7 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline sepBy1 p sep = > let sepThenP = sep >>. p > p .>>. many sepThenP > |>> fun (p, pList) -> p :: pList > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline sepBy p sep = > sepBy1 p sep <|> returnP [[]] > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello,World" > let parser = sepBy (many (satisfy (fun c -> c <> ',') "not comma")) (satisfy > (fun c -> c = ',') "comma") > runOnInput parser input |> _assertEqual ( > Success ( > [[ [[ 'H'; 'e'; 'l'; 'l'; 'o' ]]; [[ 'W'; 'o'; 'r'; 'l'; 'd'; '\n' ]] > ]], > { > lines = [[| "Hello,World" |]] > position = { line = 1; column = 0 } > } > ) > ) > > ╭─[ 128.23ms - stdout ]────────────────────────────────────────────────────────╮ > │ Success ([['H'; 'e'; 'l'; 'l'; 'o']; ['W'; 'o'; 'r'; 'l'; 'd'; '\010']], { │ > │ lines = [|"Hello,World"|] │ > │ │ > │ position = { line = 1 │ > │ │ > │ column = 0 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline pchar charToMatch = > satisfy ((=) charToMatch) $"%c{charToMatch}" > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline anyOf listOfChars = > listOfChars > |> List.map pchar > |> choice > <?> $"anyOf %A{listOfChars}" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello" > let parser = anyOf [[ 'H'; 'e'; 'l'; 'o' ]] |> many > runOnInput parser input |> _assertEqual ( > Success ( > [[ 'H'; 'e'; 'l'; 'l'; 'o' ]], > { > lines = [[| "Hello" |]] > position = { line = 0; column = 5 } > } > ) > ) > > ╭─[ 76.09ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success (['H'; 'e'; 'l'; 'l'; 'o'], { lines = [|"Hello"|] │ > │ position = { line = 0 │ > │ column = 5 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline charListToStr charList = > charList |> List.toArray |> String > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline manyChars cp = > many cp > |>> charListToStr > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline manyChars1 cp = > many1 cp > |>> charListToStr > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello" > let parser = manyChars1 (anyOf [[ 'H'; 'e'; 'l'; 'o' ]]) > runOnInput parser input |> _assertEqual ( > Success ( > "Hello", > { > lines = [[| "Hello" |]] > position = { line = 0; column = 5 } > } > ) > ) > > ╭─[ 86.65ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success ("Hello", { lines = [|"Hello"|] │ > │ position = { line = 0 │ > │ column = 5 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline pstring str = > str > |> List.ofSeq > |> List.map pchar > |> sequence > |> mapP charListToStr > <?> str > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello" > let parser = pstring "Hello" > runOnInput parser input |> _assertEqual ( > Success ( > "Hello", > { > lines = [[| "Hello" |]] > position = { line = 0; column = 5 } > } > ) > ) > > ╭─[ 90.68ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success ("Hello", { lines = [|"Hello"|] │ > │ position = { line = 0 │ > │ column = 5 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let whitespaceChar = > satisfy Char.IsWhiteSpace "whitespace" > > ── fsharp ────────────────────────────────────────────────────────────────────── > let spaces = many whitespaceChar > > ── fsharp ────────────────────────────────────────────────────────────────────── > let spaces1 = many1 whitespaceChar > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr " Hello" > let parser = spaces1 .>>. pstring "Hello" > runOnInput parser input |> _assertEqual ( > Success ( > ([[ ' '; ' ' ]], "Hello"), > { > lines = [[| " Hello" |]] > position = { line = 0; column = 7 } > } > ) > ) > > ╭─[ 87.10ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success (([' '; ' '], "Hello"), { lines = [|" Hello"|] │ > │ position = { line = 0 │ > │ column = 7 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let digitChar = > satisfy Char.IsDigit "digit" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let input = fromStr "Hello" > let parser = digitChar > runOnInput parser input |> _assertEqual ( > Failure ( > "digit", > "Unexpected 'H'", > { > currentLine = "Hello" > line = 0 > column = 0 > } > ) > ) > > ╭─[ 36.96ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Failure ("digit", "Unexpected 'H'", { currentLine = "Hello" │ > │ line = 0 │ > │ column = 0 }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let pint = > let inline resultToInt (sign, digits) = > let i = int digits > match sign with > | Some ch -> -i > | None -> i > > let digits = manyChars1 digitChar > > opt (pchar '-') .>>. digits > |> mapP resultToInt > <?> "integer" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run pint "-123" > |> _assertEqual ( > Success ( > -123, > { > lines = [[| "-123" |]] > position = { line = 0; column = 4 } > } > ) > ) > > ╭─[ 44.64ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success (-123, { lines = [|"-123"|] │ > │ position = { line = 0 │ > │ column = 4 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let pfloat = > let inline resultToFloat (((sign, digits1), point), digits2) = > let fl = float $"{digits1}.{digits2}" > match sign with > | Some ch -> -fl > | None -> fl > > let digits = manyChars1 digitChar > > opt (pchar '-') .>>. digits .>>. pchar '.' .>>. digits > |> mapP resultToFloat > <?> "float" > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > run pfloat "-123.45" > |> _assertEqual ( > Success ( > -123.45, > { > lines = [[| "-123.45" |]] > position = { line = 0; column = 7 } > } > ) > ) > > ╭─[ 38.36ms - stdout ]─────────────────────────────────────────────────────────╮ > │ Success (-123.45, { lines = [|"-123.45"|] │ > │ position = { line = 0 │ > │ column = 7 } }) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline createParserForwardedToRef<'a> () = > let mutable parserRef : Parser<'a> = > { > label = "unknown" > parseFn = fun _ -> failwith "unfixed forwarded parser" > } > > let wrapperParser = > { parserRef with > parseFn = fun input -> runOnInput parserRef input > } > > wrapperParser, (fun v -> parserRef <- v) > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline (>>%) p x = > p > |>> fun _ -> x 00:00:31 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 39314 } 00:00:31 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ "nbconvert", "c:/home/git/polyglot/apps/parser/Parser.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark", ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/apps/parser/Parser.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:33 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/parser/Parser.dib.ipynb to html 00:00:33 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:00:33 verbose #7 ! validate(nb) 00:00:36 verbose #8 ! [NbConvertApp] Writing 413674 bytes to c:\home\git\polyglot\apps\parser\Parser.dib.html 00:00:37 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 645 } 00:00:37 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 645 } 00:00:37 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ "-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/parser/Parser.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/parser/Parser.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:37 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:00:37 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:00:37 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 40018 } 00:00:00 debug #1 writeDibCode / output: Fs / path: Parser.dib 00:00:00 debug #1 writeDibCode / output: Fs / path: JsonParser.dib 00:00:00 debug #2 parseDibCode / output: Fs / file: Parser.dib 00:00:00 debug #2 parseDibCode / output: Fs / file: JsonParser.dib
In [ ]:
{ pwsh ../apps/spiral/build.ps1 } | Invoke-Block
00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "Supervisor.dib", "--retries", "3"])) } 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ "repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/spiral/Supervisor.dib", "--output-path", "c:/home/git/polyglot/apps/spiral/Supervisor.dib.ipynb", ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/spiral/Supervisor.dib" --output-path "c:/home/git/polyglot/apps/spiral/Supervisor.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ # Supervisor (Polyglot) │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > #r > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan > dard2.1/FSharp.Control.AsyncSeq.dll" > #r > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6. > 0/System.Reactive.dll" > #r > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/ > netstandard2.0/System.Reactive.Linq.dll" > #r > @"../../../../../../../.nuget/packages/argu/6.2.4/lib/netstandard2.0/Argu.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.http.connections.com > mon/7.0.0/lib/net7.0/Microsoft.AspNetCore.Http.Connections.Common.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.http.connections.cli > ent/7.0.0/lib/net7.0/Microsoft.AspNetCore.Http.Connections.Client.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.common/7.0.0 > /lib/net7.0/Microsoft.AspNetCore.SignalR.Common.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.client/7.0.0 > /lib/net7.0/Microsoft.AspNetCore.SignalR.Client.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.client.core/ > 7.0.0/lib/net7.0/Microsoft.AspNetCore.SignalR.Client.Core.dll" > #r > @"../../../../../../../.nuget/packages/fsharp.json/0.4.1/lib/netstandard2.0/FSha > rp.Json.dll" > > ── fsharp ────────────────────────────────────────────────────────────────────── > #if !INTERACTIVE > open Lib > #endif > > ── fsharp ────────────────────────────────────────────────────────────────────── > open Common > open SpiralFileSystem.Operators > open Microsoft.AspNetCore.SignalR.Client > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### sendJson │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline sendJson (port : int) (json : string) = async { > let host = "127.0.0.1" > let! portOpen = SpiralNetworking.test_port_open host port > if portOpen then > try > let connection = > HubConnectionBuilder().WithUrl($"http://{host}:{port}").Build() > do! connection.StartAsync () |> Async.AwaitTask > let! result = connection.InvokeAsync<string>("ClientToServerMsg", > json) |> Async.AwaitTask > do! connection.StopAsync () |> Async.AwaitTask > trace Verbose (fun () -> $"Supervisor.sendJson / port: {port} / > json: {json |> SpiralSm.ellipsis_end 200} / result: {result |> Option.ofObj |> > Option.map (SpiralSm.ellipsis_end 200)}") _locals > return Some result > with ex -> > trace Critical (fun () -> $"Supervisor.sendJson / port: {port} / > json: {json |> SpiralSm.ellipsis_end 200} / ex: {ex |> > SpiralSm.format_exception}") _locals > return None > else > trace Debug (fun () -> "Supervisor.sendJson / port: {port} / error: port > not open") _locals > return None > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### sendObj │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline sendObj port obj = > obj > |> System.Text.Json.JsonSerializer.Serialize > |> sendJson port > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### VSCPos │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > type VSCPos = {| line : int; character : int |} > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### VSCRange │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > type VSCRange = VSCPos * VSCPos > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### RString │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > type RString = VSCRange * string > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### TracedError │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > type TracedError = {| trace : string list; message : string |} > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### ClientErrorsRes │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > type ClientErrorsRes = > | FatalError of string > | TracedError of TracedError > | PackageErrors of {| uri : string; errors : RString list |} > | TokenizerErrors of {| uri : string; errors : RString list |} > | ParserErrors of {| uri : string; errors : RString list |} > | TypeErrors of {| uri : string; errors : RString list |} > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### workspaceRoot │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let workspaceRoot = SpiralFileSystem.get_workspace_root () > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### awaitCompiler │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline awaitCompiler port cancellationToken = async { > let host = "127.0.0.1" > let struct (ct, disposable) = cancellationToken |> > SpiralThreading.new_disposable_token > let! ct = ct |> SpiralAsync.merge_cancellation_token_with_default_async > > let compiler = MailboxProcessor.Start (fun inbox -> async { > let! availablePort = SpiralNetworking.get_available_port (Some 180) host > port > if availablePort <> port then > inbox.Post (port, false) > else > let compilerPath = > workspaceRoot </> "deps/The-Spiral-Language/The Spiral Language > 2/artifacts/bin/The Spiral Language 2/release" > |> System.IO.Path.GetFullPath > > let dllPath = compilerPath </> "Spiral.dll" > > let! exitCode, result = > SpiralRuntime.execution_options (fun x -> > { x with > l0 = $@"dotnet ""{dllPath}"" --port {availablePort} > --default-int i32 --default-float f64" > l1 = Some ct > l3 = Some (fun struct (_, line, _) -> async { > if line |> SpiralSm.contains > $"System.IO.IOException: Failed to bind to address http://{host}:{port}: address > already in use." then > inbox.Post (port, false) > > if line |> SpiralSm.contains $"Server bound to: > http://localhost:{availablePort}" then > let rec loop retry = async { > do! > SpiralNetworking.wait_for_port_access > (Some 100) true host availablePort > |> Async.runWithTimeoutAsync 500 > |> Async.Ignore > > let _locals () = $"port: {availablePort} / > retry: {retry} / {_locals ()}" > try > let pingObj = {| Ping = true |} > let! pingResult = pingObj |> sendObj > availablePort > trace Verbose (fun () -> $"awaitCompiler > / Ping / result: '{pingResult}'") _locals > > inbox.Post (availablePort, true) > with ex -> > trace Verbose (fun () -> $"awaitCompiler > / Ping / ex: {ex |> SpiralSm.format_exception}") _locals > do! Async.Sleep 10 > do! loop (retry + 1) > } > do! loop 0 > }) > l6 = Some workspaceRoot > } > ) > |> SpiralRuntime.execute_with_options_async > > trace Debug (fun () -> $"awaitCompiler / exitCode: {exitCode} / > result: {result}") _locals > disposable.Dispose () > }, ct) > > let! serverPort, managed = compiler.Receive () > > let connection = > HubConnectionBuilder().WithUrl($"http://{host}:{serverPort}").Build () > do! connection.StartAsync () |> Async.AwaitTask > > let event = Event<_> () > let disposable' = connection.On<string> ("ServerToClientMsg", event.Trigger) > let stream = > FSharp.Control.AsyncSeq.unfoldAsync > (fun () -> async { > let! msg = event.Publish |> Async.AwaitEvent > return Some (msg |> > FSharp.Json.Json.deserialize<ClientErrorsRes>, ()) > }) > () > > let disposable' = > new_disposable (fun () -> > async { > disposable'.Dispose () > do! connection.StopAsync () |> Async.AwaitTask > disposable.Dispose () > if managed > then do! > SpiralNetworking.wait_for_port_access (Some 100) false host > serverPort > |> Async.runWithTimeoutAsync 1500 > |> Async.Ignore > } > |> Async.RunSynchronously > ) > > return > serverPort, > stream, > ct, > disposable' > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### getFilePathFromUri │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline getFilePathFromUri uri = > match System.Uri.TryCreate (uri, System.UriKind.Absolute) with > | true, uri -> uri.AbsolutePath |> System.IO.Path.GetFullPath > | _ -> failwith "invalid uri" > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### getCompilerPort │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline getCompilerPort () = > 13805 > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### serialize_obj │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let serializeObj obj = > try > obj > |> FSharp.Json.Json.serialize > |> SpiralSm.replace "\\\\" "\\" > |> SpiralSm.replace "\\r\\n" "\n" > |> SpiralSm.replace "\\n" "\n" > with ex -> > trace Critical (fun () -> "Supervisor.serialize_obj / obj: %A{obj}") > _locals > "" > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### Backend │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > type Backend = > | Fsharp > | Cuda > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### buildFile │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline buildFile backend timeout port cancellationToken path = > let rec loop retry = async { > let fullPath = path |> System.IO.Path.GetFullPath > let fileDir = fullPath |> System.IO.Path.GetDirectoryName > let fileName = fullPath |> System.IO.Path.GetFileNameWithoutExtension > let! code = fullPath |> SpiralFileSystem.read_all_text_async > > let stream, disposable = fileDir |> FileSystem.watchDirectory (fun _ -> > true) > use _ = disposable > > let struct (token, disposable) = SpiralThreading.new_disposable_token > cancellationToken > use _ = disposable > > let port = port |> Option.defaultWith getCompilerPort > let! serverPort, errors, ct, disposable = awaitCompiler port (Some > token) > use _ = disposable > > let outputFileName = > match backend with > | Fsharp -> $"{fileName}.fsx" > | Cuda -> $"{fileName}.py" > > let outputContentSeq = > stream > |> FSharp.Control.AsyncSeq.chooseAsync (function > | _, (FileSystem.FileSystemChange.Changed (path, Some text)) > when (path |> System.IO.Path.GetFileName) = outputFileName > -> > // fileDir </> path |> > SpiralFileSystem.read_all_text_retry_async > text |> Some |> Async.init > | _ -> None |> Async.init > ) > |> FSharp.Control.AsyncSeq.map (fun content -> > Some (content |> SpiralSm.replace "\r\n" "\n"), None > ) > > let inline printErrorData (data : {| uri : string; errors : RString list > |}) = > let fileName = data.uri |> System.IO.Path.GetFileName > let errors = > data.errors > |> List.map snd > |> SpiralSm.concat "\n" > $"{fileName}:\n{errors}" > > let errorsSeq = > errors > |> FSharp.Control.AsyncSeq.choose (fun error -> > match error with > | FatalError message -> > Some (message, error) > | TracedError data -> > Some (data.message, error) > | PackageErrors data when data.errors |> List.isEmpty |> not -> > Some (data |> printErrorData, error) > | TokenizerErrors data when data.errors |> List.isEmpty |> not > -> > Some (data |> printErrorData, error) > | ParserErrors data when data.errors |> List.isEmpty |> not -> > Some (data |> printErrorData, error) > | TypeErrors data when data.errors |> List.isEmpty |> not -> > Some (data |> printErrorData, error) > | _ -> None > ) > |> FSharp.Control.AsyncSeq.map (fun (message, error) -> > None, Some (message, error) > ) > > let timerSeq = > 500 > |> FSharp.Control.AsyncSeq.intervalMs > |> FSharp.Control.AsyncSeq.map (fun _ -> None, None) > > let outputSeq = > [[ outputContentSeq; errorsSeq; timerSeq ]] > |> FSharp.Control.AsyncSeq.mergeAll > > let! outputChild = > ((None, [[]], 0), outputSeq) > ||> FSharp.Control.AsyncSeq.scan ( > fun (outputContentResult, errors, typeErrorCount) > (outputContent, error) -> > trace Debug (fun () -> $"Supervisor.buildFile / > AsyncSeq.scan / outputContent:\n{outputContent |> Option.defaultValue > System.String.Empty |> SpiralSm.ellipsis_end 300} / errors: {errors |> > serializeObj} / outputContentResult: {outputContentResult} / typeErrorCount: > {typeErrorCount} / retry: {retry} / error: {error} / path: {path}") _locals > match outputContent, error with > | Some outputContent, None -> Some outputContent, errors, > typeErrorCount > | None, Some (_, FatalError "File main has a type error > somewhere in its path.") -> > outputContentResult, errors, typeErrorCount + 1 > | None, Some error -> outputContentResult, error :: errors, > typeErrorCount > | None, None when typeErrorCount >= 1 -> > outputContentResult, errors, typeErrorCount + 1 > | _ -> outputContentResult, errors, typeErrorCount > ) > |> FSharp.Control.AsyncSeq.takeWhileInclusive (fun (outputContent, > errors, typeErrorCount) -> > trace Debug (fun () -> $"Supervisor.buildFile / > takeWhileInclusive / outputContent:\n{outputContent |> Option.defaultValue > System.String.Empty |> SpiralSm.ellipsis_end 300} / errors: {errors |> > serializeObj} / typeErrorCount: {typeErrorCount} / retry: {retry} / path: > {path}") _locals > #if INTERACTIVE > let errorWait = 2 > #else > let errorWait = 2 > #endif > match outputContent, errors with > | None, [[]] when typeErrorCount > errorWait -> false > | None, [[]] -> true > | _ -> false > ) > |> FSharp.Control.AsyncSeq.tryLast > |> Async.withCancellationToken ct > |> Async.catch > |> Async.runWithTimeoutAsync timeout > |> Async.StartChild > > // do! Async.Sleep 60 > > let fullPathUri = fullPath |> SpiralFileSystem.normalize_path |> > SpiralFileSystem.new_file_uri > > let fileOpenObj = {| FileOpen = {| uri = fullPathUri; spiText = code |} > |} > let! _fileOpenResult = fileOpenObj |> sendObj serverPort > > // do! Async.Sleep 60 > > let backendId = > match backend with > | Fsharp -> "Fsharp" > | Cuda -> "Python + Cuda" > let buildFileObj = {| BuildFile = {| uri = fullPathUri; backend = > backendId |} |} > let! _buildFileResult = buildFileObj |> sendObj serverPort > > let! result, typeErrorCount = > outputChild > |> Async.map (function > | Some (Ok (Some (outputCode, errors, typeErrorCount))) -> > (outputCode, errors |> List.distinct |> List.rev), > typeErrorCount > | Some (Error ex) -> > trace Critical (fun () -> $"Supervisor.buildFile / error: > {ex |> SpiralSm.format_exception} / retry: {retry}") _locals > (None, [[]]), 0 > | _ -> (None, [[]]), 0 > ) > > match result with > | None, _ when typeErrorCount > 0 && retry = 0 -> > return! loop (retry + 1) > | _ -> > if fileDir |> SpiralSm.starts_with (workspaceRoot </> "target") then > let fileDirUri = fileDir |> SpiralFileSystem.normalize_path |> > SpiralFileSystem.new_file_uri > let fileDeleteObj = {| FileDelete = {| uris = [[| fileDirUri |]] > |} |} > let! _fileDeleteResult = fileDeleteObj |> sendObj serverPort > () > > let outputPath = fileDir </> outputFileName > return outputPath, result > } > loop 0 > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### SpiralInput │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > type SpiralInput = > | Spi of string * string option > | Spir of string > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### persistCode │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline persistCode (input: {| backend : Backend option; input: SpiralInput; > packages: string [[]] |}) = async { > let targetDir = workspaceRoot </> "target/spiral_Eval" > > let packagesDir = targetDir </> "packages" > > let hashHex = $"%A{input.backend}%A{input.input}" |> SpiralCrypto.hash_text > > let packageDir = packagesDir </> hashHex > packageDir |> System.IO.Directory.CreateDirectory |> ignore > > let moduleName = "main" > > let spirModule, spiModule = > match input.input with > | Spi (spi, Some spir) -> true, true > | Spi (spi, None) -> false, true > | Spir spir -> true, false > |> fun (spir, spi) -> > (if spir then $"{moduleName}_real*-" else ""), > if spi then moduleName else "" > > let libLinkTargetPath = workspaceRoot </> "lib/spiral" > let libLinkPath = packageDir </> "spiral" > > let packagesModule = > input.packages > |> Array.map (fun package -> > let path = workspaceRoot </> package > let packageName = path |> System.IO.Path.GetFileName > let libLinkPath = packageDir </> packageName > libLinkPath |> SpiralFileSystem.link_directory path > $"{packageName}-" > ) > |> String.concat "\n " > > let packageDir' = > if input.packages |> Array.isEmpty > then workspaceRoot </> "lib" > else > libLinkPath |> SpiralFileSystem.link_directory libLinkTargetPath > packageDir > > let spiprojPath = packageDir </> "package.spiproj" > let spiprojCode = > $"""packageDir: {packageDir'} > packages: > |core- > spiral- > {packagesModule} > modules: > {spirModule} > {spiModule} > """ > do! spiprojCode |> SpiralFileSystem.write_all_text_exists spiprojPath > > let spirPath = packageDir </> $"{moduleName}_real.spir" > let spiPath = packageDir </> $"{moduleName}.spi" > > let spirCode, spiCode = > match input.input with > | Spi (spi, Some spir) -> Some spir, Some spi > | Spi (spi, None) -> None, Some spi > | Spir spir -> Some spir, None > > match spirCode with > | Some spir -> do! spir |> SpiralFileSystem.write_all_text_exists spirPath > | None -> () > match spiCode with > | Some spi -> do! spi |> SpiralFileSystem.write_all_text_exists spiPath > | None -> () > > let spiralPath = > match input.input with > | Spi _ -> spiPath > | Spir _ -> spirPath > match input.backend with > | None -> return spiralPath, None > | Some backend -> > let outputFileName = > let fileName = > match input.input with > | Spi _ -> moduleName > | Spir _ -> $"{moduleName}_real" > match backend with > | Fsharp -> $"{fileName}.fsx" > | Cuda -> $"{fileName}.py" > let outputPath = packageDir </> outputFileName > if outputPath |> System.IO.File.Exists |> not > then return spiralPath, None > else > let! oldCode = spiralPath |> SpiralFileSystem.read_all_text_async > if oldCode <> (spiCode |> Option.defaultValue (spirCode |> > Option.defaultValue "")) > then return spiralPath, None > else > let! outputCode = outputPath |> > SpiralFileSystem.read_all_text_async > return spiralPath, Some (outputPath, outputCode |> > SpiralSm.replace "\r\n" "\n") > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### buildCode │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let buildCode backend packages isCache timeout cancellationToken input = async { > let! mainPath, outputCache = > persistCode {| input = input; backend = Some backend; packages = > packages |} > match outputCache with > | Some (outputPath, outputCode) when isCache -> return mainPath, > (outputPath, Some outputCode), [[]] > | _ -> > let! outputPath, (outputCode, errors) = mainPath |> buildFile backend > timeout None cancellationToken > return mainPath, (outputPath, outputCode), errors > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """inl app () = > console.write_line "text" > 1i32 > > inl main () = > app > |> dyn > |> ignore > """ > |> fun code -> Spi (code, None) > |> buildCode Fsharp [[||]] false 15000 None > |> Async.runWithTimeout 15000 > |> Option.map (fun (_, (_, outputContent), errors) -> outputContent, errors |> > List.map fst) > |> _assertEqual ( > Some ( > Some """let rec closure1 () () : unit = > let v0 : (string -> unit) = System.Console.WriteLine > let v1 : string = "text" > v0 v1 > and closure0 () () : int32 = > let v0 : unit = () > let v1 : (unit -> unit) = closure1() > let v2 : unit = (fun () -> v1 (); v0) () > 1 > let v0 : (unit -> int32) = closure0() > () > """, > [[]] > ) > ) > > ╭─[ 1.53s - stdout ]───────────────────────────────────────────────────────────╮ > │ 00:00:24 verbose #1 async.run_with_timeout_async / { timeout = 180 } │ > │ 00:00:13 debug #1 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\22ccd04317d5605c65f81c7f777 │ > │ 766f357e85dc69f2d6d04b9dc60aebd08a0d6\main.spi │ > │ 00:00:13 debug #2 Supervisor.buildFile / AsyncSeq.scan / │ > │ outputContent: │ > │ / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / │ > │ error: / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\22ccd04317d5605c65f81c7f777 │ > │ 766f357e85dc69f2d6d04b9dc60aebd08a0d6\main.spi │ > │ 00:00:13 debug #3 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\22ccd04317d5605c65f81c7f777 │ > │ 766f357e85dc69f2d6d04b9dc60aebd08a0d6\main.spi │ > │ 00:00:13 verbose #4 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"inl app () =\n console.write_line │ > │ \u0022text\u0022\n 1i32\n\ninl main │ > │ ...et/spiral_Eval/packages/22ccd04317d5605c65f81c7f777766f357e85dc69f2d6d04b │ > │ 9dc60aebd08a0d6/main.spi"}} / result: │ > │ 00:00:13 verbose #5 Supervisor.sendJson / port: 13805 / json: │ > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ > │ spiral_Eval/packages/22ccd04317d5605c65f81c7f777766f357e85dc69f2d6d04b9dc60a │ > │ ebd08a0d6/main.spi"}} / result: │ > │ 00:00:14 debug #6 Supervisor.buildFile / AsyncSeq.scan / │ > │ outputContent: │ > │ let rec closure1 () () : unit = │ > │ let v0 : (string -> unit) = System.Console.WriteLine │ > │ let v1 : string = "text" │ > │ v0 v1 │ > │ and closure0 () () : i...t v0 : unit = () │ > │ let v1 : (unit -> unit) = closure1() │ > │ let v2 : unit = (fun () -> v1 (); v0) () │ > │ 1 │ > │ let v0 : (unit -> int32) = closure0() │ > │ () │ > │ / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / │ > │ error: / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\22ccd04317d5605c65f81c7f777 │ > │ 766f357e85dc69f2d6d04b9dc60aebd08a0d6\main.spi │ > │ 00:00:14 debug #7 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ let rec closure1 () () : unit = │ > │ let v0 : (string -> unit) = System.Console.WriteLine │ > │ let v1 : string = "text" │ > │ v0 v1 │ > │ and closure0 () () : i...t v0 : unit = () │ > │ let v1 : (unit -> unit) = closure1() │ > │ let v2 : unit = (fun () -> v1 (); v0) () │ > │ 1 │ > │ let v0 : (unit -> int32) = closure0() │ > │ () │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\22ccd04317d5605c65f81c7f777 │ > │ 766f357e85dc69f2d6d04b9dc60aebd08a0d6\main.spi │ > │ 00:00:14 verbose #8 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/spiral_Eval/packages/22ccd04317d5605c65 │ > │ f81c7f777766f357e85dc69f2d6d04b9dc60aebd08a0d6"]}} / result: │ > │ 00:00:14 debug #9 FileSystem.watchWithFilter / Disposing watch stream │ > │ / filter: FileName, LastWrite │ > │ Some │ > │ (Some │ > │ "let rec closure1 () () : unit = │ > │ let v0 : (string -> unit) = System.Console.WriteLine │ > │ let v1 : string = "text" │ > │ v0 v1 │ > │ and closure0 () () : int32 = │ > │ let v0 : unit = () │ > │ let v1 : (unit -> unit) = closure1() │ > │ let v2 : unit = (fun () -> v1 (); v0) () │ > │ 1 │ > │ let v0 : (unit -> int32) = closure0() │ > │ () │ > │ ", │ > │ []) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > "" > |> fun code -> Spi (code, None) > |> buildCode Fsharp [[||]] false 10000 None > |> Async.runWithTimeout 10000 > |> Option.map (fun (_, (_, outputContent), errors) -> outputContent, errors |> > List.map fst) > |> _assertEqual ( > Some ( > None, > [[ "Cannot find `main` in file main." ]] > ) > ) > > ╭─[ 723.37ms - stdout ]────────────────────────────────────────────────────────╮ > │ 00:00:26 verbose #2 async.run_with_timeout_async / { timeout = 180 } │ > │ 00:00:14 debug #10 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\a65342ccc7da0da967b18d8e705 │ > │ d0260e9a932e5e68c0feb33db55c4d28170aa\main.spi │ > │ 00:00:14 debug #11 Supervisor.buildFile / AsyncSeq.scan / │ > │ outputContent: │ > │ / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / │ > │ error: / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\a65342ccc7da0da967b18d8e705 │ > │ d0260e9a932e5e68c0feb33db55c4d28170aa\main.spi │ > │ 00:00:14 debug #12 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\a65342ccc7da0da967b18d8e705 │ > │ d0260e9a932e5e68c0feb33db55c4d28170aa\main.spi │ > │ 00:00:14 verbose #13 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"","uri":"file:///c:/home/git/polyglot/target/spiral_ │ > │ Eval/packages/a65342ccc7da0da967b18d8e705d0260e9a932e5e68c0feb33db55c4d28170 │ > │ aa/main.spi"}} / result: │ > │ 00:00:14 verbose #14 Supervisor.sendJson / port: 13805 / json: │ > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ > │ spiral_Eval/packages/a65342ccc7da0da967b18d8e705d0260e9a932e5e68c0feb33db55c │ > │ 4d28170aa/main.spi"}} / result: │ > │ 00:00:15 debug #15 Supervisor.buildFile / AsyncSeq.scan / │ > │ outputContent: │ > │ / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / │ > │ error: Some((Cannot find `main` in file main., FatalError "Cannot find │ > │ `main` in file main.")) / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\a65342ccc7da0da967b18d8e705 │ > │ d0260e9a932e5e68c0feb33db55c4d28170aa\main.spi │ > │ 00:00:15 debug #16 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [ │ > │ [ │ > │ "Cannot find `main` in file main.", │ > │ { │ > │ "FatalError": "Cannot find `main` in file main." │ > │ } │ > │ ] │ > │ ] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\a65342ccc7da0da967b18d8e705 │ > │ d0260e9a932e5e68c0feb33db55c4d28170aa\main.spi │ > │ 00:00:15 verbose #17 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/spiral_Eval/packages/a65342ccc7da0da967 │ > │ b18d8e705d0260e9a932e5e68c0feb33db55c4d28170aa"]}} / result: │ > │ 00:00:15 debug #18 FileSystem.watchWithFilter / Disposing watch │ > │ stream / filter: FileName, LastWrite │ > │ Some (None, ["Cannot find `main` in file main."]) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """inl main () = > 1i32 / 0i32 > """ > |> fun code -> Spi (code, None) > |> buildCode Fsharp [[||]] false 10000 None > |> Async.runWithTimeout 10000 > |> Option.map (fun (_, (_, outputContent), errors) -> outputContent, errors |> > List.map fst) > |> _assertEqual ( > Some ( > None, > [[ "An attempt to divide by zero has been detected at compile time." ]] > ) > ) > > ╭─[ 856.08ms - stdout ]────────────────────────────────────────────────────────╮ > │ 00:00:27 verbose #3 async.run_with_timeout_async / { timeout = 180 } │ > │ 00:00:15 debug #19 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\fef9812d9b06b75b1ab26589e52 │ > │ c6d6ff05910b73ead9e8c4f27f88d2a5cdfb2\main.spi │ > │ 00:00:15 debug #20 Supervisor.buildFile / AsyncSeq.scan / │ > │ outputContent: │ > │ / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / │ > │ error: / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\fef9812d9b06b75b1ab26589e52 │ > │ c6d6ff05910b73ead9e8c4f27f88d2a5cdfb2\main.spi │ > │ 00:00:15 debug #21 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\fef9812d9b06b75b1ab26589e52 │ > │ c6d6ff05910b73ead9e8c4f27f88d2a5cdfb2\main.spi │ > │ 00:00:15 verbose #22 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"inl main () =\n 1i32 / │ > │ 0i32\n","uri":"file:///c:/home/git/polyglot/target/spiral_Eval/packages/fef9 │ > │ 812d9b06b75b1ab26589e52c6d6ff05910b73ead9e8c4f27f88d2a5cdfb2/main.spi"}} / │ > │ result: │ > │ 00:00:15 verbose #23 Supervisor.sendJson / port: 13805 / json: │ > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ > │ spiral_Eval/packages/fef9812d9b06b75b1ab26589e52c6d6ff05910b73ead9e8c4f27f88 │ > │ d2a5cdfb2/main.spi"}} / result: │ > │ 00:00:15 debug #24 Supervisor.buildFile / AsyncSeq.scan / │ > │ outputContent: │ > │ / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / │ > │ error: Some((An attempt to divide by zero has been detected at compile │ > │ time., TracedError │ > │ { message = "An attempt to divide by zero has been detected at compile │ > │ time." │ > │ trace = │ > │ ["Error trace on line: 1, column: 10 in module: │ > │ c:/home/git/polyglot/target/spiral_Eval/packages/fef9812d9b06b75b1ab26589e52 │ > │ c6d6ff05910b73ead9e8c4f27f88d2a5cdfb2/main.spi. │ > │ inl main () = │ > │ ^ │ > │ "; │ > │ "Error trace on line: 2, column: 5 in module: │ > │ c:/home/git/polyglot/target/spiral_Eval/packages/fef9812d9b06b75b1ab26589e52 │ > │ c6d6ff05910b73ead9e8c4f27f88d2a5cdfb2/main.spi. │ > │ 1i32 / 0i32 │ > │ ^ │ > │ "] })) / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\fef9812d9b06b75b1ab26589e52 │ > │ c6d6ff05910b73ead9e8c4f27f88d2a5cdfb2\main.spi │ > │ 00:00:15 debug #25 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [ │ > │ [ │ > │ "An attempt to divide by zero has been detected at compile time.", │ > │ { │ > │ "TracedError": { │ > │ "message": "An attempt to divide by zero has been detected at │ > │ compile time.", │ > │ "trace": [ │ > │ "Error trace on line: 1, column: 10 in module: │ > │ c:/home/git/polyglot/target/spiral_Eval/packages/fef9812d9b06b75b1ab26589e52 │ > │ c6d6ff05910b73ead9e8c4f27f88d2a5cdfb2/main.spi. │ > │ inl main () = │ > │ ^ │ > │ ", │ > │ "Error trace on line: 2, column: 5 in module: │ > │ c:/home/git/polyglot/target/spiral_Eval/packages/fef9812d9b06b75b1ab26589e52 │ > │ c6d6ff05910b73ead9e8c4f27f88d2a5cdfb2/main.spi. │ > │ 1i32 / 0i32 │ > │ ^ │ > │ " │ > │ ] │ > │ } │ > │ } │ > │ ] │ > │ ] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\fef9812d9b06b75b1ab26589e52 │ > │ c6d6ff05910b73ead9e8c4f27f88d2a5cdfb2\main.spi │ > │ 00:00:15 verbose #26 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/spiral_Eval/packages/fef9812d9b06b75b1a │ > │ b26589e52c6d6ff05910b73ead9e8c4f27f88d2a5cdfb2"]}} / result: │ > │ 00:00:15 debug #27 FileSystem.watchWithFilter / Disposing watch │ > │ stream / filter: FileName, LastWrite │ > │ Some (None, ["An attempt to divide by zero has been detected at compile │ > │ time."]) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """inl main () = > 1 + "" > """ > |> fun code -> Spi (code, None) > |> buildCode Fsharp [[||]] false 10000 None > |> Async.runWithTimeout 10000 > |> Option.map (fun (_, (_, outputContent), errors) -> outputContent, errors |> > List.map fst) > |> _assertEqual ( > Some ( > None, > [[ > "main.spi: > Constraint satisfaction error. > Got: string > Fails to satisfy: number" > ]] > ) > ) > > ╭─[ 764.57ms - stdout ]────────────────────────────────────────────────────────╮ > │ 00:00:28 verbose #4 async.run_with_timeout_async / { timeout = 180 } │ > │ 00:00:16 debug #28 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\c030f84f8e553befcbdd9aabeac │ > │ e67685221d91a46e3655199e42df713504aa0\main.spi │ > │ 00:00:16 debug #29 Supervisor.buildFile / AsyncSeq.scan / │ > │ outputContent: │ > │ / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / │ > │ error: / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\c030f84f8e553befcbdd9aabeac │ > │ e67685221d91a46e3655199e42df713504aa0\main.spi │ > │ 00:00:16 debug #30 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\c030f84f8e553befcbdd9aabeac │ > │ e67685221d91a46e3655199e42df713504aa0\main.spi │ > │ 00:00:16 verbose #31 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"inl main () =\n 1 \u002B │ > │ \u0022\u0022\n","uri":"file:///c:/home/git/polyg...et/spiral_Eval/packages/c │ > │ 030f84f8e553befcbdd9aabeace67685221d91a46e3655199e42df713504aa0/main.spi"}} │ > │ / result: │ > │ 00:00:16 verbose #32 Supervisor.sendJson / port: 13805 / json: │ > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ > │ spiral_Eval/packages/c030f84f8e553befcbdd9aabeace67685221d91a46e3655199e42df │ > │ 713504aa0/main.spi"}} / result: │ > │ 00:00:16 debug #33 Supervisor.buildFile / AsyncSeq.scan / │ > │ outputContent: │ > │ / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / │ > │ error: Some((main.spi: │ > │ Constraint satisfaction error. │ > │ Got: string │ > │ Fails to satisfy: number, TypeErrors │ > │ { errors = │ > │ [(({ character = 8 │ > │ line = 1 }, { character = 10 │ > │ line = 1 }), │ > │ "Constraint satisfaction error. │ > │ Got: string │ > │ Fails to satisfy: number")] │ > │ uri = │ > │ │ > │ "file:///c:/home/git/polyglot/target/spiral_Eval/packages/c030f84f8e553befcb │ > │ dd9aabeace67685221d91a46e3655199e42df713504aa0/main.spi" })) / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\c030f84f8e553befcbdd9aabeac │ > │ e67685221d91a46e3655199e42df713504aa0\main.spi │ > │ 00:00:16 debug #34 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [ │ > │ [ │ > │ "main.spi: │ > │ Constraint satisfaction error. │ > │ Got: string │ > │ Fails to satisfy: number", │ > │ { │ > │ "TypeErrors": { │ > │ "errors": [ │ > │ [ │ > │ [ │ > │ { │ > │ "character": 8, │ > │ "line": 1 │ > │ }, │ > │ { │ > │ "character": 10, │ > │ "line": 1 │ > │ } │ > │ ], │ > │ "Constraint satisfaction error. │ > │ Got: string │ > │ Fails to satisfy: number" │ > │ ] │ > │ ], │ > │ "uri": │ > │ "file:///c:/home/git/polyglot/target/spiral_Eval/packages/c030f84f8e553befcb │ > │ dd9aabeace67685221d91a46e3655199e42df713504aa0/main.spi" │ > │ } │ > │ } │ > │ ] │ > │ ] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\c030f84f8e553befcbdd9aabeac │ > │ e67685221d91a46e3655199e42df713504aa0\main.spi │ > │ 00:00:16 verbose #35 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/spiral_Eval/packages/c030f84f8e553befcb │ > │ dd9aabeace67685221d91a46e3655199e42df713504aa0"]}} / result: │ > │ 00:00:16 debug #36 FileSystem.watchWithFilter / Disposing watch │ > │ stream / filter: FileName, LastWrite │ > │ Some (None, ["main.spi: │ > │ Constraint satisfaction error. │ > │ Got: string │ > │ Fails to satisfy: number"]) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """inl main () = > x + y > """ > |> fun code -> Spi (code, None) > |> buildCode Fsharp [[||]] false 10000 None > |> Async.runWithTimeout 10000 > |> Option.map (fun (_, (_, outputContent), errors) -> outputContent, errors |> > List.map fst) > |> _assertEqual ( > Some ( > None, > [[ > "main.spi: > Unbound variable: x. > Unbound variable: y." > ]] > ) > ) > > ╭─[ 499.77ms - stdout ]────────────────────────────────────────────────────────╮ > │ 00:00:28 verbose #5 async.run_with_timeout_async / { timeout = 180 } │ > │ 00:00:17 debug #37 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\6cdeec507f9de5ba9c8429cfa70 │ > │ 49b777a622aa3bf7333b151c767fde35dc5d1\main.spi │ > │ 00:00:17 debug #38 Supervisor.buildFile / AsyncSeq.scan / │ > │ outputContent: │ > │ / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / │ > │ error: / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\6cdeec507f9de5ba9c8429cfa70 │ > │ 49b777a622aa3bf7333b151c767fde35dc5d1\main.spi │ > │ 00:00:17 debug #39 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\6cdeec507f9de5ba9c8429cfa70 │ > │ 49b777a622aa3bf7333b151c767fde35dc5d1\main.spi │ > │ 00:00:17 verbose #40 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"inl main () =\n x \u002B │ > │ y\n","uri":"file:///c:/home/git/polyglot/target/spiral_Eval/packages/6cdeec5 │ > │ 07f9de5ba9c8429cfa7049b777a622aa3bf7333b151c767fde35dc5d1/main.spi"}} / │ > │ result: │ > │ 00:00:17 verbose #41 Supervisor.sendJson / port: 13805 / json: │ > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ > │ spiral_Eval/packages/6cdeec507f9de5ba9c8429cfa7049b777a622aa3bf7333b151c767f │ > │ de35dc5d1/main.spi"}} / result: │ > │ 00:00:17 debug #42 Supervisor.buildFile / AsyncSeq.scan / │ > │ outputContent: │ > │ / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / │ > │ error: Some((main.spi: │ > │ Unbound variable: x. │ > │ Unbound variable: y., TypeErrors │ > │ { errors = │ > │ [(({ character = 4 │ > │ line = 1 }, { character = 5 │ > │ line = 1 }), "Unbound variable: x."); │ > │ (({ character = 8 │ > │ line = 1 }, { character = 9 │ > │ line = 1 }), "Unbound variable: y.")] │ > │ uri = │ > │ │ > │ "file:///c:/home/git/polyglot/target/spiral_Eval/packages/6cdeec507f9de5ba9c │ > │ 8429cfa7049b777a622aa3bf7333b151c767fde35dc5d1/main.spi" })) / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\6cdeec507f9de5ba9c8429cfa70 │ > │ 49b777a622aa3bf7333b151c767fde35dc5d1\main.spi │ > │ 00:00:17 debug #43 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [ │ > │ [ │ > │ "main.spi: │ > │ Unbound variable: x. │ > │ Unbound variable: y.", │ > │ { │ > │ "TypeErrors": { │ > │ "errors": [ │ > │ [ │ > │ [ │ > │ { │ > │ "character": 4, │ > │ "line": 1 │ > │ }, │ > │ { │ > │ "character": 5, │ > │ "line": 1 │ > │ } │ > │ ], │ > │ "Unbound variable: x." │ > │ ], │ > │ [ │ > │ [ │ > │ { │ > │ "character": 8, │ > │ "line": 1 │ > │ }, │ > │ { │ > │ "character": 9, │ > │ "line": 1 │ > │ } │ > │ ], │ > │ "Unbound variable: y." │ > │ ] │ > │ ], │ > │ "uri": │ > │ "file:///c:/home/git/polyglot/target/spiral_Eval/packages/6cdeec507f9de5ba9c │ > │ 8429cfa7049b777a622aa3bf7333b151c767fde35dc5d1/main.spi" │ > │ } │ > │ } │ > │ ] │ > │ ] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\6cdeec507f9de5ba9c8429cfa70 │ > │ 49b777a622aa3bf7333b151c767fde35dc5d1\main.spi │ > │ 00:00:17 verbose #44 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/spiral_Eval/packages/6cdeec507f9de5ba9c │ > │ 8429cfa7049b777a622aa3bf7333b151c767fde35dc5d1"]}} / result: │ > │ 00:00:17 debug #45 FileSystem.watchWithFilter / Disposing watch │ > │ stream / filter: FileName, LastWrite │ > │ Some (None, ["main.spi: │ > │ Unbound variable: x. │ > │ Unbound variable: y."]) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """ > inl main () = > real > inl unbox_real forall a. (obj : a) : a = > typecase obj with > | _ => obj > unbox_real () > () > """ > |> fun code -> Spi (code, None) > |> buildCode Fsharp [[||]] false 10000 None > |> Async.runWithTimeout 10000 > |> Option.map (fun (_, (_, outputContent), errors) -> outputContent, errors |> > List.map fst) > |> _assertEqual ( > Some ( > None, > [[ "Cannot apply a forall with a term." ]] > ) > ) > > ╭─[ 846.82ms - stdout ]────────────────────────────────────────────────────────╮ > │ 00:00:29 verbose #6 async.run_with_timeout_async / { timeout = 180 } │ > │ 00:00:17 debug #46 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\667528659dc2e5af51a6ec17f17 │ > │ 74bd7ffff5b5a47e4e117eec78e740987f29a\main.spi │ > │ 00:00:17 debug #47 Supervisor.buildFile / AsyncSeq.scan / │ > │ outputContent: │ > │ / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / │ > │ error: / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\667528659dc2e5af51a6ec17f17 │ > │ 74bd7ffff5b5a47e4e117eec78e740987f29a\main.spi │ > │ 00:00:17 debug #48 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\667528659dc2e5af51a6ec17f17 │ > │ 74bd7ffff5b5a47e4e117eec78e740987f29a\main.spi │ > │ 00:00:17 verbose #49 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"\ninl main () =\n real\n inl unbox_real │ > │ forall a. (obj : a) : a │ > │ =\...et/spiral_Eval/packages/667528659dc2e5af51a6ec17f1774bd7ffff5b5a47e4e11 │ > │ 7eec78e740987f29a/main.spi"}} / result: │ > │ 00:00:17 verbose #50 Supervisor.sendJson / port: 13805 / json: │ > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ > │ spiral_Eval/packages/667528659dc2e5af51a6ec17f1774bd7ffff5b5a47e4e117eec78e7 │ > │ 40987f29a/main.spi"}} / result: │ > │ 00:00:18 debug #51 Supervisor.buildFile / AsyncSeq.scan / │ > │ outputContent: │ > │ / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / │ > │ error: Some((Cannot apply a forall with a term., TracedError │ > │ { message = "Cannot apply a forall with a term." │ > │ trace = │ > │ ["Error trace on line: 2, column: 10 in module: │ > │ c:/home/git/polyglot/target/spiral_Eval/packages/667528659dc2e5af51a6ec17f17 │ > │ 74bd7ffff5b5a47e4e117eec78e740987f29a/main.spi. │ > │ inl main () = │ > │ ^ │ > │ "; │ > │ "Error trace on line: 4, column: 9 in module: │ > │ c:/home/git/polyglot/target/spiral_Eval/packages/667528659dc2e5af51a6ec17f17 │ > │ 74bd7ffff5b5a47e4e117eec78e740987f29a/main.spi. │ > │ inl unbox_real forall a. (obj : a) : a = │ > │ ^ │ > │ "; │ > │ "Error trace on line: 7, column: 9 in module: │ > │ c:/home/git/polyglot/target/spiral_Eval/packages/667528659dc2e5af51a6ec17f17 │ > │ 74bd7ffff5b5a47e4e117eec78e740987f29a/main.spi. │ > │ unbox_real () │ > │ ^ │ > │ "] })) / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\667528659dc2e5af51a6ec17f17 │ > │ 74bd7ffff5b5a47e4e117eec78e740987f29a\main.spi │ > │ 00:00:18 debug #52 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [ │ > │ [ │ > │ "Cannot apply a forall with a term.", │ > │ { │ > │ "TracedError": { │ > │ "message": "Cannot apply a forall with a term.", │ > │ "trace": [ │ > │ "Error trace on line: 2, column: 10 in module: │ > │ c:/home/git/polyglot/target/spiral_Eval/packages/667528659dc2e5af51a6ec17f17 │ > │ 74bd7ffff5b5a47e4e117eec78e740987f29a/main.spi. │ > │ inl main () = │ > │ ^ │ > │ ", │ > │ "Error trace on line: 4, column: 9 in module: │ > │ c:/home/git/polyglot/target/spiral_Eval/packages/667528659dc2e5af51a6ec17f17 │ > │ 74bd7ffff5b5a47e4e117eec78e740987f29a/main.spi. │ > │ inl unbox_real forall a. (obj : a) : a = │ > │ ^ │ > │ ", │ > │ "Error trace on line: 7, column: 9 in module: │ > │ c:/home/git/polyglot/target/spiral_Eval/packages/667528659dc2e5af51a6ec17f17 │ > │ 74bd7ffff5b5a47e4e117eec78e740987f29a/main.spi. │ > │ unbox_real () │ > │ ^ │ > │ " │ > │ ] │ > │ } │ > │ } │ > │ ] │ > │ ] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\667528659dc2e5af51a6ec17f17 │ > │ 74bd7ffff5b5a47e4e117eec78e740987f29a\main.spi │ > │ 00:00:18 verbose #53 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/spiral_Eval/packages/667528659dc2e5af51 │ > │ a6ec17f1774bd7ffff5b5a47e4e117eec78e740987f29a"]}} / result: │ > │ 00:00:18 debug #54 FileSystem.watchWithFilter / Disposing watch │ > │ stream / filter: FileName, LastWrite │ > │ Some (None, ["Cannot apply a forall with a term."]) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """ > inl main () = > real > inl unbox_real forall a. (obj : a) : a = > typecase obj with > | _ => obj > unbox_real `i32 1 > """ > |> fun code -> Spi (code, None) > |> buildCode Fsharp [[||]] false 10000 None > |> Async.runWithTimeout 10000 > |> Option.map (fun (_, (_, outputContent), errors) -> outputContent, errors |> > List.map fst) > |> _assertEqual ( > Some ( > None, > [[ "The main function should not have a forall." ]] > ) > ) > > ╭─[ 770.53ms - stdout ]────────────────────────────────────────────────────────╮ > │ 00:00:30 verbose #7 async.run_with_timeout_async / { timeout = 180 } │ > │ 00:00:18 debug #55 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\0ba44c42df309b790acdf4f9fc5 │ > │ 5fcc7912380f5dd2d90fad118bad793251c4f\main.spi │ > │ 00:00:18 debug #56 Supervisor.buildFile / AsyncSeq.scan / │ > │ outputContent: │ > │ / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / │ > │ error: / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\0ba44c42df309b790acdf4f9fc5 │ > │ 5fcc7912380f5dd2d90fad118bad793251c4f\main.spi │ > │ 00:00:18 debug #57 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\0ba44c42df309b790acdf4f9fc5 │ > │ 5fcc7912380f5dd2d90fad118bad793251c4f\main.spi │ > │ 00:00:18 verbose #58 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"\ninl main () =\n real\n inl unbox_real │ > │ forall a. (obj : a) : a │ > │ =\...et/spiral_Eval/packages/0ba44c42df309b790acdf4f9fc55fcc7912380f5dd2d90f │ > │ ad118bad793251c4f/main.spi"}} / result: │ > │ 00:00:18 verbose #59 Supervisor.sendJson / port: 13805 / json: │ > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ > │ spiral_Eval/packages/0ba44c42df309b790acdf4f9fc55fcc7912380f5dd2d90fad118bad │ > │ 793251c4f/main.spi"}} / result: │ > │ 00:00:18 debug #60 Supervisor.buildFile / AsyncSeq.scan / │ > │ outputContent: │ > │ / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / │ > │ error: Some((The main function should not have a forall., TracedError { │ > │ message = "The main function should not have a forall." │ > │ trace = [] })) / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\0ba44c42df309b790acdf4f9fc5 │ > │ 5fcc7912380f5dd2d90fad118bad793251c4f\main.spi │ > │ 00:00:18 debug #61 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [ │ > │ [ │ > │ "The main function should not have a forall.", │ > │ { │ > │ "TracedError": { │ > │ "message": "The main function should not have a forall.", │ > │ "trace": [] │ > │ } │ > │ } │ > │ ] │ > │ ] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\0ba44c42df309b790acdf4f9fc5 │ > │ 5fcc7912380f5dd2d90fad118bad793251c4f\main.spi │ > │ 00:00:18 verbose #62 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/spiral_Eval/packages/0ba44c42df309b790a │ > │ cdf4f9fc55fcc7912380f5dd2d90fad118bad793251c4f"]}} / result: │ > │ 00:00:18 debug #63 FileSystem.watchWithFilter / Disposing watch │ > │ stream / filter: FileName, LastWrite │ > │ Some (None, ["The main function should not have a forall."]) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """ > inl init_series start end inc = > inl total : f64 = conv ((end - start) / inc) + 1 > listm.init total (conv >> (*) inc >> (+) start) : list f64 > > type integration = (f64 -> f64) -> f64 -> f64 -> f64 > > inl integral dt : integration = > fun f a b => > init_series (a + dt / 2) (b - dt / 2) dt > |> listm.map (f >> (*) dt) > |> listm.fold (+) 0 > > inl main () = > integral 0.1 (fun x => x ** 2) 0 1 > """ > |> fun code -> Spi (code, None) > |> buildCode Fsharp [[||]] false 10000 None > |> Async.runWithTimeout 10000 > |> Option.map (fun (_, (_, outputContent), errors) -> outputContent, errors |> > List.map fst) > |> _assertEqual ( > Some ( > Some "0.3325000000000001\n", > [[]] > ) > ) > > ╭─[ 894.45ms - stdout ]────────────────────────────────────────────────────────╮ > │ 00:00:30 verbose #8 async.run_with_timeout_async / { timeout = 180 } │ > │ 00:00:19 debug #64 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\c127414de2a2a92d9fd93ea5a8e │ > │ 9312a6aad9129ffd3cbd56ac7f0327106f1db\main.spi │ > │ 00:00:19 debug #65 Supervisor.buildFile / AsyncSeq.scan / │ > │ outputContent: │ > │ / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / │ > │ error: / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\c127414de2a2a92d9fd93ea5a8e │ > │ 9312a6aad9129ffd3cbd56ac7f0327106f1db\main.spi │ > │ 00:00:19 debug #66 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\c127414de2a2a92d9fd93ea5a8e │ > │ 9312a6aad9129ffd3cbd56ac7f0327106f1db\main.spi │ > │ 00:00:19 verbose #67 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"\ninl init_series start end inc =\n inl total : │ > │ f64 = conv ((end - │ > │ start)...et/spiral_Eval/packages/c127414de2a2a92d9fd93ea5a8e9312a6aad9129ffd │ > │ 3cbd56ac7f0327106f1db/main.spi"}} / result: │ > │ 00:00:19 verbose #68 Supervisor.sendJson / port: 13805 / json: │ > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ > │ spiral_Eval/packages/c127414de2a2a92d9fd93ea5a8e9312a6aad9129ffd3cbd56ac7f03 │ > │ 27106f1db/main.spi"}} / result: │ > │ 00:00:19 debug #69 Supervisor.buildFile / AsyncSeq.scan / │ > │ outputContent: │ > │ 0.3325000000000001 │ > │ / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / │ > │ error: / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\c127414de2a2a92d9fd93ea5a8e │ > │ 9312a6aad9129ffd3cbd56ac7f0327106f1db\main.spi │ > │ 00:00:19 debug #70 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ 0.3325000000000001 │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\c127414de2a2a92d9fd93ea5a8e │ > │ 9312a6aad9129ffd3cbd56ac7f0327106f1db\main.spi │ > │ 00:00:19 verbose #71 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/spiral_Eval/packages/c127414de2a2a92d9f │ > │ d93ea5a8e9312a6aad9129ffd3cbd56ac7f0327106f1db"]}} / result: │ > │ 00:00:19 debug #72 FileSystem.watchWithFilter / Disposing watch │ > │ stream / filter: FileName, LastWrite │ > │ Some (Some "0.3325000000000001 │ > │ ", []) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """ > inl init_series start end inc = > inl total : f64 = conv ((end - start) / inc) + 1 > listm.init total (conv >> (*) inc >> (+) start) : list f64 > > type integration = (f64 -> f64) -> f64 -> f64 -> f64 > > inl integral dt : integration = > fun f a b => > init_series (a + dt / 2) (b - dt / 2) dt > |> listm.map (f >> (*) dt) > |> listm.fold (+) 0 > > inl main () = > integral 0.1 (fun x => x ** 2) 0 1 > """ > |> fun code -> Spi (code, None) > |> buildCode Cuda [[||]] false 10000 None > |> Async.runWithTimeout 10000 > |> Option.map (fun (_, (_, outputContent), errors) -> outputContent, errors |> > List.map fst) > |> _assertEqual ( > Some ( > Some @"kernel = r"""""" > """""" > class static_array(): > def __init__(self, length): > self.ptr = [[]] > for _ in range(length): > self.ptr.append(None) > > def __getitem__(self, index): > assert 0 <= index < len(self.ptr), ""The get index needs to be in > range."" > return self.ptr[[index]] > > def __setitem__(self, index, value): > assert 0 <= index < len(self.ptr), ""The set index needs to be in > range."" > self.ptr[[index]] = value > > class static_array_list(static_array): > def __init__(self, length): > super().__init__(length) > self.length = 0 > > def __getitem__(self, index): > assert 0 <= index < self.length, ""The get index needs to be in range."" > return self.ptr[[index]] > > def __setitem__(self, index, value): > assert 0 <= index < self.length, ""The set index needs to be in range."" > self.ptr[[index]] = value > > def push(self,value): > assert (self.length < len(self.ptr)), ""The length before pushing has to > be less than the maximum length of the array."" > self.ptr[[self.length]] = value > self.length += 1 > > def pop(self): > assert (0 < self.length), ""The length before popping has to be greater > than 0."" > self.length -= 1 > return self.ptr[[self.length]] > > def unsafe_set_length(self,i): > assert 0 <= i <= len(self.ptr), ""The new length has to be in range."" > self.length = i > > class dynamic_array(static_array): > pass > > class dynamic_array_list(static_array_list): > def length_(self): return self.length > > import cupy as cp > from dataclasses import dataclass > from typing import NamedTuple, Union, Callable, Tuple > i8 = i16 = i32 = i64 = u8 = u16 = u32 = u64 = int; f32 = f64 = float; char = > string = str > > def main(): > return 0.3325000000000001 > > if __name__ == '__main__': result = main(); None if result is None else > print(result) > ", > [[]] > ) > ) > > ╭─[ 712.05ms - stdout ]────────────────────────────────────────────────────────╮ > │ 00:00:31 verbose #9 async.run_with_timeout_async / { timeout = 180 } │ > │ 00:00:20 debug #73 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\ca288d6928a8e761855210f25f9 │ > │ 7fdc056ee1f21be4a24b26e8533ec368831c8\main.spi │ > │ 00:00:20 debug #74 Supervisor.buildFile / AsyncSeq.scan / │ > │ outputContent: │ > │ / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / │ > │ error: / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\ca288d6928a8e761855210f25f9 │ > │ 7fdc056ee1f21be4a24b26e8533ec368831c8\main.spi │ > │ 00:00:20 debug #75 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\ca288d6928a8e761855210f25f9 │ > │ 7fdc056ee1f21be4a24b26e8533ec368831c8\main.spi │ > │ 00:00:20 verbose #76 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"\ninl init_series start end inc =\n inl total : │ > │ f64 = conv ((end - │ > │ start)...et/spiral_Eval/packages/ca288d6928a8e761855210f25f97fdc056ee1f21be4 │ > │ a24b26e8533ec368831c8/main.spi"}} / result: │ > │ 00:00:20 verbose #77 Supervisor.sendJson / port: 13805 / json: │ > │ {"BuildFile":{"backend":"Python \u002B │ > │ Cuda","uri":"file:///c:/home/git/polyglot/target/spiral_Eval/packages/ca288d │ > │ 6928a8e761855210f25f97fdc056ee1f21be4a24b26e8533ec368831c8/main.spi"}} / │ > │ result: │ > │ 00:00:20 debug #78 Supervisor.buildFile / AsyncSeq.scan / │ > │ outputContent: │ > │ kernel = r""" │ > │ """ │ > │ class static_array(): │ > │ def __init__(self, length): │ > │ self.ptr = [] │ > │ for _ in range(length): │ > │ self.ptr.app...char = string = str │ > │ │ > │ def main(): │ > │ return 0.3325000000000001 │ > │ │ > │ if __name__ == '__main__': result = main(); None if result is None else │ > │ print(result) │ > │ / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / │ > │ error: / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\ca288d6928a8e761855210f25f9 │ > │ 7fdc056ee1f21be4a24b26e8533ec368831c8\main.spi │ > │ 00:00:20 debug #79 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ kernel = r""" │ > │ """ │ > │ class static_array(): │ > │ def __init__(self, length): │ > │ self.ptr = [] │ > │ for _ in range(length): │ > │ self.ptr.app...char = string = str │ > │ │ > │ def main(): │ > │ return 0.3325000000000001 │ > │ │ > │ if __name__ == '__main__': result = main(); None if result is None else │ > │ print(result) │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\ca288d6928a8e761855210f25f9 │ > │ 7fdc056ee1f21be4a24b26e8533ec368831c8\main.spi │ > │ 00:00:20 verbose #80 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/spiral_Eval/packages/ca288d6928a8e76185 │ > │ 5210f25f97fdc056ee1f21be4a24b26e8533ec368831c8"]}} / result: │ > │ 00:00:20 debug #81 FileSystem.watchWithFilter / Disposing watch │ > │ stream / filter: FileName, LastWrite │ > │ Some │ > │ (Some │ > │ "kernel = r""" │ > │ """ │ > │ class static_array(): │ > │ def __init__(self, length): │ > │ self.ptr = [] │ > │ for _ in range(length): │ > │ self.ptr.append(None) │ > │ │ > │ def __getitem__(self, index): │ > │ assert 0 <= index < len(self.ptr), "The get index needs to be in │ > │ range." │ > │ return self.ptr[index] │ > │ │ > │ def __setitem__(self, index, value): │ > │ assert 0 <= index < len(self.ptr), "The set index needs to be in │ > │ range." │ > │ self.ptr[index] = value │ > │ │ > │ class static_array_list(static_array): │ > │ def __init__(self, length): │ > │ super().__init__(length) │ > │ self.length = 0 │ > │ │ > │ def __getitem__(self, index): │ > │ assert 0 <= index < self.length, "The get index needs to be in │ > │ range." │ > │ return self.ptr[index] │ > │ │ > │ def __setitem__(self, index, value): │ > │ assert 0 <= index < self.length, "The set index needs to be in │ > │ range." │ > │ self.ptr[index] = value │ > │ │ > │ def push(self,value): │ > │ assert (self.length < len(self.ptr)), "The length before pushing has │ > │ to be less than the maximum length of the array." │ > │ self.ptr[self.length] = value │ > │ self.length += 1 │ > │ │ > │ def pop(self): │ > │ assert (0 < self.length), "The length before popping has to be │ > │ greater than 0." │ > │ self.length -= 1 │ > │ return self.ptr[self.length] │ > │ │ > │ def unsafe_set_length(self,i): │ > │ assert 0 <= i <= len(self.ptr), "The new length has to be in range." │ > │ self.length = i │ > │ │ > │ class dynamic_array(static_array): │ > │ pass │ > │ │ > │ class dynamic_array_list(static_array_list): │ > │ def length_(self): return self.length │ > │ │ > │ import cupy as cp │ > │ from dataclasses import dataclass │ > │ from typing import NamedTuple, Union, Callable, Tuple │ > │ i8 = i16 = i32 = i64 = u8 = u16 = u32 = u64 = int; f32 = f64 = float; char = │ > │ string = str │ > │ │ > │ def main(): │ > │ return 0.3325000000000001 │ > │ │ > │ if __name__ == '__main__': result = main(); None if result is None else │ > │ print(result) │ > │ ", │ > │ []) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """ > inl init_series start end inc = > inl total : f64 = conv ((end - start) / inc) + 1 > listm.init total (conv >> (*) inc >> (+) start) : list f64 > > type integration = (f64 -> f64) -> f64 -> f64 -> f64 > > inl integral dt : integration = > fun f a b => > init_series (a + dt / 2) (b - dt / 2) dt > |> listm.map (f >> (*) dt) > |> listm.fold (+) 0 > > inl main () = > integral 0.01 (fun x => x ** 2) 0 1 > """ > |> fun code -> Spi (code, None) > |> buildCode Fsharp [[||]] false 10000 None > |> Async.runWithTimeout 10000 > |> Option.map (fun (_, (_, outputContent), errors) -> outputContent, errors |> > List.map fst) > |> _assertEqual ( > Some ( > Some "0.33332500000000004\n", > [[]] > ) > ) > // |> _assertEqual None > // |> fun x -> printfn $"{x.ToDisplayString ()}" > > ╭─[ 795.74ms - stdout ]────────────────────────────────────────────────────────╮ > │ 00:00:32 verbose #10 async.run_with_timeout_async / { timeout = 180 } │ > │ 00:00:20 debug #82 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\2acc44d97e6b50ce3caf39a0b93 │ > │ 135633484d22c3ef6e7797ce64875a41451f4\main.spi │ > │ 00:00:20 debug #83 Supervisor.buildFile / AsyncSeq.scan / │ > │ outputContent: │ > │ / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / │ > │ error: / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\2acc44d97e6b50ce3caf39a0b93 │ > │ 135633484d22c3ef6e7797ce64875a41451f4\main.spi │ > │ 00:00:20 debug #84 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\2acc44d97e6b50ce3caf39a0b93 │ > │ 135633484d22c3ef6e7797ce64875a41451f4\main.spi │ > │ 00:00:20 verbose #85 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"\ninl init_series start end inc =\n inl total : │ > │ f64 = conv ((end - │ > │ start)...et/spiral_Eval/packages/2acc44d97e6b50ce3caf39a0b93135633484d22c3ef │ > │ 6e7797ce64875a41451f4/main.spi"}} / result: │ > │ 00:00:20 verbose #86 Supervisor.sendJson / port: 13805 / json: │ > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ > │ spiral_Eval/packages/2acc44d97e6b50ce3caf39a0b93135633484d22c3ef6e7797ce6487 │ > │ 5a41451f4/main.spi"}} / result: │ > │ 00:00:21 debug #87 Supervisor.buildFile / AsyncSeq.scan / │ > │ outputContent: │ > │ 0.33332500000000004 │ > │ / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / │ > │ error: / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\2acc44d97e6b50ce3caf39a0b93 │ > │ 135633484d22c3ef6e7797ce64875a41451f4\main.spi │ > │ 00:00:21 debug #88 Supervisor.buildFile / takeWhileInclusive / │ > │ outputContent: │ > │ 0.33332500000000004 │ > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: │ > │ C:\home\git\polyglot\target/spiral_Eval\packages\2acc44d97e6b50ce3caf39a0b93 │ > │ 135633484d22c3ef6e7797ce64875a41451f4\main.spi │ > │ 00:00:21 verbose #89 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/spiral_Eval/packages/2acc44d97e6b50ce3c │ > │ af39a0b93135633484d22c3ef6e7797ce64875a41451f4"]}} / result: │ > │ 00:00:21 debug #90 FileSystem.watchWithFilter / Disposing watch │ > │ stream / filter: FileName, LastWrite │ > │ Some (Some "0.33332500000000004 │ > │ ", []) │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## getFileTokenRange │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline getFileTokenRange port cancellationToken path = async { > let fullPath = path |> System.IO.Path.GetFullPath > let! code = fullPath |> SpiralFileSystem.read_all_text_async > let lines = code |> SpiralSm.split "\n" > > let struct (token, disposable) = SpiralThreading.new_disposable_token > cancellationToken > use _ = disposable > > let port = port |> Option.defaultWith getCompilerPort > let! serverPort, _errors, ct, disposable = awaitCompiler port (Some token) > use _ = disposable > > let fullPathUri = fullPath |> SpiralFileSystem.normalize_path |> > SpiralFileSystem.new_file_uri > > let fileOpenObj = {| FileOpen = {| uri = fullPathUri; spiText = code |} |} > let! _fileOpenResult = fileOpenObj |> sendObj serverPort > > // do! Async.Sleep 60 > > let fileTokenRangeObj = > {| > FileTokenRange = > {| > uri = fullPathUri > range = > [[| > {| line = 0; character = 0 |} > {| line = lines.Length - 1; character = > lines.[[lines.Length - 1]].Length |} > |]] > |} > |} > let! fileTokenRangeResult = > fileTokenRangeObj > |> sendObj serverPort > |> Async.withCancellationToken ct > > let fileDir = fullPath |> System.IO.Path.GetDirectoryName > if fileDir |> SpiralSm.starts_with (workspaceRoot </> "target") then > let fileDirUri = fileDir |> SpiralFileSystem.normalize_path |> > SpiralFileSystem.new_file_uri > let fileDeleteObj = {| FileDelete = {| uris = [[| fileDirUri |]] |} |} > let! _fileDeleteResult = fileDeleteObj |> sendObj serverPort > () > > return fileTokenRangeResult |> Option.map FSharp.Json.Json.deserialize<int > array> > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## getCodeTokenRange │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline getCodeTokenRange cancellationToken code = async { > let! mainPath, _ = > persistCode {| input = Spi (code, None); backend = None; packages = > [[||]] |} > > let codeDir = mainPath |> System.IO.Path.GetDirectoryName > let tokensPath = codeDir </> "tokens.json" > let! tokens = async { > if tokensPath |> System.IO.File.Exists |> not > then return None > else > let! text = tokensPath |> SpiralFileSystem.read_all_text_async > > return > if text.Length > 2 > then text |> FSharp.Json.Json.deserialize<int array> |> Some > else None > } > match tokens with > | Some tokens -> > return tokens |> Some > | None -> return! mainPath |> getFileTokenRange None cancellationToken > } > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """inl main () = ()""" > |> getCodeTokenRange None > |> Async.runWithTimeout 10000 > |> Option.flatten > |> _assertEqual (Some [[| 0; 0; 3; 7; 0; 0; 4; 4; 0; 0; 0; 5; 1; 8; 0; 0; 1; 1; > 8; 0; 0; 2; 1; 4; 0; 0; > 2; 1; 8; 0; 0; 1; 1; 8; 0 |]]) > > ╭─[ 3.38s - stdout ]───────────────────────────────────────────────────────────╮ > │ 00:00:41 verbose #11 async.run_with_timeout_async / { timeout = 180 } │ > │ 00:00:29 verbose #91 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"inl main () = │ > │ ()","uri":"file:///c:/home/git/polyglot/target/spiral_Eval/packages/20e725d4 │ > │ 6cfdc99c0f307f1933a76ec7da4570c1b757721164d86f19feaf821e/main.spi"}} / │ > │ result: │ > │ 00:00:29 verbose #92 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileTokenRange":{"range":[ │ > │ {"character":0,"line":0},{"character":16,"line":0}],"uri":"file:///c:/ho...e │ > │ t/spiral_Eval/packages/20e725d46cfdc99c0f307f1933a76ec7da4570c1b757721164d86 │ > │ f19feaf821e/main.spi"}} / result: Some([ │ > │ 0, │ > │ 0, │ > │ 3, │ > │ 7, │ > │ 0, │ > │ 0, │ > │ 4, │ > │ 4, │ > │ 0, │ > │ 0, │ > │ 0, │ > │ 5, │ > │ 1, │ > │ 8, │ > │ 0, │ > │ 0, │ > │ ...8, │ > │ 0, │ > │ 0, │ > │ 2, │ > │ 1, │ > │ 4, │ > │ 0, │ > │ 0, │ > │ 2, │ > │ 1, │ > │ 8, │ > │ 0, │ > │ 0, │ > │ 1, │ > │ 1, │ > │ 8, │ > │ 0 │ > │ ]) │ > │ 00:00:29 verbose #93 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/spiral_Eval/packages/20e725d46cfdc99c0f │ > │ 307f1933a76ec7da4570c1b757721164d86f19feaf821e"]}} / result: │ > │ Some [|0; 0; 3; 7; 0; 0; 4; 4; 0; 0; 0; 5; 1; 8; 0; 0; 1; 1; 8; 0; 0; 2; 1; │ > │ 4; 0; 0; 2; 1; 8; 0; 0; 1; 1; 8; 0|] │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > """inl main () = 1i32""" > |> getCodeTokenRange None > |> Async.runWithTimeout 10000 > |> Option.flatten > |> _assertEqual (Some [[| 0; 0; 3; 7; 0; 0; 4; 4; 0; 0; 0; 5; 1; 8; 0; 0; 1; 1; > 8; 0; 0; 2; 1; 4; 0; 0; > 2; 1; 3; 0; 0; 1; 3; 12; 0 |]]) > > ╭─[ 3.52s - stdout ]───────────────────────────────────────────────────────────╮ > │ 00:00:44 verbose #12 async.run_with_timeout_async / { timeout = 180 } │ > │ 00:00:33 verbose #94 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileOpen":{"spiText":"inl main () = │ > │ 1i32","uri":"file:///c:/home/git/polyglot/target/spiral_Eval/packages/537082 │ > │ 9508ddefc7386d6b4d280722b47d97cb925585525bee733a187ff8f18b/main.spi"}} / │ > │ result: │ > │ 00:00:33 verbose #95 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileTokenRange":{"range":[ │ > │ {"character":0,"line":0},{"character":18,"line":0}],"uri":"file:///c:/ho...e │ > │ t/spiral_Eval/packages/5370829508ddefc7386d6b4d280722b47d97cb925585525bee733 │ > │ a187ff8f18b/main.spi"}} / result: Some([ │ > │ 0, │ > │ 0, │ > │ 3, │ > │ 7, │ > │ 0, │ > │ 0, │ > │ 4, │ > │ 4, │ > │ 0, │ > │ 0, │ > │ 0, │ > │ 5, │ > │ 1, │ > │ 8, │ > │ 0, │ > │ 0, │ > │ ..., │ > │ 0, │ > │ 0, │ > │ 2, │ > │ 1, │ > │ 4, │ > │ 0, │ > │ 0, │ > │ 2, │ > │ 1, │ > │ 3, │ > │ 0, │ > │ 0, │ > │ 1, │ > │ 3, │ > │ 12, │ > │ 0 │ > │ ]) │ > │ 00:00:33 verbose #96 Supervisor.sendJson / port: 13805 / json: │ > │ {"FileDelete":{"uris":[ │ > │ "file:///c:/home/git/polyglot/target/spiral_Eval/packages/5370829508ddefc738 │ > │ 6d6b4d280722b47d97cb925585525bee733a187ff8f18b"]}} / result: │ > │ Some [|0; 0; 3; 7; 0; 0; 4; 4; 0; 0; 0; 5; 1; 8; 0; 0; 1; 1; 8; 0; 0; 2; 1; │ > │ 4; 0; 0; 2; 1; 3; 0; 0; 1; 3; 12; 0|] │ > │ │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## Arguments │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > [[<RequireQualifiedAccess>]] > type Arguments = > | Build_File of string * string > | File_Token_Range of string * string > | Execute_Command of string > | [[<Argu.ArguAttributes.Unique>]] Timeout of int > | [[<Argu.ArguAttributes.Unique>]] Port of int > | [[<Argu.ArguAttributes.Unique>]] Parallel > | [[<Argu.ArguAttributes.Unique>]] Exit_On_Error > > interface Argu.IArgParserTemplate with > member s.Usage = > match s with > | Build_File _ -> nameof Build_File > | File_Token_Range _ -> nameof File_Token_Range > | Execute_Command _ -> nameof Execute_Command > | Timeout _ -> nameof Timeout > | Port _ -> nameof Port > | Parallel -> nameof Parallel > | Exit_On_Error-> nameof Exit_On_Error > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > Argu.ArgumentParser.Create<Arguments>().PrintUsage () > > ╭─[ 196.19ms - return value ]──────────────────────────────────────────────────╮ > │ "USAGE: dotnet-repl [--help] [--build-file <string> <string>] │ > │ [--file-token-range <string> <string>] │ > │ [--execute-command <string>] [--timeout <int>] [--port │ > │ <int>] │ > │ [--parallel] [--exit-on-error] │ > │ │ > │ OPTIONS: │ > │ │ > │ --build-file <string> <string> │ > │ Build_File │ > │ --file-token-range <string> <string> │ > │ File_Token_Range │ > │ --execute-command <string> │ > │ Execute_Command │ > │ --timeout <int> Timeout │ > │ --port <int> Port │ > │ --parallel Parallel │ > │ --exit-on-error Exit_On_Error │ > │ --help display this list of options. │ > │ " │ > │ │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## main │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let main args = > let argsMap = args |> Runtime.parseArgsMap<Arguments> > > let buildFileActions = > argsMap > |> Map.tryFind (nameof Arguments.Build_File) > |> Option.defaultValue [[]] > |> List.choose (function > | Arguments.Build_File (inputPath, outputPath) -> Some (inputPath, > outputPath) > | _ -> None > ) > > let fileTokenRangeActions = > argsMap > |> Map.tryFind (nameof Arguments.File_Token_Range) > |> Option.defaultValue [[]] > |> List.choose (function > | Arguments.File_Token_Range (inputPath, outputPath) -> Some > (inputPath, outputPath) > | _ -> None > ) > > let executeCommandActions = > argsMap > |> Map.tryFind (nameof Arguments.Execute_Command) > |> Option.defaultValue [[]] > |> List.choose (function > | Arguments.Execute_Command command -> Some command > | _ -> None > ) > > let timeout = > match argsMap |> Map.tryFind (nameof Arguments.Timeout) with > | Some [[ Arguments.Timeout timeout ]] -> timeout > | _ -> 60000 * 60 > > let port = > match argsMap |> Map.tryFind (nameof Arguments.Port) with > | Some [[ Arguments.Port port ]] -> Some port > | _ -> None > > let isParallel = argsMap |> Map.containsKey (nameof Arguments.Parallel) > > let isExitOnError = argsMap |> Map.containsKey (nameof > Arguments.Exit_On_Error) > > async { > let port = > port > |> Option.defaultWith getCompilerPort > let struct (localToken, disposable) = > SpiralThreading.new_disposable_token None > let! serverPort, _errors, compilerToken, disposable = awaitCompiler port > (Some localToken) > use _ = disposable > > let buildFileAsync = > buildFileActions > |> List.map (fun (inputPath, outputPath) -> async { > let! _outputPath, (outputCode, errors) = > let backend = > if outputPath |> SpiralSm.ends_with ".fsx" > then Fsharp > elif outputPath |> SpiralSm.ends_with ".py" > then Cuda > else failwith $"Supervisor.main / invalid backend / > outputPath: {outputPath}" > let isReal = inputPath |> SpiralSm.ends_with ".spir" > inputPath |> buildFile backend timeout (Some serverPort) > None > > errors > |> List.map snd > |> List.iter (fun error -> > trace Critical (fun () -> $"main / error: {error |> > serializeObj}") _locals > ) > > match outputCode with > | Some outputCode -> > do! outputCode |> SpiralFileSystem.write_all_text_exists > outputPath > return 0 > | None -> > if isExitOnError > then SpiralRuntime.current_process_kill () > > return 1 > }) > > let fileTokenRangeAsync = > fileTokenRangeActions > |> List.map (fun (inputPath, outputPath) -> async { > let! tokenRange = inputPath |> getFileTokenRange (Some > serverPort) None > match tokenRange with > | Some tokenRange -> > do! tokenRange |> FSharp.Json.Json.serialize |> > SpiralFileSystem.write_all_text_exists outputPath > return 0 > | None -> > if isExitOnError > then SpiralRuntime.current_process_kill () > > return 1 > }) > > let executeCommandAsync = > executeCommandActions > |> List.map (fun command -> async { > let! exitCode, result = > SpiralRuntime.execution_options (fun x -> > { x with > l0 = command > l1 = Some compilerToken > } > ) > |> SpiralRuntime.execute_with_options_async > > trace Debug (fun () -> $"main / executeCommand / exitCode: > {exitCode} / command: {command}") _locals > > if isExitOnError && exitCode <> 0 > then SpiralRuntime.current_process_kill () > > return exitCode > }) > > return! > [[| buildFileAsync; fileTokenRangeAsync; executeCommandAsync |]] > |> Seq.collect id > |> fun x -> > if isParallel > then Async.Parallel (x, float System.Environment.ProcessorCount > * 0.51 |> ceil |> int) > else Async.Sequential x > |> Async.map Array.sum > } > |> Async.runWithTimeout timeout > |> Option.defaultValue 1 > > ── fsharp ────────────────────────────────────────────────────────────────────── > //// test > > let args = > System.Environment.GetEnvironmentVariable "ARGS" > |> SpiralRuntime.split_args > |> Result.toArray > |> Array.collect id > > match args with > | [[||]] -> 0 > | args -> if main args = 0 then 0 else failwith "main failed" > > ╭─[ 135.83ms - return value ]──────────────────────────────────────────────────╮ > │ <div class="dni-plaintext"><pre>0 │ > │ </pre></div><style> │ > │ .dni-code-hint { │ > │ font-style: italic; │ > │ overflow: hidden; │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview { │ > │ white-space: nowrap; │ > │ } │ > │ .dni-treeview td { │ > │ vertical-align: top; │ > │ text-align: start; │ > │ } │ > │ details.dni-treeview { │ > │ padding-left: 1em; │ > │ } │ > │ table td { │ > │ text-align: start; │ > │ } │ > │ table tr { │ > │ vertical-align: top; │ > │ margin: 0em 0px; │ > │ } │ > │ table tr td pre │ > │ { │ > │ vertical-align: top !important; │ > │ margin: 0em 0px !important; │ > │ } │ > │ table th { │ > │ text-align: start; │ > │ } │ > │ </style> │ > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:11 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 126750 } 00:01:11 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ "nbconvert", "c:/home/git/polyglot/apps/spiral/Supervisor.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark", ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/apps/spiral/Supervisor.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:01:14 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/spiral/Supervisor.dib.ipynb to html 00:01:14 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:01:14 verbose #7 ! validate(nb) 00:01:17 verbose #8 ! [NbConvertApp] Writing 495595 bytes to c:\home\git\polyglot\apps\spiral\Supervisor.dib.html 00:01:17 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 653 } 00:01:17 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 653 } 00:01:17 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ "-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/Supervisor.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/Supervisor.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:01:18 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:01:18 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:01:18 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 127462 } 00:00:00 debug #1 writeDibCode / output: Fs / path: Supervisor.dib 00:00:00 debug #2 parseDibCode / output: Fs / file: Supervisor.dib 00:00:00 debug #1 persistCodeProject / packages: [Argu; FSharp.Control.AsyncSeq; FSharp.Json; ... ] / modules: [lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / name: Supervisor / hash: / code.Length: 28544 00:00:00 debug #2 buildProject / fullPath: C:\home\git\polyglot\target\Builder\Supervisor\Supervisor.fsproj 00:00:00 debug #1 runtime.execute_with_options_async / { options = { command = dotnet publish "C:\home\git\polyglot\target/Builder\Supervisor\Supervisor.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\spiral\dist" --runtime linux-x64; cancellation_token = None; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = Some "C:\home\git\polyglot\target\Builder\Supervisor" } } 00:00:00 verbose #2 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET 00:00:01 verbose #3 > Determining projects to restore... 00:00:02 verbose #4 > Restored C:\home\git\polyglot\target\Builder\Supervisor\Supervisor.fsproj (in 562 ms). 00:00:02 verbose #5 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\Builder\Supervisor\Supervisor.fsproj] 00:00:25 verbose #6 > Supervisor -> C:\home\git\polyglot\target\Builder\Supervisor\bin\Release\net9.0\linux-x64\Supervisor.dll 00:00:26 verbose #7 > Supervisor -> C:\home\git\polyglot\apps\spiral\dist\ 00:00:26 debug #8 runtime.execute_with_options_async / { exit_code = 0; output_length = 688 } 00:00:26 debug #9 runtime.execute_with_options_async / { options = { command = dotnet publish "C:\home\git\polyglot\target/Builder\Supervisor\Supervisor.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\spiral\dist" --runtime win-x64; cancellation_token = None; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = Some "C:\home\git\polyglot\target\Builder\Supervisor" } } 00:00:27 verbose #10 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET 00:00:27 verbose #11 > Determining projects to restore... 00:00:28 verbose #12 > Restored C:\home\git\polyglot\target\Builder\Supervisor\Supervisor.fsproj (in 559 ms). 00:00:28 verbose #13 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\Builder\Supervisor\Supervisor.fsproj] 00:00:52 verbose #14 > Supervisor -> C:\home\git\polyglot\target\Builder\Supervisor\bin\Release\net9.0\win-x64\Supervisor.dll 00:00:53 verbose #15 > Supervisor -> C:\home\git\polyglot\apps\spiral\dist\ 00:00:53 debug #16 runtime.execute_with_options_async / { exit_code = 0; output_length = 686 } 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "Eval.dib", "--retries", "3"])) } 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ "repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/spiral/Eval.dib", "--output-path", "c:/home/git/polyglot/apps/spiral/Eval.dib.ipynb", ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/spiral/Eval.dib" --output-path "c:/home/git/polyglot/apps/spiral/Eval.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ # Eval (Polyglot) │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > #r > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan > dard2.1/FSharp.Control.AsyncSeq.dll" > #r > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6. > 0/System.Reactive.dll" > #r > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/ > netstandard2.0/System.Reactive.Linq.dll" > #r > @"../../../../../../../.nuget/packages/argu/6.2.4/lib/netstandard2.0/Argu.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.http.connections.com > mon/7.0.0/lib/net7.0/Microsoft.AspNetCore.Http.Connections.Common.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.http.connections.cli > ent/7.0.0/lib/net7.0/Microsoft.AspNetCore.Http.Connections.Client.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.common/7.0.0 > /lib/net7.0/Microsoft.AspNetCore.SignalR.Common.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.client/7.0.0 > /lib/net7.0/Microsoft.AspNetCore.SignalR.Client.dll" > #r > @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.client.core/ > 7.0.0/lib/net7.0/Microsoft.AspNetCore.SignalR.Client.Core.dll" > #r > @"../../../../../../../.nuget/packages/fsharp.json/0.4.1/lib/netstandard2.0/FSha > rp.Json.dll" > #r > @"../../../../../../../.nuget/packages/system.management/7.0.0/lib/netstandard2. > 0/System.Management.dll" > > ── fsharp ────────────────────────────────────────────────────────────────────── > #if !INTERACTIVE > open Lib > #endif > > ── fsharp ────────────────────────────────────────────────────────────────────── > open Common > open SpiralFileSystem.Operators > open Microsoft.AspNetCore.SignalR.Client > > ── fsharp ────────────────────────────────────────────────────────────────────── > open System > open System.Collections.Generic > open System.IO > open System.Text > open System.Threading > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## mapErrors │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline mapErrors (severity, errors, lastTopLevelIndex) allCode = > let allCodeLineLength = > allCode |> SpiralSm.split "\n" |> Array.length > > errors > |> List.map (fun (_, error) -> > match error with > | Supervisor.FatalError message -> > ( > severity, message, 0, ("", (0, 0), (0, 0)) > ) > |> List.singleton > | Supervisor.TracedError data -> > data.trace > |> List.truncate 5 > |> List.append [[ data.message ]] > |> List.map (fun message -> > ( > severity, message, 0, ("", (0, 0), (0, 0)) > ) > ) > | Supervisor.PackageErrors data > | Supervisor.TokenizerErrors data > | Supervisor.ParserErrors data > | Supervisor.TypeErrors data -> > data.errors > |> List.filter (fun ((rangeStart, _), _) -> > trace Debug (fun () -> $"Eval.mapErrors / rangeStart.line: > {rangeStart.line} / lastTopLevelIndex: {lastTopLevelIndex} / allCodeLineLength: > {allCodeLineLength} / filtered: {rangeStart.line > allCodeLineLength}") _locals > rangeStart.line > allCodeLineLength > ) > |> List.map (fun ((rangeStart, rangeEnd), message) -> > ( > severity, > message, > 0, > ( > (data.uri |> System.IO.Path.GetFileName), > ( > (match lastTopLevelIndex with > | Some i when rangeStart.line >= i + > allCodeLineLength + 3 -> > rangeStart.line - allCodeLineLength - 2 > | _ -> rangeStart.line - allCodeLineLength), > (match lastTopLevelIndex with > | Some i when rangeStart.line >= i + > allCodeLineLength + 3 -> > rangeStart.character - 4 > | _ -> rangeStart.character) > ), > ( > (match lastTopLevelIndex with > | Some i when rangeStart.line >= i + > allCodeLineLength + 3 -> > rangeEnd.line - allCodeLineLength - 2 > | _ -> rangeEnd.line - allCodeLineLength), > (match lastTopLevelIndex with > | Some i when rangeStart.line >= i + > allCodeLineLength + 3 -> > rangeEnd.character - 4 > | _ -> rangeEnd.character) > ) > ) > ) > ) > ) > |> List.collect id > |> List.toArray > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### workspaceRoot │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let workspaceRoot = SpiralFileSystem.get_workspace_root () > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### targetDir │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let targetDir = workspaceRoot </> "target/spiral_Eval" > [[ targetDir ]] > |> List.iter (fun dir -> if Directory.Exists dir |> not then > Directory.CreateDirectory dir |> ignore) > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### assemblyName │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let assemblyName = Reflection.Assembly.GetEntryAssembly().GetName().Name > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## allCode │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let mutable allCode = "" > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ### allPackages │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let mutable allPackages : string [[]] = [[||]] > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## allCodeReal │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let mutable allCodeReal = "" > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## traceToggle │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let mutable traceToggle = false > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## getParentProcessId │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let getParentProcessId () = > if SpiralPlatform.is_windows () |> not > then 0u > else > let pid = System.Diagnostics.Process.GetCurrentProcess().Id > let query = $"SELECT ParentProcessId FROM Win32_Process WHERE ProcessId > = {pid}" > use searcher = new System.Management.ManagementObjectSearcher (query) > use results = searcher.Get () > let data = results |> Seq.cast<System.Management.ManagementObject> > if data |> Seq.isEmpty > then 0u > else data |> Seq.head |> (fun mo -> mo.[["ParentProcessId"]] :?> uint32) > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## startTokenRangeWatcher │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline startTokenRangeWatcher () = > if [[ "dotnet-repl" ]] |> List.contains assemblyName |> not then > let tokensDir = targetDir </> "tokens" > > [[ tokensDir ]] > |> List.iter (fun dir -> if Directory.Exists dir |> not then > Directory.CreateDirectory dir |> ignore) > > let stream, disposable = FileSystem.watchDirectory (fun _ -> false) > tokensDir > > try > let existingFilesChild = > tokensDir > |> System.IO.Directory.GetDirectories > |> Array.map (fun codeDir -> async { > try > let tokensPath = codeDir </> "tokens.json" > if tokensPath |> File.Exists |> not then > let spiralCodePath = codeDir </> "main.spi" > let spiralRealCodePath = codeDir </> > "main_real.spir" > let spiralExists = spiralCodePath |> > System.IO.File.Exists > let spiralRealExists = spiralRealCodePath |> > System.IO.File.Exists > if spiralExists |> not && spiralRealExists |> not > then do! codeDir |> > SpiralFileSystem.delete_directory_async |> Async.Ignore > else > let! tokens = > if spiralExists then spiralCodePath else > spiralRealCodePath > |> Supervisor.getFileTokenRange None None > match tokens with > | Some tokens -> > do! > tokens > |> FSharp.Json.Json.serialize > |> SpiralFileSystem.write_all_text_async > tokensPath > | None -> > trace Verbose (fun () -> > $"Eval.startTokenRangeWatcher / GetDirectories / tokens: None") _locals > with ex -> > trace Critical (fun () -> $"Eval.startTokenRangeWatcher > / GetDirectories / ex: {ex |> SpiralSm.format_exception}") _locals > }) > |> Async.Parallel > |> Async.Ignore > > let streamAsyncChild = > stream > |> FSharp.Control.AsyncSeq.iterAsyncParallel (fun (ticks, event) > -> > match event with > | FileSystem.FileSystemChange.Changed (codePath, _) > when [[ "main.spi"; "main_real.spir" ]] > |> List.contains (System.IO.Path.GetFileName > codePath) > -> > async { > let hashDir = codePath |> > System.IO.Directory.GetParent > let hashHex = hashDir.Name > let codePath = tokensDir </> codePath > let tokensPath = tokensDir </> hashHex </> > "tokens.json" > // do! Async.Sleep 30 > let rec loop retry = async { > let! tokens = codePath |> > Supervisor.getFileTokenRange None None > if retry = 3 || tokens <> Some [[||]] > then return tokens, retry > else > trace Debug > (fun () -> $"Eval.startTokenRangeWatcher > / iterAsyncParallel") > (fun () -> $"retry: {retry} / tokens: > {tokens}") > do! Async.Sleep 30 > return! loop (retry + 1) > } > let! tokens, retries = loop 1 > match tokens with > | Some tokens -> > do! > tokens > |> FSharp.Json.Json.serialize > |> SpiralFileSystem.write_all_text_exists > tokensPath > | None -> > trace Debug > (fun () -> $"Eval.startTokenRangeWatcher / > iterAsyncParallel") > (fun () -> $"retries: {retries} / tokens: > {tokens}") > } > |> Async.retryAsync 3 > |> Async.map (Result.toOption >> Option.defaultValue ()) > | _ -> () |> Async.init > ) > > let parentAsyncChild = async { > let parentProcessId = getParentProcessId () > trace Verbose > (fun () -> "Eval.parentAsyncChild") > (fun () -> $"parentProcessId: {parentProcessId} / {_locals > ()}") > > if parentProcessId > 0u then > let parentProcess = parentProcessId |> int |> > System.Diagnostics.Process.GetProcessById > do! parentProcess.WaitForExitAsync () |> Async.AwaitTask > trace Debug > (fun () -> "Eval.parentAsyncChild / Parent process has > exited. Performing cleanup...") > (fun () -> $"{_locals ()}") > System.Threading.Thread.Sleep 1000 > System.Environment.Exit 1 > } > > async { > do! Async.Sleep 3000 > existingFilesChild |> Async.StartImmediate > streamAsyncChild |> Async.Start > parentAsyncChild |> Async.Start > } > |> Async.Start > with ex -> > trace Critical (fun () -> $"Eval.startTokenRangeWatcher / ex: {ex |> > SpiralSm.format_exception}") _locals > > disposable > else new_disposable (fun () -> ()) > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## startCommandsWatcher │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let startCommandsWatcher (uriServer : string) = > let commandsDir = targetDir </> "eval_commands" > let commandHistoryDir = targetDir </> "eval_command_history" > [[ commandsDir; commandHistoryDir ]] > |> List.iter (fun dir -> if Directory.Exists dir |> not then > Directory.CreateDirectory dir |> ignore) > > Directory.EnumerateFiles commandsDir |> Seq.iter File.Delete > > let stream, disposable = > commandsDir > |> FileSystem.watchDirectory (function > | FileSystem.FileSystemChange.Created _ -> true > | _ -> false > ) > > let connection = HubConnectionBuilder().WithUrl(uriServer).Build() > connection.StartAsync() |> Async.AwaitTask |> Async.Start > // let _ = connection.On<string>("ServerToClientMsg", fun x -> > // printfn $"ServerToClientMsg: '{x}'" > // ) > > stream > |> FSharp.Control.AsyncSeq.iterAsyncParallel (fun (ticks, event) -> async { > let _locals () = $"ticks: {ticks} / event: {event} / {_locals ()}" > trace Verbose (fun () -> "Eval.startCommandsWatcher / > iterAsyncParallel") _locals > > match event with > | FileSystem.FileSystemChange.Created (path, Some json) -> > try > let fullPath = commandsDir </> path > let! result = > connection.InvokeAsync<string>("ClientToServerMsg", json) |> Async.AwaitTask > let commandHistoryPath = commandHistoryDir </> path > do! fullPath |> SpiralFileSystem.move_file_async > commandHistoryPath |> Async.Ignore > if result |> SpiralSm.trim |> String.length > 0 then > let resultPath = commandHistoryDir </> > $"{Path.GetFileNameWithoutExtension path}_result.json" > do! result |> SpiralFileSystem.write_all_text_async > resultPath > with ex -> > let _locals () = $"ex: {ex |> SpiralSm.format_exception} / > {_locals ()}" > trace Critical (fun () -> "Eval.startCommandsWatcher / > iterAsyncParallel") _locals > | _ -> () > }) > |> Async.StartChild > |> Async.Ignore > |> Async.Start > > new_disposable (fun () -> > disposable.Dispose () > ) > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## prepareSpiral │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let prepareSpiral rawCellCode lines = > let lastBlock = > lines > |> Array.tryFindBack (fun line -> > line |> String.length > 0 > && line.[[0]] <> ' ' > ) > > let hasMain = > lastBlock > |> Option.exists (fun line -> > line |> SpiralSm.starts_with "inl main " > || line |> SpiralSm.starts_with "let main " > ) > > if hasMain > then rawCellCode, None > else > let lastTopLevelIndex, _ = > (lines |> Array.indexed, (None, false)) > ||> Array.foldBack (fun (i, line) (lastTopLevelIndex, finished) -> > // trace Verbose (fun () -> $"Eval.prepareSpiral / i: {i} / > line: '{line}' / lastTopLevelIndex: {lastTopLevelIndex} / finished: {finished}") > _locals > match line with > | _ when finished -> lastTopLevelIndex, true > | "" -> lastTopLevelIndex, false > | line when > line |> SpiralSm.starts_with " " > || line |> SpiralSm.starts_with "// " -> lastTopLevelIndex, > false > | line when > line |> SpiralSm.starts_with "open " > || line |> SpiralSm.starts_with "prototype " > || line |> SpiralSm.starts_with "instance " > || line |> SpiralSm.starts_with "type " > || line |> SpiralSm.starts_with "union " > || line |> SpiralSm.starts_with "nominal " -> > lastTopLevelIndex, true > | line when > line |> SpiralSm.starts_with "inl " > || line |> SpiralSm.starts_with "and " > || line |> SpiralSm.starts_with "let " -> > let m = > System.Text.RegularExpressions.Regex.Match ( > line, > @"^(?:and +)?(inl|let) +((?:[[{( > ]]*)?[[~\(\w]]+[[\w\d']]*(?:|[[\w\d']]+[[ }]]*(?:&? *[[\w\d']]*\))?| > *[[~\w]][[\w\d']]*\)|, *[[~\w]][[\w\d']]*)) +[[:=]](?! +function)" > ) > trace Verbose (fun () -> $"Eval.prepareSpi / m: '{m}' / > m.Groups.Count: {m.Groups.Count}") _locals > if m.Groups.Count = 3 > then Some i, false > else lastTopLevelIndex, true > | _ -> Some i, false > ) > let code = > match lastTopLevelIndex with > | Some lastTopLevelIndex -> > lines > |> Array.mapi (fun i line -> > match i with > | i when i < lastTopLevelIndex -> line > | i when i = lastTopLevelIndex -> $"\nlet main () =\n > {line}" > | _ when line |> SpiralSm.trim = "" -> "" > | _ -> $" {line}" > ) > |> SpiralSm.concat "\n" > | None -> $"{rawCellCode}\n\ninl main () = ()\n" > code, lastTopLevelIndex > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## processSpiralOutput │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let processSpiralOutput > (props : {| > printCode: bool > traceLevel: TraceLevel > builderCommands: string array > lastTopLevelIndex: int option > backend: Supervisor.Backend > cancellationToken: _ > spiralErrors: _ > code: string > outputPath: string > isReal: bool > |}) > = async { > let inline _trace (fn : unit -> string) = > if props.traceLevel = Verbose > then trace Info (fun () -> $"Eval.processSpiralOutput / props: {props |> > FSharp.Json.Json.serialize |> SpiralSm.ellipsis_end 400} / {fn ()}") _locals > else fn () |> System.Console.WriteLine > > if props.printCode then > let ext = props.outputPath |> System.IO.Path.GetExtension > _trace (fun () -> if props.builderCommands.Length > 0 then > $"{ext}:\n{props.code}\n" else props.code) > > let workspaceRootExternal = > let currentDir = > System.IO.Directory.GetCurrentDirectory () > |> SpiralSm.to_lower > let workspaceRoot = workspaceRoot |> SpiralSm.to_lower > if currentDir |> SpiralSm.starts_with workspaceRoot > then None > else Some workspaceRoot > > let! spiralBuilderResults = > match props.builderCommands, props.lastTopLevelIndex with > | [[||]], _ | _, None -> [[||]] |> Async.init > | builderCommands, _ -> > builderCommands > |> Array.map (fun builderCommand -> > let path = > workspaceRoot </> > $@"workspace/target/release/spiral_builder{SpiralPlatform.get_executable_suffix > ()}" > |> System.IO.Path.GetFullPath > let commands = > if props.backend = Supervisor.Fsharp > && ( > builderCommand |> SpiralSm.starts_with "rust" > || builderCommand |> SpiralSm.starts_with > "typescript" > || builderCommand |> SpiralSm.starts_with "python" > ) > then [[| $"{path} fable --fs-path \"{props.outputPath}\" > --command \"{builderCommand}\"" |]] > elif props.backend = Supervisor.Cuda > && builderCommand |> SpiralSm.starts_with "cuda" > then [[| $"{path} {builderCommand} --py-path > \"{props.outputPath}\"" |]] > else [[||]] > builderCommand, commands > ) > |> Array.filter (fun (_, commands) -> commands.Length > 0) > |> Array.map (fun (builderCommand, commands) -> > commands > |> Array.map (fun command -> async { > let! exitCode, result = > SpiralRuntime.execution_options (fun x -> > { x with > l0 = command > l1 = props.cancellationToken > l2 = [[| > "AUTOMATION", assemblyName = "dotnet-repl" > |> string > "TRACE_LEVEL", $"%A{if props.printCode then > props.traceLevel else Info}" > |]] > l6 = workspaceRootExternal > } > ) > |> SpiralRuntime.execute_with_options_async > trace Debug > (fun () -> $"Eval.processSpiralOutput / spiral_builder") > (fun () -> $"exitCode: {exitCode} / builderCommand: > {builderCommand} / result: {result |> SpiralSm.ellipsis_end 400} / {_locals > ()}") > return > if exitCode = 0 > then {| code = result; eval = false; builderCommand = > builderCommand |} |> Ok > else result |> Error > }) > ) > |> Array.collect id > |> Async.Parallel > > let hasEval = > props.backend = Supervisor.Fsharp > && props.builderCommands |> Array.exists (fun x -> x |> > SpiralSm.starts_with "fsharp") > > let outputResult = > if props.builderCommands.Length > 0 && not hasEval > then None > else > let code = > if props.builderCommands.Length > 1 > then > let header = "System.Console.WriteLine \".fsx output:\"\n" > $"{header}{props.code}" > else props.code > Some (Ok [[ {| code = code; eval = true; builderCommand = "" |} ]]) > > match outputResult, spiralBuilderResults with > | Some outputResult, [[||]] -> > return outputResult, [[||]] > | None, [[||]] -> > return Ok [[ {| code = "()"; eval = true; builderCommand = "" |} ]], > [[||]] > | _, spiralBuilderResults -> > try > let spiralResults = > match outputResult with > | Some (Ok code) -> > spiralBuilderResults > |> Array.append (code |> List.map Ok |> List.toArray) > | _ -> spiralBuilderResults > let codes = > spiralResults > |> Array.map (fun spiralBuilderResult' -> > let commandResult, errors = > match spiralBuilderResult' with > | Ok result when result.eval = false -> > let result' = > result.code > |> > FSharp.Json.Json.deserialize<Map<string,string>> > let result = > match result' |> Map.tryFind "command_result" > with > | Some result'' -> > result'' > |> > FSharp.Json.Json.deserialize<Map<string,string>> > |> Map.add "builderCommand" > result.builderCommand > | None -> Map.empty > result, [[||]] > | Ok result when result.eval = true -> > let result = > [[ > "extension", "fsx" > "code", result.code > "output", "" > ]] > |> Map.ofList > result, [[||]] > | Error error -> > Map.empty, > [[| > ( > TraceLevel.Critical, > $"Eval.processSpiralOutput / evalResult error / errors[[0]] / outputPath: > {props.outputPath} / builderCommands: %A{props.builderCommands} / > spiralBuilderResult': %A{spiralBuilderResult'} / error: %A{error}", 0, ("", (0, > 0), (0, 0)) > ) > |]] > | _ -> > Map.empty, [[||]] > > if errors |> Array.isEmpty |> not > then Error (Exception $"Eval.processSpiralOutput / > evalResult errors / Exception / commandResult: %A{commandResult}"), errors > else > let extension = commandResult.[["extension"]] > let code = commandResult.[["code"]] > let output = commandResult.[["output"]] > let builderCommand = > commandResult > |> Map.tryFind "builderCommand" > |> Option.defaultValue "" > > let eval = output = "" && extension = "fsx" > > if props.printCode && not eval > then _trace (fun () -> $""".{extension}:{'\n'}{code}""") > > trace Debug > (fun () -> $"Eval.processSpiralOutput / result") > (fun () -> $"builderCommand: {builderCommand} / > extension: {extension} / commandResult: {commandResult |> > FSharp.Json.Json.serialize |> SpiralSm.ellipsis_end 400}/ {_locals ()}") > > let code = > if props.printCode > || spiralResults.Length > 1 > || props.builderCommands.Length > 1 > then > if eval then > code > else > let header = > let info = > match props.backend, builderCommand > with > | Supervisor.Fsharp, builderCommand > when builderCommand |> > SpiralSm.contains " " -> $" ({builderCommand})" > | Supervisor.Fsharp, _ -> "" > | _ -> $" ({props.backend})" > if info = "" > then $".{extension} output:\n" > else $".{extension} output{info}:\n" > $"""{if output |> SpiralSm.contains "\n" > then "\n" else ""}{header}{output}""" > elif eval > then code > else output > Ok {| code = code; eval = eval; builderCommand = > builderCommand |}, [[||]] > ) > trace Debug > (fun () -> $"Eval.processSpiralOutput / codes") > (fun () -> > let props = {| props with cancellationToken = None |} > $"codes: {codes |> FSharp.Json.Json.serialize |> > SpiralSm.ellipsis_end 400} / spiralResults: {spiralResults |> > FSharp.Json.Json.serialize |> SpiralSm.ellipsis_end 400} / spiralBuilderResults: > {spiralBuilderResults |> FSharp.Json.Json.serialize |> SpiralSm.ellipsis_end > 400} / props: {props |> FSharp.Json.Json.serialize |> SpiralSm.ellipsis_end 400} > / {_locals ()}") > return > (((Ok [[]]), [[||]]), codes) > ||> Array.fold (fun (acc_code, acc_errors) (code, errors) -> > match code, acc_code with > | Ok code, Ok acc_code -> > let errors = > acc_errors > |> Array.append errors > |> Array.append props.spiralErrors > let errors = > if errors |> Array.isEmpty > then errors > else > let code = $"%A{code}" > errors > |> Array.append [[| > TraceLevel.Critical, > $"Eval.processSpiralOutput / errors / errors[[-1]] / outputPath: > {props.outputPath} / builderCommands: %A{props.builderCommands} / code: {code |> > SpiralSm.ellipsis_end 400}", 0, ("", (0, 0), (0, 0)) > |]] > Ok (code :: acc_code), errors > | Error ex, _ > | _, Error ex -> > Error (Exception $"Eval.processSpiralOutput / -1 / > Exception / spiralBuilderResults: %A{spiralBuilderResults} / ex: {ex |> > SpiralSm.format_exception}"), > acc_errors |> Array.append errors > ) > with ex -> > trace Critical (fun () -> $"Eval.processSpiralOutput / try 2 ex / > spiralBuilderResults: %A{spiralBuilderResults} / ex: {ex |> > SpiralSm.format_exception}") _locals > return > Error (Exception $"Eval.processSpiralOutput / try 2 ex / > Exception / spiralBuilderResults: %A{spiralBuilderResults} / ex: {ex |> > SpiralSm.format_exception}"), > [[| > ( > TraceLevel.Critical, $"Eval.processSpiralOutput / try 2 > ex / errors[[0]] / spiralBuilderResults: %A{spiralBuilderResults} / ex: {ex |> > SpiralSm.format_exception}", 0, ("", (0, 0), (0, 0)) > ) > |]] > } > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## tryGetPropertyValue │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let tryGetPropertyValue (propertyName: string) (obj: obj) = > let objType = obj.GetType () > let propertyInfo = propertyName |> objType.GetProperty > if propertyInfo <> null > then propertyInfo.GetValue (obj, null) |> Some > else None > > ── markdown ──────────────────────────────────────────────────────────────────── > ╭──────────────────────────────────────────────────────────────────────────────╮ > │ ## eval │ > ╰──────────────────────────────────────────────────────────────────────────────╯ > > ── fsharp ────────────────────────────────────────────────────────────────────── > let inline eval > (fsi_eval: > string > -> System.Threading.CancellationToken > -> Choice<'a, Exception> * (TraceLevel * string * int * (string * (int * > int) * (int * int))) array) > (cancellationToken: Option<System.Threading.CancellationToken>) > (code: string) > = > trace Verbose > (fun () -> $"Eval.eval") > (fun () -> $"code: {code |> SpiralSm.ellipsis_end 400} / {_locals ()}") > > let rawCellCode = > code |> SpiralSm.replace "\r\n" "\n" > > let lines = rawCellCode |> SpiralSm.split "\n" > > if lines |> Array.exists (fun line -> line |> SpiralSm.starts_with "#r " && > line |> SpiralSm.ends_with "\"") then > let cancellationToken = defaultArg cancellationToken > System.Threading.CancellationToken.None > let ch, errors = fsi_eval code cancellationToken > trace Verbose (fun () -> $"Eval.eval / fsi_eval 1 / ch: %A{ch} / errors: > {errors}") _locals > match ch with > | Choice1Of2 v -> Ok(v), errors > | Choice2Of2 ex -> Error(ex), errors > else > let builderCommands = > lines > |> Array.choose (fun line -> > if line |> SpiralSm.starts_with "///! " > then line |> SpiralSm.split "///! " |> Array.tryItem 1 > else None > ) > > let packages = > lines > |> Array.choose (fun line -> > if line |> SpiralSm.starts_with "//// package=" > then line |> SpiralSm.split "=" |> Array.skip 1 |> > SpiralSm.concat "" |> Some > else None > ) > > allPackages <- packages |> Array.append allPackages |> Array.distinct > > let timeout = > lines > |> Array.tryPick (fun line -> > if line |> SpiralSm.starts_with "//// timeout=" > then line |> SpiralSm.split "=" |> Array.tryItem 1 |> Option.map > int > else None > ) > |> Option.defaultValue (60000 * 60) > > let boolArg def command = > lines > |> Array.tryPick (fun line -> > let text = $"//// {command}" > match line.[[0..text.Length-1]], line.[[text.Length..]] with > | head, "" when head = text -> > Some true > | head, _ when head = text -> > line |> SpiralSm.split "=" |> Array.tryItem 1 |> Option.map > ((<>) "false") > | _ -> None > ) > |> Option.defaultValue def > > let printCode = "print_code" |> boolArg false > let isTraceToggle = "trace_toggle" |> boolArg false > let isTrace = "trace" |> boolArg false > let isCache = "cache" |> boolArg false > let isReal = "real" |> boolArg false > > if isTraceToggle > then traceToggle <- not traceToggle > > let oldLevel = get_trace_level () > let traceLevel = > if isTrace || traceToggle > then Verbose > else Info > traceLevel > |> to_trace_level > |> set_trace_level > use _ = (new_disposable (fun () -> > oldLevel |> set_trace_level > )) > > async { > try > let cellCode, lastTopLevelIndex = prepareSpiral rawCellCode > lines > let newAllCode = > if isReal > then $"{allCodeReal}\n\n{cellCode}" > else $"{allCode}\n\n{cellCode}" > > let buildBackends = > if builderCommands.Length = 0 > then [[| Supervisor.Fsharp |]] > else > builderCommands > |> Array.map (fun x -> > if x |> SpiralSm.starts_with "cuda" > then Supervisor.Cuda > else Supervisor.Fsharp > ) > |> Array.distinct > > trace Verbose > (fun () -> $"Eval.eval") > (fun () -> $"lastTopLevelIndex: {lastTopLevelIndex} / > builderCommands: %A{builderCommands} / buildBackends: %A{buildBackends} / > isReal: {isReal} / {_locals ()}") > > let! buildCodeResults = > buildBackends > |> Array.map (fun backend -> async { > let! result = > if isReal > then Supervisor.Spir newAllCode > else > Supervisor.Spi > (newAllCode, if allCodeReal = "" then None > else Some allCodeReal) > |> Supervisor.buildCode backend allPackages isCache > timeout cancellationToken > return backend, result > }) > |> Async.Parallel > |> Async.catch > |> Async.runWithTimeoutAsync timeout > > match buildCodeResults with > | Some (Ok buildCodeResults) -> > let! result, errors = > ((Ok [[]], [[||]]), buildCodeResults) > ||> Async.fold (fun acc buildCodeResult -> async { > match buildCodeResult with > | backend, (_, (outputPath, Some code), > spiralErrors) -> > let spiralErrors = > mapErrors (Warning, spiralErrors, > lastTopLevelIndex) allCode > let! result = > processSpiralOutput > {| > printCode = printCode > traceLevel = traceLevel > builderCommands = builderCommands > lastTopLevelIndex = > lastTopLevelIndex > backend = backend > cancellationToken = > cancellationToken > spiralErrors = spiralErrors > code = code > outputPath = outputPath > isReal = isReal > |} > match result, acc with > | (Ok code, errors), (Ok acc_code, acc_errors) > -> > return Ok (acc_code @ code), acc_errors |> > Array.append errors > | (Error ex, errors), _ | _, (Error ex, errors) > -> > return > Error (Exception $"Eval.eval / > processSpiralOutput / Exception / buildCodeResult: %A{buildCodeResult |> > FSharp.Json.Json.serialize |> SpiralSm.ellipsis_end 400} / ex: {ex |> > SpiralSm.format_exception}"), > errors |> Array.append errors > | _, (_, _, errors) when errors |> List.isEmpty |> > not -> > return errors.[[0]] |> fst |> Exception |> > Error, > mapErrors (TraceLevel.Critical, errors, > lastTopLevelIndex) allCode > | _ -> return acc > }) > let cancellationToken = defaultArg cancellationToken > System.Threading.CancellationToken.None > match result, errors with > | Ok code, [[||]] -> > let code, eval = > code > |> List.map (fun code -> > if code.eval > then None, Some code.code > else Some code.code, None > ) > |> List.unzip > let code = code |> List.choose id > let eval = eval |> List.choose id > > trace Debug > (fun () -> $"Eval.eval") > (fun () -> $"eval: {eval |> > FSharp.Json.Json.serialize |> SpiralSm.ellipsis_end 400} / code: {code |> > FSharp.Json.Json.serialize |> SpiralSm.ellipsis_end 400} / {_locals ()}") > > let ch, errors = > match eval, code with > | [[]], [[]] -> > Choice2Of2 (Exception $"Eval.eval / eval=[[]] / > code=[[]] / buildCodeResults: %A{buildCodeResults} / code: %A{code}"), errors > | [[ eval ]], [[]] -> > let ch, errors2 = fsi_eval eval > cancellationToken > let errors = > errors2 > // |> Array.map (fun (e1, e2, e3, _) -> > // (e1, e2, e3, ("", (0, 0), (0, 0))) > // ) > |> Array.append errors > ch, errors > | [[]], _ -> > let code = code |> List.rev |> String.concat > "\n\n" > let code = > if printCode > then $"\"\"\"{code}\n\n\"\"\"" > else $"\"\"\"{code}\n\"\"\"" > let ch, errors2 = fsi_eval code > cancellationToken > let errors = > errors2 > // |> Array.map (fun (e1, e2, e3, _) -> > // (e1, e2, e3, ("", (0, 0), (0, 0))) > // ) > |> Array.append errors > ch, errors > | _ -> > let code, errors = > ((Ok (code |> List.rev), [[||]]), eval) > ||> List.fold (fun (acc, acc_errors) eval -> > match acc with > | Error ch -> Error ch, acc_errors > | Ok acc -> > let ch, errors = fsi_eval eval > cancellationToken > let errors = > errors > // |> Array.map (fun (e1, e2, > e3, _) -> > // (e1, e2, e3, ("", (0, 0), > (0, 0))) > // ) > |> Array.append acc_errors > match ch with > | Choice1Of2 v -> > let v = > v > |> tryGetPropertyValue > "ReflectionValue" > |> Option.map (fun x -> > $"%A{x}") > |> Option.defaultValue "" > Ok (v :: acc), errors > | Choice2Of2 ex -> > trace Critical (fun () -> > $"Eval.eval / fsi_eval fold Choice error / buildCodeResults: > %A{buildCodeResults} / ex: {ex |> SpiralSm.format_exception}") _locals > Error ch, errors > ) > match code with > | Error ch -> ch, errors > | Ok code -> > let code = > code > |> List.filter ((<>) "") > |> String.concat "\n\n" > > let code = > if builderCommands.Length > 0 && > eval.Length = 0 > then code > elif code |> SpiralSm.contains "\n\n\n" > then $"{code}\n\n" > else $"{code}\n" > > let code = > if printCode > then $"\"\"\"{code}\n\n\n\"\"\"" > else $"\"\"\"{code}\n\"\"\"" > let ch, errors2 = fsi_eval code > cancellationToken > let errors = > errors2 > // |> Array.map (fun (e1, e2, e3, _) -> > // (e1, e2, e3, ("", (0, 0), (0, > 0))) > // ) > |> Array.append errors > ch, errors > match ch with > | Choice1Of2 v -> > if isReal > then allCodeReal <- newAllCode > else allCode <- newAllCode > return Ok(v), errors > | Choice2Of2 ex -> > return > Error (Exception $"Eval.eval / -2 / Exception / > buildCodeResults: {buildCodeResults |> FSharp.Json.Json.serialize |> > SpiralSm.ellipsis_end 400} / ex: {ex |> SpiralSm.format_exception}"), > errors > | Ok code, errors -> > return > Error (Exception "Eval.eval / errors / > buildCodeResults: %A{buildCodeResults} / code: %A{code}"), > errors > | Error ex, errors -> > return > Error (Exception $"Eval.eval / -1 / Exception / > buildCodeResults: {buildCodeResults |> FSharp.Json.Json.serialize |> > SpiralSm.ellipsis_end 1500} / ex: {ex |> SpiralSm.format_exception}"), > errors > | Some (Error ex) -> > trace Critical (fun () -> $"Eval.eval / buildCodeResults > Error / buildCodeResults: %A{buildCodeResults} / ex: {ex |> > SpiralSm.format_exception}") _locals > return > Error (Exception $"Eval.eval / buildCodeResults Error / > Exception / buildCodeResults: %A{buildCodeResults} / ex: {ex |> > SpiralSm.format_exception}"), > [[| > ( > TraceLevel.Critical, $"Eval.eval / > buildCodeResults Error / errors[[0]] / buildCodeResults: %A{buildCodeResults} / > ex: {ex |> SpiralSm.format_exception}", 0, ("", (0, 0), (0, 0)) > ) > |]] > | _ -> > return > Error (Exception $"Eval.eval / buildCodeResults / > Exception / buildCodeResults: %A{buildCodeResults}"), > [[| > ( > TraceLevel.Critical, $"Eval.eval / > buildCodeResults / errors[[0]] / buildCodeResults: %A{buildCodeResults}", 0, > ("", (0, 0), (0, 0)) > ) > |]] > with ex -> > trace Critical (fun () -> $"Eval.eval / try 1 ex / ex: {ex |> > SpiralSm.format_exception} / lines: %A{lines}") _locals > return > Error (Exception $"Eval.eval / try 1 ex / Exception / ex: > {ex |> SpiralSm.format_exception} / lines: %A{lines}"), > [[| > ( > TraceLevel.Critical, $"Eval.eval / try 1 ex / > errors[[0]] / ex: {ex |> SpiralSm.format_exception} / lines: %A{lines}", 0, ("", > (0, 0), (0, 0)) > ) > |]] > } > |> Async.runWithTimeout timeout > |> Option.defaultValue ( > Error (Exception $"Eval.eval / Async.runWithTimeout / Exception / > timeout: {timeout} / lines: %A{lines}"), > [[| > ( > TraceLevel.Critical, $"Eval.eval / Async.runWithTimeout / > errors[[0]] / timeout: {timeout} / lines: %A{lines}", 0, ("", (0, 0), (0, 0)) > ) > |]] > ) 00:01:16 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 52560 } 00:01:16 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ "nbconvert", "c:/home/git/polyglot/apps/spiral/Eval.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark", ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/apps/spiral/Eval.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:01:18 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/spiral/Eval.dib.ipynb to html 00:01:18 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:01:18 verbose #7 ! validate(nb) 00:01:22 verbose #8 ! [NbConvertApp] Writing 452073 bytes to c:\home\git\polyglot\apps\spiral\Eval.dib.html 00:01:23 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 641 } 00:01:23 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 641 } 00:01:23 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ "-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/Eval.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/Eval.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:01:23 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:01:23 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:01:23 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 53260 } 00:00:00 debug #1 writeDibCode / output: Fs / path: Eval.dib 00:00:00 debug #2 parseDibCode / output: Fs / file: Eval.dib
In [ ]:
{ pwsh ../lib/fsharp/build.ps1 -sequential 1 } | Invoke-Block
00:00:00 verbose #1 async.run_with_timeout_async / { timeout = 180 } 00:00:01 debug #1 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path Async.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:01 verbose #2 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "Async.dib", "--retries", "3"])) } 00:00:01 verbose #3 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:00:01 verbose #4 > "repl", 00:00:01 verbose #5 > "--exit-after-run", 00:00:01 verbose #6 > "--run", 00:00:01 verbose #7 > "c:/home/git/polyglot/lib/fsharp/Async.dib", 00:00:01 verbose #8 > "--output-path", 00:00:01 verbose #9 > "c:/home/git/polyglot/lib/fsharp/Async.dib.ipynb", 00:00:01 verbose #10 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/fsharp/Async.dib" --output-path "c:/home/git/polyglot/lib/fsharp/Async.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:00:04 verbose #11 > > 00:00:04 verbose #12 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:04 verbose #13 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:04 verbose #14 > > │ # Async (Polyglot) │ 00:00:04 verbose #15 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:27 verbose #16 > > 00:00:27 verbose #17 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:27 verbose #18 > > #if !INTERACTIVE 00:00:27 verbose #19 > > open Lib 00:00:27 verbose #20 > > #endif 00:00:27 verbose #21 > > 00:00:27 verbose #22 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:27 verbose #23 > > open Common 00:00:27 verbose #24 > > 00:00:27 verbose #25 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:27 verbose #26 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:27 verbose #27 > > │ ## choice │ 00:00:27 verbose #28 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:27 verbose #29 > > 00:00:27 verbose #30 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:27 verbose #31 > > let inline choice asyncs = async { 00:00:27 verbose #32 > > let e = Event<_> () 00:00:27 verbose #33 > > use cts = new System.Threading.CancellationTokenSource () 00:00:27 verbose #34 > > let fn = 00:00:27 verbose #35 > > asyncs 00:00:27 verbose #36 > > |> Seq.map (fun a -> async { 00:00:27 verbose #37 > > let! x = a 00:00:27 verbose #38 > > e.Trigger x 00:00:27 verbose #39 > > }) 00:00:27 verbose #40 > > |> Async.Parallel 00:00:27 verbose #41 > > |> Async.Ignore 00:00:27 verbose #42 > > Async.Start (fn, cts.Token) 00:00:27 verbose #43 > > let! result = Async.AwaitEvent e.Publish 00:00:27 verbose #44 > > cts.Cancel () 00:00:27 verbose #45 > > return result 00:00:27 verbose #46 > > } 00:00:27 verbose #47 > > 00:00:27 verbose #48 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:27 verbose #49 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:27 verbose #50 > > │ ## map │ 00:00:27 verbose #51 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:27 verbose #52 > > 00:00:27 verbose #53 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:27 verbose #54 > > let inline map fn a = async { 00:00:27 verbose #55 > > let! x = a 00:00:27 verbose #56 > > return fn x 00:00:27 verbose #57 > > } 00:00:27 verbose #58 > > 00:00:27 verbose #59 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:27 verbose #60 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:27 verbose #61 > > │ ## catch │ 00:00:27 verbose #62 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:27 verbose #63 > > 00:00:27 verbose #64 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:27 verbose #65 > > let inline catch a = 00:00:27 verbose #66 > > a 00:00:27 verbose #67 > > |> Async.Catch 00:00:27 verbose #68 > > |> map (function 00:00:27 verbose #69 > > | Choice1Of2 result -> Ok result 00:00:27 verbose #70 > > | Choice2Of2 ex -> Error ex 00:00:27 verbose #71 > > ) 00:00:28 verbose #72 > > 00:00:28 verbose #73 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:28 verbose #74 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:28 verbose #75 > > │ ## runWithTimeoutChoiceAsync │ 00:00:28 verbose #76 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:28 verbose #77 > > 00:00:28 verbose #78 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:28 verbose #79 > > let inline runWithTimeoutChoiceAsync (timeout : int) fn = 00:00:28 verbose #80 > > let _locals () = $"timeout: {timeout} / {_locals ()}" 00:00:28 verbose #81 > > 00:00:28 verbose #82 > > let timeoutTask = async { 00:00:28 verbose #83 > > do! Async.Sleep timeout 00:00:28 verbose #84 > > trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals 00:00:28 verbose #85 > > return None 00:00:28 verbose #86 > > } 00:00:28 verbose #87 > > 00:00:28 verbose #88 > > let task = async { 00:00:28 verbose #89 > > try 00:00:28 verbose #90 > > let! result = fn 00:00:28 verbose #91 > > return Some result 00:00:28 verbose #92 > > with 00:00:28 verbose #93 > > | :? System.AggregateException as ex when 00:00:28 verbose #94 > > ex.InnerExceptions 00:00:28 verbose #95 > > |> Seq.exists (function :? 00:00:28 verbose #96 > > System.Threading.Tasks.TaskCanceledException -> true | _ -> false) 00:00:28 verbose #97 > > -> 00:00:28 verbose #98 > > trace Warning 00:00:28 verbose #99 > > (fun () -> "runWithTimeoutChoiceAsync") 00:00:28 verbose #100 > > (fun () -> $"ex: {ex |> SpiralSm.format_exception} / {_locals 00:00:28 verbose #101 > > ()}") 00:00:28 verbose #102 > > return None 00:00:28 verbose #103 > > | ex -> 00:00:28 verbose #104 > > trace Critical 00:00:28 verbose #105 > > (fun () -> "runWithTimeoutChoiceAsync") 00:00:28 verbose #106 > > (fun () -> $"ex: {ex |> SpiralSm.format_exception} / {_locals 00:00:28 verbose #107 > > ()}") 00:00:28 verbose #108 > > return None 00:00:28 verbose #109 > > } 00:00:28 verbose #110 > > 00:00:28 verbose #111 > > [[ timeoutTask; task ]] 00:00:28 verbose #112 > > |> choice 00:00:28 verbose #113 > > 00:00:28 verbose #114 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:28 verbose #115 > > let inline runWithTimeoutChoice timeout fn = 00:00:28 verbose #116 > > fn 00:00:28 verbose #117 > > |> runWithTimeoutChoiceAsync timeout 00:00:28 verbose #118 > > |> Async.RunSynchronously 00:00:28 verbose #119 > > 00:00:28 verbose #120 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:28 verbose #121 > > //// test 00:00:28 verbose #122 > > 00:00:28 verbose #123 > > Async.Sleep 120 00:00:28 verbose #124 > > |> runWithTimeoutChoice 10 00:00:28 verbose #125 > > |> _assertEqual None 00:00:28 verbose #126 > > 00:00:28 verbose #127 > > ╭─[ 285.19ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:28 verbose #128 > > │ 00:00:01 debug #1 runWithTimeoutChoiceAsync / timeout: 10 │ 00:00:28 verbose #129 > > │ <null> │ 00:00:28 verbose #130 > > │ │ 00:00:28 verbose #131 > > │ │ 00:00:28 verbose #132 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:28 verbose #133 > > 00:00:28 verbose #134 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:28 verbose #135 > > //// test 00:00:28 verbose #136 > > 00:00:28 verbose #137 > > Async.Sleep 10 00:00:28 verbose #138 > > |> runWithTimeoutChoice 60 00:00:28 verbose #139 > > |> _assertEqual (Some ()) 00:00:28 verbose #140 > > 00:00:28 verbose #141 > > ╭─[ 211.59ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:28 verbose #142 > > │ Some () │ 00:00:28 verbose #143 > > │ │ 00:00:28 verbose #144 > > │ │ 00:00:28 verbose #145 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:28 verbose #146 > > 00:00:28 verbose #147 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:28 verbose #148 > > //// test 00:00:28 verbose #149 > > 00:00:28 verbose #150 > > async { 00:00:28 verbose #151 > > raise (exn "error") 00:00:28 verbose #152 > > } 00:00:28 verbose #153 > > |> runWithTimeoutChoice 60 00:00:28 verbose #154 > > |> _assertEqual None 00:00:29 verbose #155 > > 00:00:29 verbose #156 > > ╭─[ 192.73ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:29 verbose #157 > > │ 00:00:01 critical #2 runWithTimeoutChoiceAsync / ex: System.Exception: │ 00:00:29 verbose #158 > > │ error / timeout: 60 │ 00:00:29 verbose #159 > > │ <null> │ 00:00:29 verbose #160 > > │ │ 00:00:29 verbose #161 > > │ │ 00:00:29 verbose #162 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:29 verbose #163 > > 00:00:29 verbose #164 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:29 verbose #165 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:29 verbose #166 > > │ ## runWithTimeoutAsync │ 00:00:29 verbose #167 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:29 verbose #168 > > 00:00:29 verbose #169 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:29 verbose #170 > > let inline runWithTimeoutAsync (timeout : int) fn = async { 00:00:29 verbose #171 > > let _locals () = $"timeout: {timeout} / {_locals ()}" 00:00:29 verbose #172 > > let! child = Async.StartChild (fn, timeout) 00:00:29 verbose #173 > > return! 00:00:29 verbose #174 > > child 00:00:29 verbose #175 > > |> catch 00:00:29 verbose #176 > > |> map (function 00:00:29 verbose #177 > > | Ok result -> Some result 00:00:29 verbose #178 > > | Error (:? System.TimeoutException as ex) -> 00:00:29 verbose #179 > > trace Debug (fun () -> $"runWithTimeoutAsync") _locals 00:00:29 verbose #180 > > None 00:00:29 verbose #181 > > | Error ex -> 00:00:29 verbose #182 > > trace Critical (fun () -> $"runWithTimeoutAsync** / ex: %A{ex}") 00:00:29 verbose #183 > > _locals 00:00:29 verbose #184 > > None 00:00:29 verbose #185 > > ) 00:00:29 verbose #186 > > } 00:00:29 verbose #187 > > 00:00:29 verbose #188 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:29 verbose #189 > > let inline runWithTimeout timeout fn = 00:00:29 verbose #190 > > fn 00:00:29 verbose #191 > > |> runWithTimeoutAsync timeout 00:00:29 verbose #192 > > |> Async.RunSynchronously 00:00:29 verbose #193 > > 00:00:29 verbose #194 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:29 verbose #195 > > //// test 00:00:29 verbose #196 > > 00:00:29 verbose #197 > > Async.Sleep 60 00:00:29 verbose #198 > > |> runWithTimeout 10 00:00:29 verbose #199 > > |> _assertEqual None 00:00:29 verbose #200 > > 00:00:29 verbose #201 > > ╭─[ 169.99ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:29 verbose #202 > > │ 00:00:02 debug #3 runWithTimeoutAsync / timeout: 10 │ 00:00:29 verbose #203 > > │ <null> │ 00:00:29 verbose #204 > > │ │ 00:00:29 verbose #205 > > │ │ 00:00:29 verbose #206 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:29 verbose #207 > > 00:00:29 verbose #208 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:29 verbose #209 > > //// test 00:00:29 verbose #210 > > 00:00:29 verbose #211 > > Async.Sleep 10 00:00:29 verbose #212 > > |> runWithTimeout 60 00:00:29 verbose #213 > > |> _assertEqual (Some ()) 00:00:29 verbose #214 > > 00:00:29 verbose #215 > > ╭─[ 148.14ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:29 verbose #216 > > │ Some () │ 00:00:29 verbose #217 > > │ │ 00:00:29 verbose #218 > > │ │ 00:00:29 verbose #219 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:29 verbose #220 > > 00:00:29 verbose #221 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:29 verbose #222 > > //// test 00:00:29 verbose #223 > > 00:00:29 verbose #224 > > async { 00:00:29 verbose #225 > > raise (exn "error") 00:00:29 verbose #226 > > } 00:00:29 verbose #227 > > |> runWithTimeout 60 00:00:29 verbose #228 > > |> _assertEqual None 00:00:29 verbose #229 > > 00:00:29 verbose #230 > > ╭─[ 169.54ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:29 verbose #231 > > │ 00:00:02 critical #4 runWithTimeoutAsync** / ex: System.Exception: │ 00:00:29 verbose #232 > > │ error │ 00:00:29 verbose #233 > > │ at FSI_0036.it@4-119.Invoke(Unit unitVar) │ 00:00:29 verbose #234 > > │ at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[ │ 00:00:29 verbose #235 > > │ T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in │ 00:00:29 verbose #236 > > │ D:\a\_work\1\s\src\FSharp.Core\async.fs:line 510 │ 00:00:29 verbose #237 > > │ at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) │ 00:00:29 verbose #238 > > │ in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 112 │ 00:00:29 verbose #239 > > │ --- End of stack trace from previous location --- │ 00:00:29 verbose #240 > > │ at Microsoft.FSharp.Control.AsyncResult`1.Commit() in │ 00:00:29 verbose #241 > > │ D:\a\_work\1\s\src\FSharp.Core\async.fs:line 454 │ 00:00:29 verbose #242 > > │ at │ 00:00:29 verbose #243 > > │ <StartupCode$FSharp-Core>.$Async.AwaitAndBindChildResult@1962-4.Invoke(Unit │ 00:00:29 verbose #244 > > │ unitVar) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 1964 │ 00:00:29 verbose #245 > > │ at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[ │ 00:00:29 verbose #246 > > │ T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in │ 00:00:29 verbose #247 > > │ D:\a\_work\1\s\src\FSharp.Core\async.fs:line 510 │ 00:00:29 verbose #248 > > │ at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) │ 00:00:29 verbose #249 > > │ in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 112 / timeout: 60 │ 00:00:29 verbose #250 > > │ <null> │ 00:00:29 verbose #251 > > │ │ 00:00:29 verbose #252 > > │ │ 00:00:29 verbose #253 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:29 verbose #254 > > 00:00:29 verbose #255 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:29 verbose #256 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:29 verbose #257 > > │ ## runWithTimeoutStrict │ 00:00:29 verbose #258 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:29 verbose #259 > > 00:00:29 verbose #260 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:29 verbose #261 > > let inline runWithTimeoutStrict (timeout : int) fn = 00:00:29 verbose #262 > > let _locals () = $"timeout: {timeout} / {_locals ()}" 00:00:29 verbose #263 > > 00:00:29 verbose #264 > > let timeoutTask = async { 00:00:29 verbose #265 > > do! Async.Sleep timeout 00:00:29 verbose #266 > > return None, _locals 00:00:29 verbose #267 > > } 00:00:29 verbose #268 > > 00:00:29 verbose #269 > > let task = async { 00:00:29 verbose #270 > > try 00:00:29 verbose #271 > > return Async.RunSynchronously (fn, timeout) |> Some, _locals 00:00:29 verbose #272 > > with 00:00:29 verbose #273 > > | :? System.TimeoutException as ex -> 00:00:29 verbose #274 > > let _locals () = $"ex: {ex |> SpiralSm.format_exception} / {_locals 00:00:29 verbose #275 > > ()}" 00:00:29 verbose #276 > > return None, _locals 00:00:29 verbose #277 > > | ex -> 00:00:29 verbose #278 > > trace Critical 00:00:29 verbose #279 > > (fun () -> "runWithTimeoutStrict / async error") 00:00:29 verbose #280 > > (fun () -> $"ex: {ex |> SpiralSm.format_exception} / {_locals 00:00:29 verbose #281 > > ()}") 00:00:29 verbose #282 > > return raise ex 00:00:29 verbose #283 > > } 00:00:29 verbose #284 > > 00:00:29 verbose #285 > > try 00:00:29 verbose #286 > > [[| timeoutTask; task |]] 00:00:29 verbose #287 > > |> Array.map Async.StartAsTask 00:00:29 verbose #288 > > |> System.Threading.Tasks.Task.WhenAny 00:00:29 verbose #289 > > |> fun task -> 00:00:29 verbose #290 > > match task.Result.Result with 00:00:29 verbose #291 > > | None, _locals -> 00:00:29 verbose #292 > > trace Debug (fun () -> "runWithTimeoutStrict") _locals 00:00:29 verbose #293 > > None 00:00:29 verbose #294 > > | result, _ -> result 00:00:29 verbose #295 > > with 00:00:29 verbose #296 > > | :? System.AggregateException as ex when 00:00:29 verbose #297 > > ex.InnerExceptions 00:00:29 verbose #298 > > |> Seq.exists (function :? System.Threading.Tasks.TaskCanceledException 00:00:29 verbose #299 > > -> true | _ -> false) 00:00:29 verbose #300 > > -> 00:00:29 verbose #301 > > trace Warning 00:00:29 verbose #302 > > (fun () -> "runWithTimeoutStrict") 00:00:29 verbose #303 > > (fun () -> $"ex: {ex |> SpiralSm.format_exception} / {_locals ()}") 00:00:29 verbose #304 > > None 00:00:29 verbose #305 > > | ex -> 00:00:29 verbose #306 > > trace Critical 00:00:29 verbose #307 > > (fun () -> "runWithTimeoutStrict / task error") 00:00:29 verbose #308 > > (fun () -> $"ex: {ex |> SpiralSm.format_exception} / {_locals ()}") 00:00:29 verbose #309 > > None 00:00:30 verbose #310 > > 00:00:30 verbose #311 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:30 verbose #312 > > //// test 00:00:30 verbose #313 > > 00:00:30 verbose #314 > > Async.Sleep 60 00:00:30 verbose #315 > > |> runWithTimeoutStrict 10 00:00:30 verbose #316 > > |> _assertEqual None 00:00:30 verbose #317 > > 00:00:30 verbose #318 > > ╭─[ 182.21ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:30 verbose #319 > > │ 00:00:02 debug #5 runWithTimeoutStrict / timeout: 10 │ 00:00:30 verbose #320 > > │ <null> │ 00:00:30 verbose #321 > > │ │ 00:00:30 verbose #322 > > │ │ 00:00:30 verbose #323 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:30 verbose #324 > > 00:00:30 verbose #325 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:30 verbose #326 > > //// test 00:00:30 verbose #327 > > 00:00:30 verbose #328 > > Async.Sleep 10 00:00:30 verbose #329 > > |> runWithTimeoutStrict 60 00:00:30 verbose #330 > > |> _assertEqual (Some ()) 00:00:30 verbose #331 > > 00:00:30 verbose #332 > > ╭─[ 204.07ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:30 verbose #333 > > │ Some () │ 00:00:30 verbose #334 > > │ │ 00:00:30 verbose #335 > > │ │ 00:00:30 verbose #336 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:30 verbose #337 > > 00:00:30 verbose #338 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:30 verbose #339 > > //// test 00:00:30 verbose #340 > > 00:00:30 verbose #341 > > async { 00:00:30 verbose #342 > > raise (exn "error") 00:00:30 verbose #343 > > } 00:00:30 verbose #344 > > |> runWithTimeoutStrict 60 00:00:30 verbose #345 > > |> _assertEqual None 00:00:30 verbose #346 > > 00:00:30 verbose #347 > > ╭─[ 157.63ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:30 verbose #348 > > │ 00:00:03 critical #6 runWithTimeoutStrict / async error / ex: │ 00:00:30 verbose #349 > > │ System.Exception: error / timeout: 60 │ 00:00:30 verbose #350 > > │ 00:00:03 critical #7 runWithTimeoutStrict / task error / ex: │ 00:00:30 verbose #351 > > │ System.AggregateException: One or more errors occurred. (error) / timeout: │ 00:00:30 verbose #352 > > │ 60 │ 00:00:30 verbose #353 > > │ <null> │ 00:00:30 verbose #354 > > │ │ 00:00:30 verbose #355 > > │ │ 00:00:30 verbose #356 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:30 verbose #357 > > 00:00:30 verbose #358 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:30 verbose #359 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:30 verbose #360 > > │ ## awaitValueTask │ 00:00:30 verbose #361 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:30 verbose #362 > > 00:00:30 verbose #363 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:30 verbose #364 > > let inline awaitValueTaskUnit (task : System.Threading.Tasks.ValueTask) = 00:00:30 verbose #365 > > task.AsTask () |> Async.AwaitTask 00:00:30 verbose #366 > > 00:00:30 verbose #367 > > let inline awaitValueTask (task : System.Threading.Tasks.ValueTask<_>) = 00:00:30 verbose #368 > > task.AsTask () |> Async.AwaitTask 00:00:30 verbose #369 > > 00:00:30 verbose #370 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:30 verbose #371 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:30 verbose #372 > > │ ## init │ 00:00:30 verbose #373 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:30 verbose #374 > > 00:00:30 verbose #375 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:30 verbose #376 > > let inline init x = async { 00:00:30 verbose #377 > > return x 00:00:30 verbose #378 > > } 00:00:30 verbose #379 > > 00:00:30 verbose #380 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:30 verbose #381 > > //// test 00:00:30 verbose #382 > > 00:00:30 verbose #383 > > init 1 00:00:30 verbose #384 > > |> Async.RunSynchronously 00:00:30 verbose #385 > > |> _assertEqual 1 00:00:30 verbose #386 > > 00:00:30 verbose #387 > > ╭─[ 34.18ms - stdout ]─────────────────────────────────────────────────────────╮ 00:00:30 verbose #388 > > │ 1 │ 00:00:30 verbose #389 > > │ │ 00:00:30 verbose #390 > > │ │ 00:00:30 verbose #391 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:30 verbose #392 > > 00:00:30 verbose #393 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:30 verbose #394 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:30 verbose #395 > > │ ## withCancellationToken │ 00:00:30 verbose #396 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:30 verbose #397 > > 00:00:30 verbose #398 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:30 verbose #399 > > let inline withCancellationToken (ct : System.Threading.CancellationToken) fn = 00:00:30 verbose #400 > > Async.StartImmediateAsTask (fn, ct) 00:00:30 verbose #401 > > |> Async.AwaitTask 00:00:30 verbose #402 > > 00:00:30 verbose #403 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:30 verbose #404 > > //// test 00:00:30 verbose #405 > > 00:00:30 verbose #406 > > let cts = new System.Threading.CancellationTokenSource () 00:00:30 verbose #407 > > 00:00:30 verbose #408 > > async { 00:00:30 verbose #409 > > let run = async { 00:00:30 verbose #410 > > do! Async.Sleep 100 00:00:30 verbose #411 > > return 1 00:00:30 verbose #412 > > } 00:00:30 verbose #413 > > 00:00:30 verbose #414 > > let! child = 00:00:30 verbose #415 > > run 00:00:30 verbose #416 > > |> withCancellationToken cts.Token 00:00:30 verbose #417 > > |> catch 00:00:30 verbose #418 > > |> Async.StartChild 00:00:30 verbose #419 > > 00:00:30 verbose #420 > > do! Async.Sleep 50 00:00:30 verbose #421 > > cts.Cancel () 00:00:30 verbose #422 > > return! child 00:00:30 verbose #423 > > } 00:00:30 verbose #424 > > |> Async.RunSynchronously 00:00:30 verbose #425 > > |> Result.mapError _.Message 00:00:30 verbose #426 > > |> _assertEqual (Error ("A task was canceled.")) 00:00:31 verbose #427 > > 00:00:31 verbose #428 > > ╭─[ 247.35ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:31 verbose #429 > > │ Error "A task was canceled." │ 00:00:31 verbose #430 > > │ │ 00:00:31 verbose #431 > > │ │ 00:00:31 verbose #432 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:31 verbose #433 > > 00:00:31 verbose #434 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:31 verbose #435 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:31 verbose #436 > > │ ## retryAsync │ 00:00:31 verbose #437 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:31 verbose #438 > > 00:00:31 verbose #439 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:31 verbose #440 > > let inline retryAsync retries fn = 00:00:31 verbose #441 > > let rec loop retry lastError = async { 00:00:31 verbose #442 > > try 00:00:31 verbose #443 > > return! 00:00:31 verbose #444 > > if retry <= retries 00:00:31 verbose #445 > > then fn |> map Ok 00:00:31 verbose #446 > > else lastError |> Error |> init 00:00:31 verbose #447 > > with ex -> 00:00:31 verbose #448 > > trace Debug (fun () -> $"Async.retryAsync / retry: {retry}/{retries} 00:00:31 verbose #449 > > / ex: {ex |> SpiralSm.format_exception}") _locals 00:00:31 verbose #450 > > do! Async.Sleep 30 00:00:31 verbose #451 > > return! loop (retry + 1) (ex |> SpiralSm.format_exception) 00:00:31 verbose #452 > > } 00:00:31 verbose #453 > > loop 1 "Async.retryAsync / invalid retries / retries: {retries}" 00:00:31 verbose #454 > > 00:00:31 verbose #455 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:31 verbose #456 > > //// test 00:00:31 verbose #457 > > 00:00:31 verbose #458 > > let retry_fn_test = ref 0 00:00:31 verbose #459 > > async { 00:00:31 verbose #460 > > retry_fn_test.Value <- retry_fn_test.Value + 1 00:00:31 verbose #461 > > return retry_fn_test.Value 00:00:31 verbose #462 > > } 00:00:31 verbose #463 > > |> retryAsync 3 00:00:31 verbose #464 > > |> Async.RunSynchronously 00:00:31 verbose #465 > > |> _assertEqual (Ok 1) 00:00:31 verbose #466 > > 00:00:31 verbose #467 > > ╭─[ 150.85ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:31 verbose #468 > > │ Ok 1 │ 00:00:31 verbose #469 > > │ │ 00:00:31 verbose #470 > > │ │ 00:00:31 verbose #471 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:31 verbose #472 > > 00:00:31 verbose #473 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:31 verbose #474 > > //// test 00:00:31 verbose #475 > > 00:00:31 verbose #476 > > let retry_fn_test = ref 0 00:00:31 verbose #477 > > async { 00:00:31 verbose #478 > > return 00:00:31 verbose #479 > > if retry_fn_test.Value >= 2 00:00:31 verbose #480 > > then retry_fn_test.Value 00:00:31 verbose #481 > > else 00:00:31 verbose #482 > > retry_fn_test.Value <- retry_fn_test.Value + 1 00:00:31 verbose #483 > > failwith "test" 00:00:31 verbose #484 > > } 00:00:31 verbose #485 > > |> retryAsync 3 00:00:31 verbose #486 > > |> Async.RunSynchronously 00:00:31 verbose #487 > > |> _assertEqual (Ok 2) 00:00:31 verbose #488 > > 00:00:31 verbose #489 > > ╭─[ 233.76ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:31 verbose #490 > > │ 00:00:04 debug #8 Async.retryAsync / retry: 1/3 / ex: │ 00:00:31 verbose #491 > > │ System.Exception: test │ 00:00:31 verbose #492 > > │ 00:00:04 debug #9 Async.retryAsync / retry: 2/3 / ex: │ 00:00:31 verbose #493 > > │ System.Exception: test │ 00:00:31 verbose #494 > > │ Ok 2 │ 00:00:31 verbose #495 > > │ │ 00:00:31 verbose #496 > > │ │ 00:00:31 verbose #497 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:31 verbose #498 > > 00:00:31 verbose #499 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:31 verbose #500 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:31 verbose #501 > > │ ## fold │ 00:00:31 verbose #502 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:31 verbose #503 > > 00:00:31 verbose #504 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:31 verbose #505 > > let fold folder state array = 00:00:31 verbose #506 > > let rec loop acc i = 00:00:31 verbose #507 > > async { 00:00:31 verbose #508 > > if i < Array.length array then 00:00:31 verbose #509 > > let! newAcc = folder acc array.[[i]] 00:00:31 verbose #510 > > return! loop newAcc (i + 1) 00:00:31 verbose #511 > > else 00:00:31 verbose #512 > > return acc 00:00:31 verbose #513 > > } 00:00:31 verbose #514 > > loop state 0 00:00:31 verbose #515 > 00:00:30 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 21258 } 00:00:31 verbose #516 > 00:00:30 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:00:31 verbose #517 > "nbconvert", 00:00:31 verbose #518 > "c:/home/git/polyglot/lib/fsharp/Async.dib.ipynb", 00:00:31 verbose #519 > "--to", 00:00:31 verbose #520 > "html", 00:00:31 verbose #521 > "--HTMLExporter.theme=dark", 00:00:31 verbose #522 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/fsharp/Async.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:34 verbose #523 > 00:00:33 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/fsharp/Async.dib.ipynb to html 00:00:34 verbose #524 > 00:00:33 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:00:34 verbose #525 > 00:00:33 verbose #7 ! validate(nb) 00:00:36 verbose #526 > 00:00:35 verbose #8 ! [NbConvertApp] Writing 332761 bytes to c:\home\git\polyglot\lib\fsharp\Async.dib.html 00:00:36 verbose #527 > 00:00:35 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 641 } 00:00:36 verbose #528 > 00:00:35 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 641 } 00:00:36 verbose #529 > 00:00:35 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:00:36 verbose #530 > "-c", 00:00:36 verbose #531 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/Async.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:00:36 verbose #532 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/Async.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:37 verbose #533 > 00:00:36 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:00:37 verbose #534 > 00:00:36 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:00:37 verbose #535 > 00:00:36 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 21958 } 00:00:37 debug #536 runtime.execute_with_options_async / { exit_code = 0; output_length = 25635 } 00:00:37 debug #1 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path Async.dib --retries 3 00:00:37 debug #537 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path AsyncSeq.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:37 verbose #538 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "AsyncSeq.dib", "--retries", "3"])) } 00:00:37 verbose #539 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:00:37 verbose #540 > "repl", 00:00:37 verbose #541 > "--exit-after-run", 00:00:37 verbose #542 > "--run", 00:00:37 verbose #543 > "c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib", 00:00:37 verbose #544 > "--output-path", 00:00:37 verbose #545 > "c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib.ipynb", 00:00:37 verbose #546 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib" --output-path "c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:00:40 verbose #547 > > 00:00:40 verbose #548 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:40 verbose #549 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:40 verbose #550 > > │ # AsyncSeq (Polyglot) │ 00:00:40 verbose #551 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:04 verbose #552 > > 00:01:04 verbose #553 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:01:04 verbose #554 > > #r 00:01:04 verbose #555 > > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan 00:01:04 verbose #556 > > dard2.1/FSharp.Control.AsyncSeq.dll" 00:01:04 verbose #557 > > #r 00:01:04 verbose #558 > > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6. 00:01:04 verbose #559 > > 0/System.Reactive.dll" 00:01:04 verbose #560 > > #r 00:01:04 verbose #561 > > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib 00:01:04 verbose #562 > > netstandard2.0/System.Reactive.Linq.dll" 00:01:06 verbose #563 > > 00:01:06 verbose #564 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:01:06 verbose #565 > > #if !INTERACTIVE 00:01:06 verbose #566 > > open Lib 00:01:06 verbose #567 > > #endif 00:01:06 verbose #568 > > 00:01:06 verbose #569 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:01:06 verbose #570 > > open Common 00:01:06 verbose #571 > > 00:01:06 verbose #572 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:06 verbose #573 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:06 verbose #574 > > │ ## subscribeEvent │ 00:01:06 verbose #575 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:06 verbose #576 > > 00:01:06 verbose #577 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:01:06 verbose #578 > > let inline subscribeEvent (event: IEvent<'H, 'A>) map = 00:01:06 verbose #579 > > let observable = System.Reactive.Linq.Observable.FromEventPattern<'H, 00:01:06 verbose #580 > > 'A>(event.AddHandler, event.RemoveHandler) 00:01:06 verbose #581 > > System.Reactive.Linq.Observable.Select (observable, fun event -> map 00:01:06 verbose #582 > > event.EventArgs) 00:01:06 verbose #583 > > |> FSharp.Control.AsyncSeq.ofObservableBuffered 00:01:06 verbose #584 > > 00:01:06 verbose #585 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:01:06 verbose #586 > > //// test 00:01:06 verbose #587 > > 00:01:06 verbose #588 > > type TestEvent () as self = 00:01:06 verbose #589 > > member val Calls = [[]] with get, set 00:01:06 verbose #590 > > member val Event = Event<ErrorEventHandler, ErrorEventArgs> () with get 00:01:06 verbose #591 > > 00:01:06 verbose #592 > > member _.AddCall text = 00:01:06 verbose #593 > > self.Calls <- self.Calls @ [[ text ]] 00:01:06 verbose #594 > > 00:01:06 verbose #595 > > member _.EventInterface = 00:01:06 verbose #596 > > { new IEvent<ErrorEventHandler, ErrorEventArgs> with 00:01:06 verbose #597 > > member _.AddHandler handler = 00:01:06 verbose #598 > > self.AddCall "AddHandler" 00:01:06 verbose #599 > > self.Event.Publish.AddHandler handler 00:01:06 verbose #600 > > 00:01:06 verbose #601 > > member _.RemoveHandler handler = 00:01:06 verbose #602 > > self.AddCall "RemoveHandler" 00:01:06 verbose #603 > > self.Event.Publish.RemoveHandler handler 00:01:06 verbose #604 > > 00:01:06 verbose #605 > > member _.Subscribe observer = 00:01:06 verbose #606 > > self.AddCall "IObservable.Subscribe" 00:01:06 verbose #607 > > let disposable = self.Event.Publish.Subscribe observer 00:01:06 verbose #608 > > new_disposable (fun () -> 00:01:06 verbose #609 > > self.AddCall "IObservable.Dispose" 00:01:06 verbose #610 > > disposable.Dispose () 00:01:06 verbose #611 > > ) 00:01:06 verbose #612 > > } 00:01:06 verbose #613 > > 00:01:06 verbose #614 > > member _.Subscribe () = 00:01:06 verbose #615 > > subscribeEvent 00:01:06 verbose #616 > > self.EventInterface 00:01:06 verbose #617 > > (fun args -> 00:01:06 verbose #618 > > let result = args.GetException () |> SpiralSm.format_exception 00:01:06 verbose #619 > > self.AddCall $"TestEvent.Subscribe({result})" 00:01:06 verbose #620 > > result 00:01:06 verbose #621 > > ) 00:01:06 verbose #622 > > 00:01:06 verbose #623 > > member _.Iter subscription = 00:01:06 verbose #624 > > subscription 00:01:06 verbose #625 > > |> FSharp.Control.AsyncSeq.iteriAsync (fun i error -> async { 00:01:06 verbose #626 > > self.AddCall $"TestEvent.Iter({i}: {error})" 00:01:06 verbose #627 > > }) 00:01:06 verbose #628 > > 00:01:06 verbose #629 > > member _.WaitCall text = async { 00:01:06 verbose #630 > > while self.Calls |> List.last <> text do 00:01:06 verbose #631 > > do! Async.SwitchToThreadPool () 00:01:06 verbose #632 > > } 00:01:06 verbose #633 > > 00:01:06 verbose #634 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:01:06 verbose #635 > > //// test 00:01:06 verbose #636 > > 00:01:06 verbose #637 > > let testEvent = TestEvent () 00:01:06 verbose #638 > > 00:01:06 verbose #639 > > async { 00:01:06 verbose #640 > > testEvent.AddCall "1" 00:01:06 verbose #641 > > let! child = testEvent.Subscribe () |> testEvent.Iter |> Async.StartChild 00:01:06 verbose #642 > > do! testEvent.WaitCall "AddHandler" 00:01:06 verbose #643 > > testEvent.AddCall "2" 00:01:06 verbose #644 > > do! child 00:01:06 verbose #645 > > testEvent.AddCall "3" 00:01:06 verbose #646 > > } 00:01:06 verbose #647 > > |> Async.runWithTimeout 300 00:01:06 verbose #648 > > |> _assertEqual None 00:01:06 verbose #649 > > 00:01:06 verbose #650 > > testEvent.Calls 00:01:06 verbose #651 > > |> Seq.toList 00:01:06 verbose #652 > > |> _assertEqual [[ "1"; "AddHandler"; "2"; "RemoveHandler" ]] 00:01:07 verbose #653 > > 00:01:07 verbose #654 > > ╭─[ 635.04ms - stdout ]────────────────────────────────────────────────────────╮ 00:01:07 verbose #655 > > │ 00:00:02 debug #1 runWithTimeoutAsync / timeout: 300 │ 00:01:07 verbose #656 > > │ <null> │ 00:01:07 verbose #657 > > │ │ 00:01:07 verbose #658 > > │ ["1"; "AddHandler"; "2"; "RemoveHandler"] │ 00:01:07 verbose #659 > > │ │ 00:01:07 verbose #660 > > │ │ 00:01:07 verbose #661 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:07 verbose #662 > > 00:01:07 verbose #663 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:01:07 verbose #664 > > //// test 00:01:07 verbose #665 > > 00:01:07 verbose #666 > > let testEvent = TestEvent () 00:01:07 verbose #667 > > 00:01:07 verbose #668 > > async { 00:01:07 verbose #669 > > testEvent.AddCall "1" 00:01:07 verbose #670 > > let! child = testEvent.Subscribe () |> testEvent.Iter |> Async.StartChild 00:01:07 verbose #671 > > do! testEvent.WaitCall "AddHandler" 00:01:07 verbose #672 > > testEvent.AddCall "2" 00:01:07 verbose #673 > > use _ = testEvent.EventInterface.Subscribe (fun args -> 00:01:07 verbose #674 > > testEvent.AddCall $"testEvent.EventInterface.Subscribe({args})" 00:01:07 verbose #675 > > ) 00:01:07 verbose #676 > > testEvent.AddCall "3" 00:01:07 verbose #677 > > do! child 00:01:07 verbose #678 > > testEvent.AddCall "4" 00:01:07 verbose #679 > > } 00:01:07 verbose #680 > > |> Async.runWithTimeout 300 00:01:07 verbose #681 > > |> _assertEqual None 00:01:07 verbose #682 > > 00:01:07 verbose #683 > > testEvent.Calls 00:01:07 verbose #684 > > |> _assertEqual [[ "1"; "AddHandler"; "2"; "IObservable.Subscribe"; "3"; 00:01:07 verbose #685 > > "RemoveHandler"; "IObservable.Dispose" ]] 00:01:07 verbose #686 > > 00:01:07 verbose #687 > > ╭─[ 534.66ms - stdout ]────────────────────────────────────────────────────────╮ 00:01:07 verbose #688 > > │ 00:00:03 debug #2 runWithTimeoutAsync / timeout: 300 │ 00:01:07 verbose #689 > > │ <null> │ 00:01:07 verbose #690 > > │ │ 00:01:07 verbose #691 > > │ ["1"; "AddHandler"; "2"; "IObservable.Subscribe"; "3"; "RemoveHandler"; │ 00:01:07 verbose #692 > > │ "IObservable.Dispose"] │ 00:01:07 verbose #693 > > │ │ 00:01:07 verbose #694 > > │ │ 00:01:07 verbose #695 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:07 verbose #696 > > 00:01:07 verbose #697 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:01:07 verbose #698 > > //// test 00:01:07 verbose #699 > > 00:01:07 verbose #700 > > let testEvent = TestEvent () 00:01:07 verbose #701 > > 00:01:07 verbose #702 > > async { 00:01:07 verbose #703 > > testEvent.AddCall "1" 00:01:07 verbose #704 > > let! child = testEvent.Subscribe () |> testEvent.Iter |> Async.StartChild 00:01:07 verbose #705 > > do! testEvent.WaitCall "AddHandler" 00:01:07 verbose #706 > > testEvent.AddCall "2" 00:01:07 verbose #707 > > use _ = testEvent.EventInterface.Subscribe (fun args -> 00:01:07 verbose #708 > > async { 00:01:07 verbose #709 > > do! testEvent.WaitCall "TestEvent.Iter(0: System.Exception: error)" 00:01:07 verbose #710 > > testEvent.AddCall 00:01:07 verbose #711 > > $"testEvent.EventInterface.Subscribe({args.GetException () |> 00:01:07 verbose #712 > > SpiralSm.format_exception})" 00:01:07 verbose #713 > > } 00:01:07 verbose #714 > > |> Async.RunSynchronously 00:01:07 verbose #715 > > ) 00:01:07 verbose #716 > > testEvent.AddCall "3" 00:01:07 verbose #717 > > testEvent.Event.Trigger (null, ErrorEventArgs (Exception "error")) 00:01:07 verbose #718 > > testEvent.AddCall "4" 00:01:07 verbose #719 > > do! child 00:01:07 verbose #720 > > testEvent.AddCall "5" 00:01:07 verbose #721 > > } 00:01:07 verbose #722 > > |> Async.runWithTimeout 300 00:01:07 verbose #723 > > |> _assertEqual None 00:01:07 verbose #724 > > 00:01:07 verbose #725 > > testEvent.Calls 00:01:07 verbose #726 > > |> _assertEqual [[ 00:01:07 verbose #727 > > "1" 00:01:07 verbose #728 > > "AddHandler" 00:01:07 verbose #729 > > "2" 00:01:07 verbose #730 > > "IObservable.Subscribe" 00:01:07 verbose #731 > > "3" 00:01:07 verbose #732 > > "TestEvent.Subscribe(System.Exception: error)" 00:01:07 verbose #733 > > "TestEvent.Iter(0: System.Exception: error)" 00:01:07 verbose #734 > > "testEvent.EventInterface.Subscribe(System.Exception: error)" 00:01:07 verbose #735 > > "4" 00:01:07 verbose #736 > > "RemoveHandler" 00:01:07 verbose #737 > > "IObservable.Dispose" 00:01:07 verbose #738 > > ]] 00:01:08 verbose #739 > > 00:01:08 verbose #740 > > ╭─[ 545.53ms - stdout ]────────────────────────────────────────────────────────╮ 00:01:08 verbose #741 > > │ 00:00:03 debug #3 runWithTimeoutAsync / timeout: 300 │ 00:01:08 verbose #742 > > │ <null> │ 00:01:08 verbose #743 > > │ │ 00:01:08 verbose #744 > > │ ["1"; "AddHandler"; "2"; "IObservable.Subscribe"; "3"; │ 00:01:08 verbose #745 > > │ "TestEvent.Subscribe(System.Exception: error)"; │ 00:01:08 verbose #746 > > │ "TestEvent.Iter(0: System.Exception: error)"; │ 00:01:08 verbose #747 > > │ "testEvent.EventInterface.Subscribe(System.Exception: error)"; "4"; │ 00:01:08 verbose #748 > > │ "RemoveHandler"; "IObservable.Dispose"] │ 00:01:08 verbose #749 > > │ │ 00:01:08 verbose #750 > > │ │ 00:01:08 verbose #751 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:08 verbose #752 > > 00:01:08 verbose #753 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:08 verbose #754 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:08 verbose #755 > > │ ## subscribeToken │ 00:01:08 verbose #756 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:08 verbose #757 > > 00:01:08 verbose #758 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:01:08 verbose #759 > > let subscribeToken (token : System.Threading.CancellationToken) = 00:01:08 verbose #760 > > let tcs = new System.Threading.Tasks.TaskCompletionSource () 00:01:08 verbose #761 > > System.Action tcs.SetResult |> token.Register |> ignore 00:01:08 verbose #762 > > let start = System.DateTime.Now.Ticks 00:01:08 verbose #763 > > FSharp.Control.AsyncSeq.unfoldAsync 00:01:08 verbose #764 > > (fun () -> async { 00:01:08 verbose #765 > > do! tcs.Task |> Async.AwaitTask 00:01:08 verbose #766 > > return Some (System.DateTime.Now.Ticks - start, ()) 00:01:08 verbose #767 > > }) 00:01:08 verbose #768 > > () 00:01:08 verbose #769 > > 00:01:08 verbose #770 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:01:08 verbose #771 > > //// test 00:01:08 verbose #772 > > 00:01:08 verbose #773 > > let cts = new System.Threading.CancellationTokenSource () 00:01:08 verbose #774 > > 00:01:08 verbose #775 > > async { 00:01:08 verbose #776 > > let! child = 00:01:08 verbose #777 > > cts.Token 00:01:08 verbose #778 > > |> subscribeToken 00:01:08 verbose #779 > > |> FSharp.Control.AsyncSeq.tryFirst 00:01:08 verbose #780 > > |> Async.StartChild 00:01:08 verbose #781 > > 00:01:08 verbose #782 > > do! Async.Sleep 100 00:01:08 verbose #783 > > cts.Cancel () 00:01:08 verbose #784 > > return! child 00:01:08 verbose #785 > > } 00:01:08 verbose #786 > > |> Async.RunSynchronously 00:01:08 verbose #787 > > |> Option.get 00:01:08 verbose #788 > > |> fun x -> x > 900000 00:01:08 verbose #789 > > |> _assertEqual true 00:01:08 verbose #790 > > 00:01:08 verbose #791 > > ╭─[ 214.19ms - stdout ]────────────────────────────────────────────────────────╮ 00:01:08 verbose #792 > > │ true │ 00:01:08 verbose #793 > > │ │ 00:01:08 verbose #794 > > │ │ 00:01:08 verbose #795 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:08 verbose #796 > 00:00:30 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 9731 } 00:01:08 verbose #797 > 00:00:30 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:01:08 verbose #798 > "nbconvert", 00:01:08 verbose #799 > "c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib.ipynb", 00:01:08 verbose #800 > "--to", 00:01:08 verbose #801 > "html", 00:01:08 verbose #802 > "--HTMLExporter.theme=dark", 00:01:08 verbose #803 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:01:11 verbose #804 > 00:00:33 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib.ipynb to html 00:01:11 verbose #805 > 00:00:33 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:01:11 verbose #806 > 00:00:33 verbose #7 ! validate(nb) 00:01:13 verbose #807 > 00:00:35 verbose #8 ! [NbConvertApp] Writing 302872 bytes to c:\home\git\polyglot\lib\fsharp\AsyncSeq.dib.html 00:01:13 verbose #808 > 00:00:35 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 647 } 00:01:13 verbose #809 > 00:00:35 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 647 } 00:01:13 verbose #810 > 00:00:35 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:01:13 verbose #811 > "-c", 00:01:13 verbose #812 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:01:13 verbose #813 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:01:13 verbose #814 > 00:00:36 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:01:13 verbose #815 > 00:00:36 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:01:13 verbose #816 > 00:00:36 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 10437 } 00:01:13 debug #817 runtime.execute_with_options_async / { exit_code = 0; output_length = 13630 } 00:01:13 debug #2 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path AsyncSeq.dib --retries 3 00:01:13 debug #818 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path Common.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:01:13 verbose #819 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "Common.dib", "--retries", "3"])) } 00:01:13 verbose #820 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:01:13 verbose #821 > "repl", 00:01:13 verbose #822 > "--exit-after-run", 00:01:13 verbose #823 > "--run", 00:01:13 verbose #824 > "c:/home/git/polyglot/lib/fsharp/Common.dib", 00:01:13 verbose #825 > "--output-path", 00:01:13 verbose #826 > "c:/home/git/polyglot/lib/fsharp/Common.dib.ipynb", 00:01:13 verbose #827 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/fsharp/Common.dib" --output-path "c:/home/git/polyglot/lib/fsharp/Common.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:01:16 verbose #828 > > 00:01:16 verbose #829 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:16 verbose #830 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:16 verbose #831 > > │ # Common (Polyglot) │ 00:01:16 verbose #832 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:40 verbose #833 > > 00:01:40 verbose #834 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:01:40 verbose #835 > > #if !INTERACTIVE 00:01:40 verbose #836 > > open Lib 00:01:40 verbose #837 > > #endif 00:01:40 verbose #838 > > 00:01:40 verbose #839 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:01:40 verbose #840 > > let nl = System.Environment.NewLine 00:01:40 verbose #841 > > let q = @"""" 00:01:40 verbose #842 > > 00:01:40 verbose #843 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:01:40 verbose #844 > > let inline cons head tail = head :: tail 00:01:40 verbose #845 > > 00:01:40 verbose #846 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:40 verbose #847 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:40 verbose #848 > > │ ## memoize │ 00:01:40 verbose #849 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:40 verbose #850 > > 00:01:40 verbose #851 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:01:40 verbose #852 > > let inline memoize fn = 00:01:40 verbose #853 > > let result = lazy fn () 00:01:40 verbose #854 > > fun () -> result.Value 00:01:40 verbose #855 > > 00:01:40 verbose #856 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:40 verbose #857 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:40 verbose #858 > > │ ## TraceLevel │ 00:01:40 verbose #859 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:40 verbose #860 > > 00:01:40 verbose #861 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:01:40 verbose #862 > > type TraceLevel = 00:01:40 verbose #863 > > | Verbose 00:01:40 verbose #864 > > | Debug 00:01:40 verbose #865 > > | Info 00:01:40 verbose #866 > > | Warning 00:01:40 verbose #867 > > | Critical 00:01:40 verbose #868 > > 00:01:40 verbose #869 > > let inline _locals () = "" 00:01:40 verbose #870 > > 00:01:40 verbose #871 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:40 verbose #872 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:40 verbose #873 > > │ ## trace │ 00:01:40 verbose #874 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:40 verbose #875 > > 00:01:40 verbose #876 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:01:40 verbose #877 > > let to_trace_level = function 00:01:40 verbose #878 > > | Verbose -> SpiralTrace.TraceLevel.US0_0 00:01:40 verbose #879 > > | Debug -> SpiralTrace.TraceLevel.US0_1 00:01:40 verbose #880 > > | Info -> SpiralTrace.TraceLevel.US0_2 00:01:40 verbose #881 > > | Warning -> SpiralTrace.TraceLevel.US0_3 00:01:40 verbose #882 > > | Critical -> SpiralTrace.TraceLevel.US0_4 00:01:40 verbose #883 > > 00:01:40 verbose #884 > > let trace level fn locals = 00:01:40 verbose #885 > > let level = level |> to_trace_level 00:01:40 verbose #886 > > SpiralTrace.trace level fn locals 00:01:40 verbose #887 > > 00:01:40 verbose #888 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:01:40 verbose #889 > > //// test 00:01:40 verbose #890 > > 00:01:40 verbose #891 > > trace Debug (fun () -> "test") _locals 00:01:40 verbose #892 > > 00:01:40 verbose #893 > > ╭─[ 39.36ms - stdout ]─────────────────────────────────────────────────────────╮ 00:01:40 verbose #894 > > │ 00:00:00 debug #1 test │ 00:01:40 verbose #895 > > │ │ 00:01:40 verbose #896 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:40 verbose #897 > 00:00:26 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 2930 } 00:01:40 verbose #898 > 00:00:26 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:01:40 verbose #899 > "nbconvert", 00:01:40 verbose #900 > "c:/home/git/polyglot/lib/fsharp/Common.dib.ipynb", 00:01:40 verbose #901 > "--to", 00:01:40 verbose #902 > "html", 00:01:40 verbose #903 > "--HTMLExporter.theme=dark", 00:01:40 verbose #904 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/fsharp/Common.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:01:43 verbose #905 > 00:00:29 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/fsharp/Common.dib.ipynb to html 00:01:43 verbose #906 > 00:00:29 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:01:43 verbose #907 > 00:00:29 verbose #7 ! validate(nb) 00:01:45 verbose #908 > 00:00:31 verbose #8 ! [NbConvertApp] Writing 280734 bytes to c:\home\git\polyglot\lib\fsharp\Common.dib.html 00:01:45 verbose #909 > 00:00:31 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 643 } 00:01:45 verbose #910 > 00:00:31 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 643 } 00:01:45 verbose #911 > 00:00:31 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:01:45 verbose #912 > "-c", 00:01:45 verbose #913 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/Common.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:01:45 verbose #914 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/Common.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:01:45 verbose #915 > 00:00:31 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:01:45 verbose #916 > 00:00:31 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:01:45 verbose #917 > 00:00:31 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 3632 } 00:01:45 debug #918 runtime.execute_with_options_async / { exit_code = 0; output_length = 6446 } 00:01:45 debug #3 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path Common.dib --retries 3 00:01:45 debug #919 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path CommonFSharp.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:01:45 verbose #920 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "CommonFSharp.dib", "--retries", "3"])) } 00:01:45 verbose #921 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:01:45 verbose #922 > "repl", 00:01:45 verbose #923 > "--exit-after-run", 00:01:45 verbose #924 > "--run", 00:01:45 verbose #925 > "c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib", 00:01:45 verbose #926 > "--output-path", 00:01:45 verbose #927 > "c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib.ipynb", 00:01:45 verbose #928 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib" --output-path "c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:01:48 verbose #929 > > 00:01:48 verbose #930 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:48 verbose #931 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:48 verbose #932 > > │ # CommonFSharp (Polyglot) │ 00:01:48 verbose #933 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:13 verbose #934 > > 00:02:13 verbose #935 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:02:13 verbose #936 > > open Common 00:02:13 verbose #937 > > 00:02:13 verbose #938 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:13 verbose #939 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:13 verbose #940 > > │ ## getUnionCaseName │ 00:02:13 verbose #941 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:13 verbose #942 > > 00:02:13 verbose #943 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:02:13 verbose #944 > > let inline getUnionCaseName<'T> (x: 'T) = 00:02:13 verbose #945 > > match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with 00:02:13 verbose #946 > > | case, _ -> case.Name 00:02:13 verbose #947 > > 00:02:13 verbose #948 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:02:13 verbose #949 > > //// test 00:02:13 verbose #950 > > 00:02:13 verbose #951 > > TraceLevel.Critical 00:02:13 verbose #952 > > |> getUnionCaseName 00:02:13 verbose #953 > > |> _assertEqual (nameof TraceLevel.Critical) 00:02:13 verbose #954 > > 00:02:13 verbose #955 > > ╭─[ 117.67ms - stdout ]────────────────────────────────────────────────────────╮ 00:02:13 verbose #956 > > │ "Critical" │ 00:02:13 verbose #957 > > │ │ 00:02:13 verbose #958 > > │ │ 00:02:13 verbose #959 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:13 verbose #960 > 00:00:27 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 1546 } 00:02:13 verbose #961 > 00:00:27 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:02:13 verbose #962 > "nbconvert", 00:02:13 verbose #963 > "c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib.ipynb", 00:02:13 verbose #964 > "--to", 00:02:13 verbose #965 > "html", 00:02:13 verbose #966 > "--HTMLExporter.theme=dark", 00:02:13 verbose #967 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:02:16 verbose #968 > 00:00:30 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib.ipynb to html 00:02:16 verbose #969 > 00:00:30 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:02:16 verbose #970 > 00:00:30 verbose #7 ! validate(nb) 00:02:17 verbose #971 > 00:00:32 verbose #8 ! [NbConvertApp] Writing 275592 bytes to c:\home\git\polyglot\lib\fsharp\CommonFSharp.dib.html 00:02:18 verbose #972 > 00:00:32 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 655 } 00:02:18 verbose #973 > 00:00:32 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 655 } 00:02:18 verbose #974 > 00:00:32 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:02:18 verbose #975 > "-c", 00:02:18 verbose #976 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:02:18 verbose #977 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:02:18 verbose #978 > 00:00:32 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:02:18 verbose #979 > 00:00:32 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:02:18 verbose #980 > 00:00:32 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 2260 } 00:02:18 debug #981 runtime.execute_with_options_async / { exit_code = 0; output_length = 5052 } 00:02:18 debug #4 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path CommonFSharp.dib --retries 3 00:02:18 debug #982 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path FileSystem.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:02:18 verbose #983 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "FileSystem.dib", "--retries", "3"])) } 00:02:18 verbose #984 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:02:18 verbose #985 > "repl", 00:02:18 verbose #986 > "--exit-after-run", 00:02:18 verbose #987 > "--run", 00:02:18 verbose #988 > "c:/home/git/polyglot/lib/fsharp/FileSystem.dib", 00:02:18 verbose #989 > "--output-path", 00:02:18 verbose #990 > "c:/home/git/polyglot/lib/fsharp/FileSystem.dib.ipynb", 00:02:18 verbose #991 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/fsharp/FileSystem.dib" --output-path "c:/home/git/polyglot/lib/fsharp/FileSystem.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:02:21 verbose #992 > > 00:02:21 verbose #993 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:21 verbose #994 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:21 verbose #995 > > │ # FileSystem (Polyglot) │ 00:02:21 verbose #996 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:26 verbose #997 > > 00:02:26 verbose #998 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:02:26 verbose #999 > > #r 00:02:26 verbose #1000 > > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan 00:02:26 verbose #1001 > > dard2.1/FSharp.Control.AsyncSeq.dll" 00:02:26 verbose #1002 > > #r 00:02:26 verbose #1003 > > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6. 00:02:26 verbose #1004 > > 0/System.Reactive.dll" 00:02:26 verbose #1005 > > #r 00:02:26 verbose #1006 > > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib 00:02:26 verbose #1007 > > netstandard2.0/System.Reactive.Linq.dll" 00:02:26 verbose #1008 > > #r 00:02:26 verbose #1009 > > @"../../../../../../../.nuget/packages/argu/6.2.4/lib/netstandard2.0/Argu.dll" 00:02:47 verbose #1010 > > 00:02:47 verbose #1011 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:02:47 verbose #1012 > > #if !INTERACTIVE 00:02:47 verbose #1013 > > open Lib 00:02:47 verbose #1014 > > #endif 00:02:47 verbose #1015 > > 00:02:47 verbose #1016 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:02:47 verbose #1017 > > open Common 00:02:47 verbose #1018 > > open SpiralFileSystem.Operators 00:02:47 verbose #1019 > > 00:02:47 verbose #1020 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:47 verbose #1021 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:47 verbose #1022 > > │ ## watchDirectory │ 00:02:47 verbose #1023 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:47 verbose #1024 > > 00:02:47 verbose #1025 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:02:47 verbose #1026 > > [[<RequireQualifiedAccess>]] 00:02:47 verbose #1027 > > type FileSystemChangeType = 00:02:47 verbose #1028 > > | Failure 00:02:47 verbose #1029 > > | Changed 00:02:47 verbose #1030 > > | Created 00:02:47 verbose #1031 > > | Deleted 00:02:47 verbose #1032 > > | Renamed 00:02:47 verbose #1033 > > 00:02:47 verbose #1034 > > [[<RequireQualifiedAccess>]] 00:02:47 verbose #1035 > > type FileSystemChange = 00:02:47 verbose #1036 > > | Failure of exn: exn 00:02:47 verbose #1037 > > | Changed of path: string * content: string option 00:02:47 verbose #1038 > > | Created of path: string * content: string option 00:02:47 verbose #1039 > > | Deleted of path: string 00:02:47 verbose #1040 > > | Renamed of oldPath: string * (string * string option) 00:02:47 verbose #1041 > > 00:02:47 verbose #1042 > > 00:02:47 verbose #1043 > > let inline watchDirectoryWithFilter filter shouldReadContent path = 00:02:47 verbose #1044 > > let fullPath = path |> System.IO.Path.GetFullPath 00:02:47 verbose #1045 > > let _locals () = $"filter: {filter} / {_locals ()}" 00:02:47 verbose #1046 > > 00:02:47 verbose #1047 > > let watcher = 00:02:47 verbose #1048 > > new System.IO.FileSystemWatcher ( 00:02:47 verbose #1049 > > Path = fullPath, 00:02:47 verbose #1050 > > NotifyFilter = filter, 00:02:47 verbose #1051 > > EnableRaisingEvents = true, 00:02:47 verbose #1052 > > IncludeSubdirectories = true 00:02:47 verbose #1053 > > ) 00:02:47 verbose #1054 > > 00:02:47 verbose #1055 > > let inline getEventPath (path : string) = 00:02:47 verbose #1056 > > path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |> 00:02:47 verbose #1057 > > SpiralSm.trim_start [[| '/'; '\\' |]] 00:02:47 verbose #1058 > > 00:02:47 verbose #1059 > > let inline ticks () = 00:02:47 verbose #1060 > > System.DateTime.UtcNow.Ticks 00:02:47 verbose #1061 > > 00:02:47 verbose #1062 > > let changedStream = 00:02:47 verbose #1063 > > AsyncSeq.subscribeEvent 00:02:47 verbose #1064 > > watcher.Changed 00:02:47 verbose #1065 > > (fun event -> 00:02:47 verbose #1066 > > ticks (), 00:02:47 verbose #1067 > > [[ FileSystemChange.Changed (getEventPath event.FullPath, None) 00:02:47 verbose #1068 > > ]] 00:02:47 verbose #1069 > > ) 00:02:47 verbose #1070 > > 00:02:47 verbose #1071 > > let deletedStream = 00:02:47 verbose #1072 > > AsyncSeq.subscribeEvent 00:02:47 verbose #1073 > > watcher.Deleted 00:02:47 verbose #1074 > > (fun event -> 00:02:47 verbose #1075 > > ticks (), 00:02:47 verbose #1076 > > [[ FileSystemChange.Deleted (getEventPath event.FullPath) ]] 00:02:47 verbose #1077 > > ) 00:02:47 verbose #1078 > > 00:02:47 verbose #1079 > > let createdStream = 00:02:47 verbose #1080 > > AsyncSeq.subscribeEvent 00:02:47 verbose #1081 > > watcher.Created 00:02:47 verbose #1082 > > (fun event -> 00:02:47 verbose #1083 > > let path = getEventPath event.FullPath 00:02:47 verbose #1084 > > ticks (), [[ 00:02:47 verbose #1085 > > FileSystemChange.Created (path, None) 00:02:47 verbose #1086 > > if SpiralPlatform.is_windows () then 00:02:47 verbose #1087 > > FileSystemChange.Changed (path, None) 00:02:47 verbose #1088 > > ]]) 00:02:47 verbose #1089 > > 00:02:47 verbose #1090 > > let renamedStream = 00:02:47 verbose #1091 > > AsyncSeq.subscribeEvent 00:02:47 verbose #1092 > > watcher.Renamed 00:02:47 verbose #1093 > > (fun event -> 00:02:47 verbose #1094 > > ticks (), [[ 00:02:47 verbose #1095 > > FileSystemChange.Renamed ( 00:02:47 verbose #1096 > > getEventPath event.OldFullPath, 00:02:47 verbose #1097 > > (getEventPath event.FullPath, None) 00:02:47 verbose #1098 > > ) 00:02:47 verbose #1099 > > ]] 00:02:47 verbose #1100 > > ) 00:02:47 verbose #1101 > > 00:02:47 verbose #1102 > > let failureStream = 00:02:47 verbose #1103 > > AsyncSeq.subscribeEvent 00:02:47 verbose #1104 > > watcher.Error 00:02:47 verbose #1105 > > (fun event -> ticks (), [[ FileSystemChange.Failure 00:02:47 verbose #1106 > > (event.GetException ()) ]]) 00:02:47 verbose #1107 > > 00:02:47 verbose #1108 > > let stream = 00:02:47 verbose #1109 > > [[ 00:02:47 verbose #1110 > > changedStream 00:02:47 verbose #1111 > > deletedStream 00:02:47 verbose #1112 > > createdStream 00:02:47 verbose #1113 > > renamedStream 00:02:47 verbose #1114 > > failureStream 00:02:47 verbose #1115 > > ]] 00:02:47 verbose #1116 > > |> FSharp.Control.AsyncSeq.mergeAll 00:02:47 verbose #1117 > > |> FSharp.Control.AsyncSeq.map (fun (t, events) -> 00:02:47 verbose #1118 > > events 00:02:47 verbose #1119 > > |> List.fold 00:02:47 verbose #1120 > > (fun (i, events) event -> 00:02:47 verbose #1121 > > i + 1L, 00:02:47 verbose #1122 > > (t + i, event) :: events) 00:02:47 verbose #1123 > > (0L, [[]]) 00:02:47 verbose #1124 > > |> snd 00:02:47 verbose #1125 > > |> List.rev 00:02:47 verbose #1126 > > ) 00:02:47 verbose #1127 > > |> FSharp.Control.AsyncSeq.concatSeq 00:02:47 verbose #1128 > > |> FSharp.Control.AsyncSeq.mapAsyncParallel (fun (t, event) -> async { 00:02:47 verbose #1129 > > match shouldReadContent event, event with 00:02:47 verbose #1130 > > | true, FileSystemChange.Changed (path, _) -> 00:02:47 verbose #1131 > > do! Async.Sleep 5 00:02:47 verbose #1132 > > let! content = fullPath </> path |> 00:02:47 verbose #1133 > > SpiralFileSystem.read_all_text_retry_async 00:02:47 verbose #1134 > > return t, FileSystemChange.Changed (path, content) 00:02:47 verbose #1135 > > | true, FileSystemChange.Created (path, _) -> 00:02:47 verbose #1136 > > do! Async.Sleep 5 00:02:47 verbose #1137 > > let! content = fullPath </> path |> 00:02:47 verbose #1138 > > SpiralFileSystem.read_all_text_retry_async 00:02:47 verbose #1139 > > return t, FileSystemChange.Created (path, content) 00:02:47 verbose #1140 > > | true, FileSystemChange.Renamed (oldPath, (newPath, _)) -> 00:02:47 verbose #1141 > > let! content = fullPath </> newPath |> 00:02:47 verbose #1142 > > SpiralFileSystem.read_all_text_retry_async 00:02:47 verbose #1143 > > return t, FileSystemChange.Renamed (oldPath, (newPath, content)) 00:02:47 verbose #1144 > > | _ -> return t, event 00:02:47 verbose #1145 > > }) 00:02:47 verbose #1146 > > 00:02:47 verbose #1147 > > let disposable = 00:02:47 verbose #1148 > > new_disposable (fun () -> 00:02:47 verbose #1149 > > trace Debug (fun () -> "FileSystem.watchWithFilter / Disposing watch 00:02:47 verbose #1150 > > stream") _locals 00:02:47 verbose #1151 > > watcher.EnableRaisingEvents <- false 00:02:47 verbose #1152 > > watcher.Dispose () 00:02:47 verbose #1153 > > ) 00:02:47 verbose #1154 > > 00:02:47 verbose #1155 > > stream, disposable 00:02:47 verbose #1156 > > 00:02:47 verbose #1157 > > let inline watchDirectory path = 00:02:47 verbose #1158 > > watchDirectoryWithFilter 00:02:47 verbose #1159 > > (System.IO.NotifyFilters.FileName 00:02:47 verbose #1160 > > // ||| System.IO.NotifyFilters.DirectoryName 00:02:47 verbose #1161 > > // ||| System.IO.NotifyFilters.Attributes 00:02:47 verbose #1162 > > //// ||| System.IO.NotifyFilters.Size 00:02:47 verbose #1163 > > ||| System.IO.NotifyFilters.LastWrite 00:02:47 verbose #1164 > > //// ||| System.IO.NotifyFilters.LastAccess 00:02:47 verbose #1165 > > // ||| System.IO.NotifyFilters.CreationTime 00:02:47 verbose #1166 > > // ||| System.IO.NotifyFilters.Security 00:02:47 verbose #1167 > > ) 00:02:47 verbose #1168 > > path 00:02:48 verbose #1169 > > 00:02:48 verbose #1170 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:48 verbose #1171 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:48 verbose #1172 > > │ ### testEventsRaw (test) │ 00:02:48 verbose #1173 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:48 verbose #1174 > > 00:02:48 verbose #1175 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:02:48 verbose #1176 > > //// test 00:02:48 verbose #1177 > > 00:02:48 verbose #1178 > > let inline testEventsRaw 00:02:48 verbose #1179 > > (watchFn : (_ -> bool) -> string -> FSharp.Control.AsyncSeq<int64 * 00:02:48 verbose #1180 > > FileSystemChange> * IDisposable) 00:02:48 verbose #1181 > > write 00:02:48 verbose #1182 > > = 00:02:48 verbose #1183 > > let struct (tempDir, tempDisposable) = 00:02:48 verbose #1184 > > "FileSystem.testEventsRaw" 00:02:48 verbose #1185 > > |> SpiralCrypto.hash_text 00:02:48 verbose #1186 > > |> SpiralFileSystem.create_temp_dir' 00:02:48 verbose #1187 > > let stream, disposable = watchFn (fun _ -> true) tempDir 00:02:48 verbose #1188 > > 00:02:48 verbose #1189 > > let events = System.Collections.Concurrent.ConcurrentBag () 00:02:48 verbose #1190 > > 00:02:48 verbose #1191 > > let inline iter () = 00:02:48 verbose #1192 > > stream 00:02:48 verbose #1193 > > |> FSharp.Control.AsyncSeq.iterAsyncParallel (fun event -> async { 00:02:48 verbose #1194 > > events.Add event }) 00:02:48 verbose #1195 > > 00:02:48 verbose #1196 > > let run = async { 00:02:48 verbose #1197 > > let! _ = iter () |> Async.StartChild 00:02:48 verbose #1198 > > do! Async.Sleep 250 00:02:48 verbose #1199 > > return! write tempDir 00:02:48 verbose #1200 > > } 00:02:48 verbose #1201 > > 00:02:48 verbose #1202 > > try 00:02:48 verbose #1203 > > run 00:02:48 verbose #1204 > > |> Async.runWithTimeout 60000 00:02:48 verbose #1205 > > |> _assertEqual (Some ()) 00:02:48 verbose #1206 > > finally 00:02:48 verbose #1207 > > disposable.Dispose () 00:02:48 verbose #1208 > > tempDisposable.Dispose () 00:02:48 verbose #1209 > > 00:02:48 verbose #1210 > > let eventsLog = 00:02:48 verbose #1211 > > events 00:02:48 verbose #1212 > > |> Seq.toList 00:02:48 verbose #1213 > > |> List.sortBy fst 00:02:48 verbose #1214 > > |> List.fold 00:02:48 verbose #1215 > > (fun (prev, acc) (ticks, event) -> 00:02:48 verbose #1216 > > ticks, (ticks, (if prev = 0L then 0L else ticks - prev), event) 00:02:48 verbose #1217 > > :: acc 00:02:48 verbose #1218 > > ) 00:02:48 verbose #1219 > > (0L, [[]]) 00:02:48 verbose #1220 > > |> snd 00:02:48 verbose #1221 > > |> List.rev 00:02:48 verbose #1222 > > |> List.map (fun (diff, n, event) -> $"{n} / {diff} / {event}" |> 00:02:48 verbose #1223 > > SpiralSm.ellipsis_end 100L) 00:02:48 verbose #1224 > > |> SpiralSm.concat "\n" 00:02:48 verbose #1225 > > let _locals () = $"eventsLog: \n{eventsLog} / {_locals ()}" 00:02:48 verbose #1226 > > trace Debug (fun () -> "FileSystem.testEventsRaw") _locals 00:02:48 verbose #1227 > > 00:02:48 verbose #1228 > > events 00:02:48 verbose #1229 > > |> Seq.toList 00:02:48 verbose #1230 > > |> List.sortBy fst 00:02:48 verbose #1231 > > |> List.map snd 00:02:48 verbose #1232 > > |> List.fold 00:02:48 verbose #1233 > > (fun acc event -> 00:02:48 verbose #1234 > > match acc, event with 00:02:48 verbose #1235 > > | FileSystemChange.Changed (lastPath, Some lastContent) as lastEvent 00:02:48 verbose #1236 > > :: acc, 00:02:48 verbose #1237 > > FileSystemChange.Changed (path, Some content) 00:02:48 verbose #1238 > > when lastPath = path && content |> SpiralSm.starts_with 00:02:48 verbose #1239 > > lastContent 00:02:48 verbose #1240 > > -> 00:02:48 verbose #1241 > > event :: acc 00:02:48 verbose #1242 > > | _ -> event :: acc 00:02:48 verbose #1243 > > ) 00:02:48 verbose #1244 > > [[]] 00:02:48 verbose #1245 > > |> List.rev 00:02:48 verbose #1246 > > 00:02:48 verbose #1247 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:48 verbose #1248 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:48 verbose #1249 > > │ #### fast (test) │ 00:02:48 verbose #1250 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:48 verbose #1251 > > 00:02:48 verbose #1252 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:02:48 verbose #1253 > > //// test 00:02:48 verbose #1254 > > 00:02:48 verbose #1255 > > let inline write path = async { 00:02:48 verbose #1256 > > let n = 2 00:02:48 verbose #1257 > > 00:02:48 verbose #1258 > > for i = 1 to n do 00:02:48 verbose #1259 > > do! $"a{i}" |> SpiralFileSystem.write_all_text_async (path </> 00:02:48 verbose #1260 > > $"file{i}.txt") 00:02:48 verbose #1261 > > 00:02:48 verbose #1262 > > do! Async.Sleep 250 00:02:48 verbose #1263 > > 00:02:48 verbose #1264 > > for i = 1 to n do 00:02:48 verbose #1265 > > do! $"b{i}" |> SpiralFileSystem.write_all_text_async (path </> 00:02:48 verbose #1266 > > $"file{i}.txt") 00:02:48 verbose #1267 > > 00:02:48 verbose #1268 > > do! Async.Sleep 250 00:02:48 verbose #1269 > > 00:02:48 verbose #1270 > > for i = 1 to n do 00:02:48 verbose #1271 > > do! path </> $"file{i}.txt" |> SpiralFileSystem.move_file_async (path 00:02:48 verbose #1272 > > </> $"file_{i}.txt") |> Async.Ignore 00:02:48 verbose #1273 > > 00:02:48 verbose #1274 > > do! Async.Sleep 250 00:02:48 verbose #1275 > > 00:02:48 verbose #1276 > > for i = 1 to n do 00:02:48 verbose #1277 > > do! $"c{i}" |> SpiralFileSystem.write_all_text_async (path </> 00:02:48 verbose #1278 > > $"file_{i}.txt") 00:02:48 verbose #1279 > > 00:02:48 verbose #1280 > > do! Async.Sleep 250 00:02:48 verbose #1281 > > 00:02:48 verbose #1282 > > for i = 1 to n do 00:02:48 verbose #1283 > > do! SpiralFileSystem.delete_file_async (path </> $"file_{i}.txt") |> 00:02:48 verbose #1284 > > Async.Ignore 00:02:48 verbose #1285 > > 00:02:48 verbose #1286 > > do! Async.Sleep 250 00:02:48 verbose #1287 > > } 00:02:48 verbose #1288 > > 00:02:48 verbose #1289 > > let inline run () = 00:02:48 verbose #1290 > > let events = testEventsRaw watchDirectory write 00:02:48 verbose #1291 > > 00:02:48 verbose #1292 > > events 00:02:48 verbose #1293 > > |> _sequenceEqual [[ 00:02:48 verbose #1294 > > FileSystemChange.Created ("file1.txt", Some "a1") 00:02:48 verbose #1295 > > FileSystemChange.Changed ("file1.txt", Some "a1") 00:02:48 verbose #1296 > > FileSystemChange.Created ("file2.txt", Some "a2") 00:02:48 verbose #1297 > > FileSystemChange.Changed ("file2.txt", Some "a2") 00:02:48 verbose #1298 > > 00:02:48 verbose #1299 > > FileSystemChange.Changed ("file1.txt", Some "b1") 00:02:48 verbose #1300 > > FileSystemChange.Changed ("file2.txt", Some "b2") 00:02:48 verbose #1301 > > 00:02:48 verbose #1302 > > FileSystemChange.Renamed ("file1.txt", ("file_1.txt", Some "b1")) 00:02:48 verbose #1303 > > FileSystemChange.Renamed ("file2.txt", ("file_2.txt", Some "b2")) 00:02:48 verbose #1304 > > 00:02:48 verbose #1305 > > FileSystemChange.Changed ("file_1.txt", Some "c1") 00:02:48 verbose #1306 > > FileSystemChange.Changed ("file_2.txt", Some "c2") 00:02:48 verbose #1307 > > 00:02:48 verbose #1308 > > FileSystemChange.Deleted "file_1.txt" 00:02:48 verbose #1309 > > FileSystemChange.Deleted "file_2.txt" 00:02:48 verbose #1310 > > ]] 00:02:48 verbose #1311 > > 00:02:48 verbose #1312 > > run 00:02:48 verbose #1313 > > |> retry_fn 3 00:02:48 verbose #1314 > > |> _assertEqual (Some ()) 00:02:53 verbose #1315 > > 00:02:53 verbose #1316 > > ╭─[ 4.64s - stdout ]───────────────────────────────────────────────────────────╮ 00:02:53 verbose #1317 > > │ Some () │ 00:02:53 verbose #1318 > > │ │ 00:02:53 verbose #1319 > > │ 00:00:08 debug #1 FileSystem.watchWithFilter / Disposing watch stream │ 00:02:53 verbose #1320 > > │ / filter: FileName, LastWrite │ 00:02:53 verbose #1321 > > │ 00:00:08 debug #2 FileSystem.testEventsRaw / eventsLog: │ 00:02:53 verbose #1322 > > │ 0 / 638631844964975613 / Created ("file1.txt", Some "a1") │ 00:02:53 verbose #1323 > > │ 1 / 638631844964975614 / Changed ("file1.txt", Some "a1") │ 00:02:53 verbose #1324 > > │ 16619 / 638631844964992233 / Changed ("file1.txt", Some "a1") │ 00:02:53 verbose #1325 > > │ 978 / 638631844964993211 / Created ("file2.txt", Some "a2") │ 00:02:53 verbose #1326 > > │ 1 / 638631844964993212 / Changed ("file2.txt", Some "a2") │ 00:02:53 verbose #1327 > > │ 30 / 638631844964993242 / Changed ("file2.txt", Some "a2") │ 00:02:53 verbose #1328 > > │ 2588665 / 638631844967581907 / Changed ("file1.txt", Some "b1") │ 00:02:53 verbose #1329 > > │ 2519 / 638631844967584426 / Changed ("file1.txt", Some "b1") │ 00:02:53 verbose #1330 > > │ 13373 / 638631844967597799 / Changed ("file2.txt", Some "b2") │ 00:02:53 verbose #1331 > > │ 2260 / 638631844967600059 / Changed ("file2.txt", Some "b2") │ 00:02:53 verbose #1332 > > │ 2668647 / 638631844970268706 / Renamed ("file1.txt", ("file_1.txt", Some │ 00:02:53 verbose #1333 > > │ "b1")) │ 00:02:53 verbose #1334 > > │ 10735 / 638631844970279441 / Renamed ("file2.txt", ("file_2.txt", Some │ 00:02:53 verbose #1335 > > │ "b2")) │ 00:02:53 verbose #1336 > > │ 2574517 / 638631844972853958 / Changed ("file_1.txt", Some "c1") │ 00:02:53 verbose #1337 > > │ 1375 / 638631844972855333 / Changed ("file_1.txt", Some "c1") │ 00:02:53 verbose #1338 > > │ 6741 / 638631844972862074 / Changed ("file_2.txt", Some "c2") │ 00:02:53 verbose #1339 > > │ 1440 / 638631844972863514 / Changed ("file_2.txt", Some "c2") │ 00:02:53 verbose #1340 > > │ 2660556 / 638631844975524070 / Deleted "file_1.txt" │ 00:02:53 verbose #1341 > > │ 1916 / 638631844975525986 / Deleted "file_2.txt" │ 00:02:53 verbose #1342 > > │ [Created ("file1.txt", Some "a1"); Changed ("file1.txt", Some "a1"); Created │ 00:02:53 verbose #1343 > > │ ("file2.txt", Some "a2"); │ 00:02:53 verbose #1344 > > │ Changed ("file2.txt", Some "a2"); Changed ("file1.txt", Some "b1"); Changed │ 00:02:53 verbose #1345 > > │ ("file2.txt", Some "b2"); │ 00:02:53 verbose #1346 > > │ Renamed ("file1.txt", ("file_1.txt", Some "b1")); Renamed ("file2.txt", │ 00:02:53 verbose #1347 > > │ ("file_2.txt", Some "b2")); │ 00:02:53 verbose #1348 > > │ Changed ("file_1.txt", Some "c1"); Changed ("file_2.txt", Some "c2"); │ 00:02:53 verbose #1349 > > │ Deleted "file_1.txt"; Deleted "file_2.txt"] │ 00:02:53 verbose #1350 > > │ │ 00:02:53 verbose #1351 > > │ Some () │ 00:02:53 verbose #1352 > > │ │ 00:02:53 verbose #1353 > > │ │ 00:02:53 verbose #1354 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:53 verbose #1355 > > 00:02:53 verbose #1356 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:53 verbose #1357 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:53 verbose #1358 > > │ #### slow (test) │ 00:02:53 verbose #1359 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:53 verbose #1360 > > 00:02:53 verbose #1361 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:02:53 verbose #1362 > > //// test 00:02:53 verbose #1363 > > 00:02:53 verbose #1364 > > let inline write path = async { 00:02:53 verbose #1365 > > let n = 2 00:02:53 verbose #1366 > > 00:02:53 verbose #1367 > > let contents = 00:02:53 verbose #1368 > > [[ 1 .. n ]] 00:02:53 verbose #1369 > > |> List.map (string >> String.replicate 1_000_000) 00:02:53 verbose #1370 > > 00:02:53 verbose #1371 > > for i = 1 to n do 00:02:53 verbose #1372 > > do! $"{contents.[[i - 1]]}a" |> SpiralFileSystem.write_all_text_async 00:02:53 verbose #1373 > > (path </> $"file{i}.txt") 00:02:53 verbose #1374 > > 00:02:53 verbose #1375 > > do! Async.Sleep 1500 00:02:53 verbose #1376 > > 00:02:53 verbose #1377 > > for i = 1 to n do 00:02:53 verbose #1378 > > do! $"{contents.[[i - 1]]}b" |> SpiralFileSystem.write_all_text_async 00:02:53 verbose #1379 > > (path </> $"file{i}.txt") 00:02:53 verbose #1380 > > 00:02:53 verbose #1381 > > do! Async.Sleep 1500 00:02:53 verbose #1382 > > 00:02:53 verbose #1383 > > for i = 1 to n do 00:02:53 verbose #1384 > > do! path </> $"file{i}.txt" |> SpiralFileSystem.move_file_async (path 00:02:53 verbose #1385 > > </> $"file_{i}.txt") |> Async.Ignore 00:02:53 verbose #1386 > > 00:02:53 verbose #1387 > > do! Async.Sleep 1500 00:02:53 verbose #1388 > > 00:02:53 verbose #1389 > > for i = 1 to n do 00:02:53 verbose #1390 > > do! $"{contents.[[i - 1]]}c" |> SpiralFileSystem.write_all_text_async 00:02:53 verbose #1391 > > (path </> $"file_{i}.txt") 00:02:53 verbose #1392 > > 00:02:53 verbose #1393 > > do! Async.Sleep 1500 00:02:53 verbose #1394 > > 00:02:53 verbose #1395 > > for i = 1 to n do 00:02:53 verbose #1396 > > do! SpiralFileSystem.delete_file_async (path </> $"file_{i}.txt") |> 00:02:53 verbose #1397 > > Async.Ignore 00:02:53 verbose #1398 > > 00:02:53 verbose #1399 > > do! Async.Sleep 1500 00:02:53 verbose #1400 > > } 00:02:53 verbose #1401 > > 00:02:53 verbose #1402 > > let inline run () = 00:02:53 verbose #1403 > > let events = 00:02:53 verbose #1404 > > testEventsRaw watchDirectory write 00:02:53 verbose #1405 > > |> List.map (function 00:02:53 verbose #1406 > > | FileSystemChange.Changed (path, Some content) -> 00:02:53 verbose #1407 > > FileSystemChange.Changed (path, content |> Seq.distinct |> 00:02:53 verbose #1408 > > Seq.map string |> SpiralSm.concat "" |> Some) 00:02:53 verbose #1409 > > | FileSystemChange.Created (path, Some content) -> 00:02:53 verbose #1410 > > FileSystemChange.Created (path, content |> Seq.distinct |> 00:02:53 verbose #1411 > > Seq.map string |> SpiralSm.concat "" |> Some) 00:02:53 verbose #1412 > > | FileSystemChange.Renamed (oldPath, (newPath, Some content)) -> 00:02:53 verbose #1413 > > FileSystemChange.Renamed ( 00:02:53 verbose #1414 > > oldPath, 00:02:53 verbose #1415 > > (newPath, content |> Seq.distinct |> Seq.map string |> 00:02:53 verbose #1416 > > SpiralSm.concat "" |> Some) 00:02:53 verbose #1417 > > ) 00:02:53 verbose #1418 > > | event -> event 00:02:53 verbose #1419 > > ) 00:02:53 verbose #1420 > > 00:02:53 verbose #1421 > > events 00:02:53 verbose #1422 > > |> _sequenceEqual [[ 00:02:53 verbose #1423 > > FileSystemChange.Created ("file1.txt", Some "1a") 00:02:53 verbose #1424 > > FileSystemChange.Changed ("file1.txt", Some "1a") 00:02:53 verbose #1425 > > FileSystemChange.Created ("file2.txt", Some "2a") 00:02:53 verbose #1426 > > FileSystemChange.Changed ("file2.txt", Some "2a") 00:02:53 verbose #1427 > > 00:02:53 verbose #1428 > > FileSystemChange.Changed ("file1.txt", Some "1b") 00:02:53 verbose #1429 > > FileSystemChange.Changed ("file2.txt", Some "2b") 00:02:53 verbose #1430 > > 00:02:53 verbose #1431 > > FileSystemChange.Renamed ("file1.txt", ("file_1.txt", Some "1b")) 00:02:53 verbose #1432 > > FileSystemChange.Renamed ("file2.txt", ("file_2.txt", Some "2b")) 00:02:53 verbose #1433 > > 00:02:53 verbose #1434 > > FileSystemChange.Changed ("file_1.txt", Some "1c") 00:02:53 verbose #1435 > > FileSystemChange.Changed ("file_2.txt", Some "2c") 00:02:53 verbose #1436 > > 00:02:53 verbose #1437 > > FileSystemChange.Deleted "file_1.txt" 00:02:53 verbose #1438 > > FileSystemChange.Deleted "file_2.txt" 00:02:53 verbose #1439 > > ]] 00:02:53 verbose #1440 > > 00:02:53 verbose #1441 > > run 00:02:53 verbose #1442 > > |> retry_fn 5 00:02:53 verbose #1443 > > |> _assertEqual (Some ()) 00:03:04 verbose #1444 > > 00:03:04 verbose #1445 > > ╭─[ 11.46s - stdout ]──────────────────────────────────────────────────────────╮ 00:03:04 verbose #1446 > > │ Some () │ 00:03:04 verbose #1447 > > │ │ 00:03:04 verbose #1448 > > │ 00:00:19 debug #3 FileSystem.watchWithFilter / Disposing watch stream │ 00:03:04 verbose #1449 > > │ / filter: FileName, LastWrite │ 00:03:04 verbose #1450 > > │ 00:00:19 debug #4 FileSystem.testEventsRaw / eventsLog: │ 00:03:04 verbose #1451 > > │ 0 / 638631845013904327 / Created │ 00:03:04 verbose #1452 > > │ ("file1.txt", │ 00:03:04 verbose #1453 > > │ ...11111111111111111111111111111111111111111111111a") │ 00:03:04 verbose #1454 > > │ 1 / 638631845013904328 / Changed │ 00:03:04 verbose #1455 > > │ ("file1.txt", │ 00:03:04 verbose #1456 > > │ ...11111111111111111111111111111111111111111111111a") │ 00:03:04 verbose #1457 > > │ 150336 / 638631845014054664 / Changed │ 00:03:04 verbose #1458 > > │ ("file1.tx...11111111111111111111111111111111111111111111111a") │ 00:03:04 verbose #1459 > > │ 28649 / 638631845014083313 / Created │ 00:03:04 verbose #1460 > > │ ("file2.txt...22222222222222222222222222222222222222222222222a") │ 00:03:04 verbose #1461 > > │ 1 / 638631845014083314 / Changed │ 00:03:04 verbose #1462 > > │ ("file2.txt", │ 00:03:04 verbose #1463 > > │ ...22222222222222222222222222222222222222222222222a") │ 00:03:04 verbose #1464 > > │ 112971 / 638631845014196285 / Changed │ 00:03:04 verbose #1465 > > │ ("file2.tx...22222222222222222222222222222222222222222222222a") │ 00:03:04 verbose #1466 > > │ 15087301 / 638631845029283586 / Changed │ 00:03:04 verbose #1467 > > │ ("file1....11111111111111111111111111111111111111111111111b") │ 00:03:04 verbose #1468 > > │ 140290 / 638631845029423876 / Changed │ 00:03:04 verbose #1469 > > │ ("file1.tx...11111111111111111111111111111111111111111111111b") │ 00:03:04 verbose #1470 > > │ 44834 / 638631845029468710 / Changed │ 00:03:04 verbose #1471 > > │ ("file2.txt...22222222222222222222222222222222222222222222222b") │ 00:03:04 verbose #1472 > > │ 136811 / 638631845029605521 / Changed │ 00:03:04 verbose #1473 > > │ ("file2.tx...22222222222222222222222222222222222222222222222b") │ 00:03:04 verbose #1474 > > │ 15156615 / 638631845044762136 / Renamed │ 00:03:04 verbose #1475 > > │ ("file1....1111111111111111111111111111111111111111111111b")) │ 00:03:04 verbose #1476 > > │ 898 / 638631845044763034 / Renamed │ 00:03:04 verbose #1477 > > │ ("file2.txt",...2222222222222222222222222222222222222222222222b")) │ 00:03:04 verbose #1478 > > │ 15207332 / 638631845059970366 / Changed │ 00:03:04 verbose #1479 > > │ ("file_1...11111111111111111111111111111111111111111111111c") │ 00:03:04 verbose #1480 > > │ 103940 / 638631845060074306 / Changed │ 00:03:04 verbose #1481 > > │ ("file_1.t...11111111111111111111111111111111111111111111111c") │ 00:03:04 verbose #1482 > > │ 35867 / 638631845060110173 / Changed │ 00:03:04 verbose #1483 > > │ ("file_2.tx...22222222222222222222222222222222222222222222222c") │ 00:03:04 verbose #1484 > > │ 105913 / 638631845060216086 / Changed │ 00:03:04 verbose #1485 > > │ ("file_2.t...22222222222222222222222222222222222222222222222c") │ 00:03:04 verbose #1486 > > │ 15067166 / 638631845075283252 / Deleted "file_1.txt" │ 00:03:04 verbose #1487 > > │ 4445 / 638631845075287697 / Deleted "file_2.txt" │ 00:03:04 verbose #1488 > > │ [Created ("file1.txt", Some "1a"); Changed ("file1.txt", Some "1a"); Created │ 00:03:04 verbose #1489 > > │ ("file2.txt", Some "2a"); │ 00:03:04 verbose #1490 > > │ Changed ("file2.txt", Some "2a"); Changed ("file1.txt", Some "1b"); Changed │ 00:03:04 verbose #1491 > > │ ("file2.txt", Some "2b"); │ 00:03:04 verbose #1492 > > │ Renamed ("file1.txt", ("file_1.txt", Some "1b")); Renamed ("file2.txt", │ 00:03:04 verbose #1493 > > │ ("file_2.txt", Some "2b")); │ 00:03:04 verbose #1494 > > │ Changed ("file_1.txt", Some "1c"); Changed ("file_2.txt", Some "2c"); │ 00:03:04 verbose #1495 > > │ Deleted "file_1.txt"; Deleted "file_2.txt"] │ 00:03:04 verbose #1496 > > │ │ 00:03:04 verbose #1497 > > │ Some () │ 00:03:04 verbose #1498 > > │ │ 00:03:04 verbose #1499 > > │ │ 00:03:04 verbose #1500 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:04 verbose #1501 > > 00:03:04 verbose #1502 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:04 verbose #1503 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:04 verbose #1504 > > │ ### testEventsSorted (test) │ 00:03:04 verbose #1505 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:04 verbose #1506 > > 00:03:04 verbose #1507 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:03:04 verbose #1508 > > //// test 00:03:04 verbose #1509 > > 00:03:04 verbose #1510 > > let inline sortEvent event = 00:03:04 verbose #1511 > > match event with 00:03:04 verbose #1512 > > | FileSystemChange.Failure _ -> 0 00:03:04 verbose #1513 > > | FileSystemChange.Created _ -> 1 00:03:04 verbose #1514 > > | FileSystemChange.Changed _ -> 2 00:03:04 verbose #1515 > > | FileSystemChange.Renamed (_oldPath, _) -> 3 00:03:04 verbose #1516 > > | FileSystemChange.Deleted _ -> 4 00:03:04 verbose #1517 > > 00:03:04 verbose #1518 > > let inline formatEvents events = 00:03:04 verbose #1519 > > events 00:03:04 verbose #1520 > > |> Seq.toList 00:03:04 verbose #1521 > > |> List.sortBy (snd >> sortEvent) 00:03:04 verbose #1522 > > |> List.choose (fun (ticks, event) -> 00:03:04 verbose #1523 > > match event with 00:03:04 verbose #1524 > > | FileSystemChange.Failure _ -> 00:03:04 verbose #1525 > > None 00:03:04 verbose #1526 > > | FileSystemChange.Changed (path, _) -> 00:03:04 verbose #1527 > > Some (ticks, System.IO.Path.GetFileName path, nameof 00:03:04 verbose #1528 > > FileSystemChangeType.Changed) 00:03:04 verbose #1529 > > | FileSystemChange.Created (path, _) -> 00:03:04 verbose #1530 > > Some (ticks, System.IO.Path.GetFileName path, nameof 00:03:04 verbose #1531 > > FileSystemChangeType.Created) 00:03:04 verbose #1532 > > | FileSystemChange.Deleted path -> 00:03:04 verbose #1533 > > Some (ticks, System.IO.Path.GetFileName path, nameof 00:03:04 verbose #1534 > > FileSystemChangeType.Deleted) 00:03:04 verbose #1535 > > | FileSystemChange.Renamed (_oldPath, (path, _)) -> 00:03:04 verbose #1536 > > Some (ticks, System.IO.Path.GetFileName path, nameof 00:03:04 verbose #1537 > > FileSystemChangeType.Renamed) 00:03:04 verbose #1538 > > ) 00:03:04 verbose #1539 > > |> List.sortBy (fun (_, path, _) -> path) 00:03:04 verbose #1540 > > |> List.distinctBy (fun (_, path, event) -> path, event) 00:03:04 verbose #1541 > > 00:03:04 verbose #1542 > > let inline testEventsSorted 00:03:04 verbose #1543 > > (watchFn : string -> FSharp.Control.AsyncSeq<int64 * FileSystemChange> * 00:03:04 verbose #1544 > > IDisposable) 00:03:04 verbose #1545 > > write 00:03:04 verbose #1546 > > = 00:03:04 verbose #1547 > > let struct (tempDir, tempDisposable) = 00:03:04 verbose #1548 > > "FileSystem.testEventsSorted" 00:03:04 verbose #1549 > > |> SpiralCrypto.hash_text 00:03:04 verbose #1550 > > |> SpiralFileSystem.create_temp_dir' 00:03:04 verbose #1551 > > let stream, disposable = watchFn tempDir 00:03:04 verbose #1552 > > 00:03:04 verbose #1553 > > let events = System.Collections.Concurrent.ConcurrentBag () 00:03:04 verbose #1554 > > 00:03:04 verbose #1555 > > let inline iter () = 00:03:04 verbose #1556 > > stream 00:03:04 verbose #1557 > > |> FSharp.Control.AsyncSeq.iterAsyncParallel (fun event -> async { 00:03:04 verbose #1558 > > events.Add event }) 00:03:04 verbose #1559 > > 00:03:04 verbose #1560 > > let run = async { 00:03:04 verbose #1561 > > let! _ = iter () |> Async.StartChild 00:03:04 verbose #1562 > > do! Async.Sleep 250 00:03:04 verbose #1563 > > return! write tempDir 00:03:04 verbose #1564 > > } 00:03:04 verbose #1565 > > 00:03:04 verbose #1566 > > try 00:03:04 verbose #1567 > > run 00:03:04 verbose #1568 > > |> Async.runWithTimeout 5000 00:03:04 verbose #1569 > > |> _assertEqual (Some ()) 00:03:04 verbose #1570 > > finally 00:03:04 verbose #1571 > > disposable.Dispose () 00:03:04 verbose #1572 > > tempDisposable.Dispose () 00:03:04 verbose #1573 > > 00:03:04 verbose #1574 > > let events = formatEvents events 00:03:04 verbose #1575 > > 00:03:04 verbose #1576 > > let eventMap = 00:03:04 verbose #1577 > > events 00:03:04 verbose #1578 > > |> List.map (fun (ticks, path, event) -> path, (event, ticks)) 00:03:04 verbose #1579 > > |> List.groupBy fst 00:03:04 verbose #1580 > > |> List.map (fun (path, events) -> 00:03:04 verbose #1581 > > let event, _ticks = 00:03:04 verbose #1582 > > events 00:03:04 verbose #1583 > > |> List.map snd 00:03:04 verbose #1584 > > |> List.sortByDescending snd 00:03:04 verbose #1585 > > |> List.head 00:03:04 verbose #1586 > > 00:03:04 verbose #1587 > > path, event 00:03:04 verbose #1588 > > ) 00:03:04 verbose #1589 > > |> Map.ofList 00:03:04 verbose #1590 > > 00:03:04 verbose #1591 > > let eventList = 00:03:04 verbose #1592 > > events 00:03:04 verbose #1593 > > |> List.map (fun (_ticks, path, event) -> path, event) 00:03:04 verbose #1594 > > 00:03:04 verbose #1595 > > eventMap, eventList 00:03:05 verbose #1596 > > 00:03:05 verbose #1597 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:05 verbose #1598 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:05 verbose #1599 > > │ #### create and delete (test) │ 00:03:05 verbose #1600 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:05 verbose #1601 > > 00:03:05 verbose #1602 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:03:05 verbose #1603 > > //// test 00:03:05 verbose #1604 > > 00:03:05 verbose #1605 > > let inline write path = async { 00:03:05 verbose #1606 > > let n = 3 00:03:05 verbose #1607 > > 00:03:05 verbose #1608 > > for i = 1 to n do 00:03:05 verbose #1609 > > do! $"{i}" |> SpiralFileSystem.write_all_text_async (path </> 00:03:05 verbose #1610 > > $"file{i}.txt") 00:03:05 verbose #1611 > > 00:03:05 verbose #1612 > > for i = 1 to n do 00:03:05 verbose #1613 > > do! SpiralFileSystem.delete_file_async (path </> $"file{i}.txt") |> 00:03:05 verbose #1614 > > Async.Ignore 00:03:05 verbose #1615 > > 00:03:05 verbose #1616 > > do! Async.Sleep 150 00:03:05 verbose #1617 > > } 00:03:05 verbose #1618 > > 00:03:05 verbose #1619 > > let inline run () = 00:03:05 verbose #1620 > > let eventMap, eventList = testEventsSorted (watchDirectory (fun _ -> false)) 00:03:05 verbose #1621 > > write 00:03:05 verbose #1622 > > 00:03:05 verbose #1623 > > [[ 00:03:05 verbose #1624 > > "file1.txt", nameof FileSystemChangeType.Created 00:03:05 verbose #1625 > > "file1.txt", nameof FileSystemChangeType.Changed 00:03:05 verbose #1626 > > "file1.txt", nameof FileSystemChangeType.Deleted 00:03:05 verbose #1627 > > 00:03:05 verbose #1628 > > "file2.txt", nameof FileSystemChangeType.Created 00:03:05 verbose #1629 > > "file2.txt", nameof FileSystemChangeType.Changed 00:03:05 verbose #1630 > > "file2.txt", nameof FileSystemChangeType.Deleted 00:03:05 verbose #1631 > > 00:03:05 verbose #1632 > > "file3.txt", nameof FileSystemChangeType.Created 00:03:05 verbose #1633 > > "file3.txt", nameof FileSystemChangeType.Changed 00:03:05 verbose #1634 > > "file3.txt", nameof FileSystemChangeType.Deleted 00:03:05 verbose #1635 > > ]] 00:03:05 verbose #1636 > > |> _sequenceEqual eventList 00:03:05 verbose #1637 > > 00:03:05 verbose #1638 > > [[ 00:03:05 verbose #1639 > > "file1.txt", nameof FileSystemChangeType.Deleted 00:03:05 verbose #1640 > > "file2.txt", nameof FileSystemChangeType.Deleted 00:03:05 verbose #1641 > > "file3.txt", nameof FileSystemChangeType.Deleted 00:03:05 verbose #1642 > > ]] 00:03:05 verbose #1643 > > |> Map.ofList 00:03:05 verbose #1644 > > |> _sequenceEqual eventMap 00:03:05 verbose #1645 > > 00:03:05 verbose #1646 > > run 00:03:05 verbose #1647 > > |> retry_fn 3 00:03:05 verbose #1648 > > |> _assertEqual (Some ()) 00:03:07 verbose #1649 > > 00:03:07 verbose #1650 > > ╭─[ 2.40s - stdout ]───────────────────────────────────────────────────────────╮ 00:03:07 verbose #1651 > > │ Some () │ 00:03:07 verbose #1652 > > │ │ 00:03:07 verbose #1653 > > │ 00:00:22 debug #5 FileSystem.watchWithFilter / Disposing watch stream │ 00:03:07 verbose #1654 > > │ / filter: FileName, LastWrite │ 00:03:07 verbose #1655 > > │ [("file1.txt", "Created"); ("file1.txt", "Changed"); ("file1.txt", │ 00:03:07 verbose #1656 > > │ "Deleted"); ("file2.txt", "Created"); │ 00:03:07 verbose #1657 > > │ ("file2.txt", "Changed"); ("file2.txt", "Deleted"); ("file3.txt", │ 00:03:07 verbose #1658 > > │ "Created"); ("file3.txt", "Changed"); │ 00:03:07 verbose #1659 > > │ ("file3.txt", "Deleted")] │ 00:03:07 verbose #1660 > > │ │ 00:03:07 verbose #1661 > > │ map [("file1.txt", "Deleted"); ("file2.txt", "Deleted"); ("file3.txt", │ 00:03:07 verbose #1662 > > │ "Deleted")] │ 00:03:07 verbose #1663 > > │ │ 00:03:07 verbose #1664 > > │ Some () │ 00:03:07 verbose #1665 > > │ │ 00:03:07 verbose #1666 > > │ │ 00:03:07 verbose #1667 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:07 verbose #1668 > > 00:03:07 verbose #1669 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:07 verbose #1670 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:07 verbose #1671 > > │ #### change (test) │ 00:03:07 verbose #1672 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:07 verbose #1673 > > 00:03:07 verbose #1674 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:03:07 verbose #1675 > > //// test 00:03:07 verbose #1676 > > 00:03:07 verbose #1677 > > let inline write path = async { 00:03:07 verbose #1678 > > let n = 2 00:03:07 verbose #1679 > > 00:03:07 verbose #1680 > > for i = 1 to n do 00:03:07 verbose #1681 > > do! $"{i}" |> SpiralFileSystem.write_all_text_async (path </> 00:03:07 verbose #1682 > > $"file{i}.txt") 00:03:07 verbose #1683 > > 00:03:07 verbose #1684 > > for i = 1 to n do 00:03:07 verbose #1685 > > do! "" |> SpiralFileSystem.write_all_text_async (path </> 00:03:07 verbose #1686 > > $"file{i}.txt") 00:03:07 verbose #1687 > > 00:03:07 verbose #1688 > > for i = 1 to n do 00:03:07 verbose #1689 > > do! SpiralFileSystem.delete_file_async (path </> $"file{i}.txt") |> 00:03:07 verbose #1690 > > Async.Ignore 00:03:07 verbose #1691 > > 00:03:07 verbose #1692 > > do! Async.Sleep 150 00:03:07 verbose #1693 > > } 00:03:07 verbose #1694 > > 00:03:07 verbose #1695 > > let inline run () = 00:03:07 verbose #1696 > > let eventMap, eventList = testEventsSorted (watchDirectory (fun _ -> false)) 00:03:07 verbose #1697 > > write 00:03:07 verbose #1698 > > 00:03:07 verbose #1699 > > [[ 00:03:07 verbose #1700 > > "file1.txt", nameof FileSystemChangeType.Created 00:03:07 verbose #1701 > > "file1.txt", nameof FileSystemChangeType.Changed 00:03:07 verbose #1702 > > "file1.txt", nameof FileSystemChangeType.Deleted 00:03:07 verbose #1703 > > 00:03:07 verbose #1704 > > "file2.txt", nameof FileSystemChangeType.Created 00:03:07 verbose #1705 > > "file2.txt", nameof FileSystemChangeType.Changed 00:03:07 verbose #1706 > > "file2.txt", nameof FileSystemChangeType.Deleted 00:03:07 verbose #1707 > > ]] 00:03:07 verbose #1708 > > |> _sequenceEqual eventList 00:03:07 verbose #1709 > > 00:03:07 verbose #1710 > > [[ 00:03:07 verbose #1711 > > "file1.txt", nameof FileSystemChangeType.Deleted 00:03:07 verbose #1712 > > "file2.txt", nameof FileSystemChangeType.Deleted 00:03:07 verbose #1713 > > ]] 00:03:07 verbose #1714 > > |> Map.ofList 00:03:07 verbose #1715 > > |> _sequenceEqual eventMap 00:03:07 verbose #1716 > > 00:03:07 verbose #1717 > > run 00:03:07 verbose #1718 > > |> retry_fn 3 00:03:07 verbose #1719 > > |> _assertEqual (Some ()) 00:03:10 verbose #1720 > > 00:03:10 verbose #1721 > > ╭─[ 2.73s - stdout ]───────────────────────────────────────────────────────────╮ 00:03:10 verbose #1722 > > │ Some () │ 00:03:10 verbose #1723 > > │ │ 00:03:10 verbose #1724 > > │ 00:00:25 debug #6 FileSystem.watchWithFilter / Disposing watch stream │ 00:03:10 verbose #1725 > > │ / filter: FileName, LastWrite │ 00:03:10 verbose #1726 > > │ [("file1.txt", "Created"); ("file1.txt", "Changed"); ("file1.txt", │ 00:03:10 verbose #1727 > > │ "Deleted"); ("file2.txt", "Created"); │ 00:03:10 verbose #1728 > > │ ("file2.txt", "Changed"); ("file2.txt", "Deleted")] │ 00:03:10 verbose #1729 > > │ │ 00:03:10 verbose #1730 > > │ map [("file1.txt", "Deleted"); ("file2.txt", "Deleted")] │ 00:03:10 verbose #1731 > > │ │ 00:03:10 verbose #1732 > > │ Some () │ 00:03:10 verbose #1733 > > │ │ 00:03:10 verbose #1734 > > │ │ 00:03:10 verbose #1735 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:10 verbose #1736 > > 00:03:10 verbose #1737 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:10 verbose #1738 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:10 verbose #1739 > > │ #### rename (test) │ 00:03:10 verbose #1740 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:10 verbose #1741 > > 00:03:10 verbose #1742 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:03:10 verbose #1743 > > //// test 00:03:10 verbose #1744 > > 00:03:10 verbose #1745 > > let inline write path = async { 00:03:10 verbose #1746 > > let n = 2 00:03:10 verbose #1747 > > 00:03:10 verbose #1748 > > for i = 1 to n do 00:03:10 verbose #1749 > > do! $"{i}" |> SpiralFileSystem.write_all_text_async (path </> 00:03:10 verbose #1750 > > $"file{i}.txt") 00:03:10 verbose #1751 > > 00:03:10 verbose #1752 > > for i = 1 to n do 00:03:10 verbose #1753 > > do! path </> $"file{i}.txt" |> SpiralFileSystem.move_file_async (path 00:03:10 verbose #1754 > > </> $"file_{i}.txt") |> Async.Ignore 00:03:10 verbose #1755 > > 00:03:10 verbose #1756 > > for i = 1 to n do 00:03:10 verbose #1757 > > do! SpiralFileSystem.delete_file_async (path </> $"file_{i}.txt") |> 00:03:10 verbose #1758 > > Async.Ignore 00:03:10 verbose #1759 > > 00:03:10 verbose #1760 > > do! Async.Sleep 150 00:03:10 verbose #1761 > > } 00:03:10 verbose #1762 > > 00:03:10 verbose #1763 > > let inline run () = 00:03:10 verbose #1764 > > let eventMap, eventList = testEventsSorted (watchDirectory (fun _ -> false)) 00:03:10 verbose #1765 > > write 00:03:10 verbose #1766 > > 00:03:10 verbose #1767 > > [[ 00:03:10 verbose #1768 > > "file1.txt", nameof FileSystemChangeType.Created 00:03:10 verbose #1769 > > "file1.txt", nameof FileSystemChangeType.Changed 00:03:10 verbose #1770 > > "file2.txt", nameof FileSystemChangeType.Created 00:03:10 verbose #1771 > > "file2.txt", nameof FileSystemChangeType.Changed 00:03:10 verbose #1772 > > 00:03:10 verbose #1773 > > "file_1.txt", nameof FileSystemChangeType.Renamed 00:03:10 verbose #1774 > > "file_1.txt", nameof FileSystemChangeType.Deleted 00:03:10 verbose #1775 > > 00:03:10 verbose #1776 > > "file_2.txt", nameof FileSystemChangeType.Renamed 00:03:10 verbose #1777 > > "file_2.txt", nameof FileSystemChangeType.Deleted 00:03:10 verbose #1778 > > ]] 00:03:10 verbose #1779 > > |> _sequenceEqual eventList 00:03:10 verbose #1780 > > 00:03:10 verbose #1781 > > [[ 00:03:10 verbose #1782 > > "file1.txt", nameof FileSystemChangeType.Changed 00:03:10 verbose #1783 > > "file2.txt", nameof FileSystemChangeType.Changed 00:03:10 verbose #1784 > > "file_1.txt", nameof FileSystemChangeType.Deleted 00:03:10 verbose #1785 > > "file_2.txt", nameof FileSystemChangeType.Deleted 00:03:10 verbose #1786 > > ]] 00:03:10 verbose #1787 > > |> Map.ofList 00:03:10 verbose #1788 > > |> _sequenceEqual eventMap 00:03:10 verbose #1789 > > 00:03:10 verbose #1790 > > run 00:03:10 verbose #1791 > > |> retry_fn 3 00:03:10 verbose #1792 > > |> _assertEqual (Some ()) 00:03:13 verbose #1793 > > 00:03:13 verbose #1794 > > ╭─[ 3.07s - stdout ]───────────────────────────────────────────────────────────╮ 00:03:13 verbose #1795 > > │ Some () │ 00:03:13 verbose #1796 > > │ │ 00:03:13 verbose #1797 > > │ 00:00:28 debug #7 FileSystem.watchWithFilter / Disposing watch stream │ 00:03:13 verbose #1798 > > │ / filter: FileName, LastWrite │ 00:03:13 verbose #1799 > > │ [("file1.txt", "Created"); ("file1.txt", "Changed"); ("file2.txt", │ 00:03:13 verbose #1800 > > │ "Created"); ("file2.txt", "Changed"); │ 00:03:13 verbose #1801 > > │ ("file_1.txt", "Renamed"); ("file_1.txt", "Deleted"); ("file_2.txt", │ 00:03:13 verbose #1802 > > │ "Renamed"); ("file_2.txt", "Deleted")] │ 00:03:13 verbose #1803 > > │ │ 00:03:13 verbose #1804 > > │ map [("file1.txt", "Changed"); ("file2.txt", "Changed"); ("file_1.txt", │ 00:03:13 verbose #1805 > > │ "Deleted"); ("file_2.txt", "Deleted")] │ 00:03:13 verbose #1806 > > │ │ 00:03:13 verbose #1807 > > │ Some () │ 00:03:13 verbose #1808 > > │ │ 00:03:13 verbose #1809 > > │ │ 00:03:13 verbose #1810 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:13 verbose #1811 > > 00:03:13 verbose #1812 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:13 verbose #1813 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:13 verbose #1814 > > │ #### full (test) │ 00:03:13 verbose #1815 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:13 verbose #1816 > > 00:03:13 verbose #1817 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:03:13 verbose #1818 > > //// test 00:03:13 verbose #1819 > > 00:03:13 verbose #1820 > > let inline write path = async { 00:03:13 verbose #1821 > > let n = 2 00:03:13 verbose #1822 > > 00:03:13 verbose #1823 > > for i = 1 to n do 00:03:13 verbose #1824 > > do! $"{i}" |> SpiralFileSystem.write_all_text_async (path </> 00:03:13 verbose #1825 > > $"file{i}.txt") 00:03:13 verbose #1826 > > 00:03:13 verbose #1827 > > for i = 1 to n do 00:03:13 verbose #1828 > > do! "" |> SpiralFileSystem.write_all_text_async (path </> 00:03:13 verbose #1829 > > $"file{i}.txt") 00:03:13 verbose #1830 > > 00:03:13 verbose #1831 > > for i = 1 to n do 00:03:13 verbose #1832 > > do! path </> $"file{i}.txt" |> SpiralFileSystem.move_file_async (path 00:03:13 verbose #1833 > > </> $"file_{i}.txt") |> Async.Ignore 00:03:13 verbose #1834 > > 00:03:13 verbose #1835 > > for i = 1 to n do 00:03:13 verbose #1836 > > do! $"{i}" |> SpiralFileSystem.write_all_text_async (path </> 00:03:13 verbose #1837 > > $"file_{i}.txt") 00:03:13 verbose #1838 > > 00:03:13 verbose #1839 > > for i = 1 to n do 00:03:13 verbose #1840 > > do! SpiralFileSystem.delete_file_async (path </> $"file_{i}.txt") |> 00:03:13 verbose #1841 > > Async.Ignore 00:03:13 verbose #1842 > > 00:03:13 verbose #1843 > > do! Async.Sleep 150 00:03:13 verbose #1844 > > } 00:03:13 verbose #1845 > > 00:03:13 verbose #1846 > > let inline run () = 00:03:13 verbose #1847 > > let eventMap, eventList = testEventsSorted (watchDirectory (fun _ -> false)) 00:03:13 verbose #1848 > > write 00:03:13 verbose #1849 > > 00:03:13 verbose #1850 > > [[ 00:03:13 verbose #1851 > > "file1.txt", nameof FileSystemChangeType.Created 00:03:13 verbose #1852 > > "file1.txt", nameof FileSystemChangeType.Changed 00:03:13 verbose #1853 > > "file2.txt", nameof FileSystemChangeType.Created 00:03:13 verbose #1854 > > "file2.txt", nameof FileSystemChangeType.Changed 00:03:13 verbose #1855 > > 00:03:13 verbose #1856 > > "file_1.txt", nameof FileSystemChangeType.Changed 00:03:13 verbose #1857 > > "file_1.txt", nameof FileSystemChangeType.Renamed 00:03:13 verbose #1858 > > "file_1.txt", nameof FileSystemChangeType.Deleted 00:03:13 verbose #1859 > > 00:03:13 verbose #1860 > > "file_2.txt", nameof FileSystemChangeType.Changed 00:03:13 verbose #1861 > > "file_2.txt", nameof FileSystemChangeType.Renamed 00:03:13 verbose #1862 > > "file_2.txt", nameof FileSystemChangeType.Deleted 00:03:13 verbose #1863 > > ]] 00:03:13 verbose #1864 > > |> _sequenceEqual eventList 00:03:13 verbose #1865 > > 00:03:13 verbose #1866 > > [[ 00:03:13 verbose #1867 > > "file1.txt", nameof FileSystemChangeType.Changed 00:03:13 verbose #1868 > > "file2.txt", nameof FileSystemChangeType.Changed 00:03:13 verbose #1869 > > "file_1.txt", nameof FileSystemChangeType.Deleted 00:03:13 verbose #1870 > > "file_2.txt", nameof FileSystemChangeType.Deleted 00:03:13 verbose #1871 > > ]] 00:03:13 verbose #1872 > > |> Map.ofList 00:03:13 verbose #1873 > > |> _sequenceEqual eventMap 00:03:13 verbose #1874 > > 00:03:13 verbose #1875 > > run 00:03:13 verbose #1876 > > |> retry_fn 3 00:03:13 verbose #1877 > > |> _assertEqual (Some ()) 00:03:17 verbose #1878 > > 00:03:17 verbose #1879 > > ╭─[ 3.67s - stdout ]───────────────────────────────────────────────────────────╮ 00:03:17 verbose #1880 > > │ Some () │ 00:03:17 verbose #1881 > > │ │ 00:03:17 verbose #1882 > > │ 00:00:31 debug #8 FileSystem.watchWithFilter / Disposing watch stream │ 00:03:17 verbose #1883 > > │ / filter: FileName, LastWrite │ 00:03:17 verbose #1884 > > │ [("file1.txt", "Created"); ("file1.txt", "Changed"); ("file2.txt", │ 00:03:17 verbose #1885 > > │ "Created"); ("file2.txt", "Changed"); │ 00:03:17 verbose #1886 > > │ ("file_1.txt", "Changed"); ("file_1.txt", "Renamed"); ("file_1.txt", │ 00:03:17 verbose #1887 > > │ "Deleted"); ("file_2.txt", "Changed"); │ 00:03:17 verbose #1888 > > │ ("file_2.txt", "Renamed"); ("file_2.txt", "Deleted")] │ 00:03:17 verbose #1889 > > │ │ 00:03:17 verbose #1890 > > │ map [("file1.txt", "Changed"); ("file2.txt", "Changed"); ("file_1.txt", │ 00:03:17 verbose #1891 > > │ "Deleted"); ("file_2.txt", "Deleted")] │ 00:03:17 verbose #1892 > > │ │ 00:03:17 verbose #1893 > > │ Some () │ 00:03:17 verbose #1894 > > │ │ 00:03:17 verbose #1895 > > │ │ 00:03:17 verbose #1896 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:17 verbose #1897 > 00:00:58 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 36872 } 00:03:17 verbose #1898 > 00:00:58 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:03:17 verbose #1899 > "nbconvert", 00:03:17 verbose #1900 > "c:/home/git/polyglot/lib/fsharp/FileSystem.dib.ipynb", 00:03:17 verbose #1901 > "--to", 00:03:17 verbose #1902 > "html", 00:03:17 verbose #1903 > "--HTMLExporter.theme=dark", 00:03:17 verbose #1904 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/fsharp/FileSystem.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:03:19 verbose #1905 > 00:01:01 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/fsharp/FileSystem.dib.ipynb to html 00:03:19 verbose #1906 > 00:01:01 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:03:19 verbose #1907 > 00:01:01 verbose #7 ! validate(nb) 00:03:22 verbose #1908 > 00:01:03 verbose #8 ! [NbConvertApp] Writing 380524 bytes to c:\home\git\polyglot\lib\fsharp\FileSystem.dib.html 00:03:22 verbose #1909 > 00:01:03 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 651 } 00:03:22 verbose #1910 > 00:01:03 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 651 } 00:03:22 verbose #1911 > 00:01:03 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:03:22 verbose #1912 > "-c", 00:03:22 verbose #1913 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/FileSystem.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:03:22 verbose #1914 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/FileSystem.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:03:23 verbose #1915 > 00:01:04 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:03:23 verbose #1916 > 00:01:04 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:03:23 verbose #1917 > 00:01:04 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 37582 } 00:03:23 debug #1918 runtime.execute_with_options_async / { exit_code = 0; output_length = 42106 } 00:03:23 debug #5 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path FileSystem.dib --retries 3 00:03:23 debug #1919 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path Runtime.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:03:23 verbose #1920 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "Runtime.dib", "--retries", "3"])) } 00:03:23 verbose #1921 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:03:23 verbose #1922 > "repl", 00:03:23 verbose #1923 > "--exit-after-run", 00:03:23 verbose #1924 > "--run", 00:03:23 verbose #1925 > "c:/home/git/polyglot/lib/fsharp/Runtime.dib", 00:03:23 verbose #1926 > "--output-path", 00:03:23 verbose #1927 > "c:/home/git/polyglot/lib/fsharp/Runtime.dib.ipynb", 00:03:23 verbose #1928 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/fsharp/Runtime.dib" --output-path "c:/home/git/polyglot/lib/fsharp/Runtime.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:03:26 verbose #1929 > > 00:03:26 verbose #1930 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:26 verbose #1931 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:26 verbose #1932 > > │ # Runtime (Polyglot) │ 00:03:26 verbose #1933 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:31 verbose #1934 > > 00:03:31 verbose #1935 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:03:31 verbose #1936 > > #r 00:03:31 verbose #1937 > > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan 00:03:31 verbose #1938 > > dard2.1/FSharp.Control.AsyncSeq.dll" 00:03:31 verbose #1939 > > #r 00:03:31 verbose #1940 > > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6. 00:03:31 verbose #1941 > > 0/System.Reactive.dll" 00:03:31 verbose #1942 > > #r 00:03:31 verbose #1943 > > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib 00:03:31 verbose #1944 > > netstandard2.0/System.Reactive.Linq.dll" 00:03:31 verbose #1945 > > #r 00:03:31 verbose #1946 > > @"../../../../../../../.nuget/packages/argu/6.2.4/lib/netstandard2.0/Argu.dll" 00:03:53 verbose #1947 > > 00:03:53 verbose #1948 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:03:53 verbose #1949 > > #if !INTERACTIVE 00:03:53 verbose #1950 > > open Lib 00:03:53 verbose #1951 > > #endif 00:03:53 verbose #1952 > > 00:03:53 verbose #1953 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:03:53 verbose #1954 > > open Common 00:03:53 verbose #1955 > > 00:03:53 verbose #1956 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:03:53 verbose #1957 > > //// test 00:03:53 verbose #1958 > > 00:03:53 verbose #1959 > > open SpiralFileSystem.Operators 00:03:53 verbose #1960 > > 00:03:53 verbose #1961 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:53 verbose #1962 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:53 verbose #1963 > > │ ## parseArgs │ 00:03:53 verbose #1964 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:53 verbose #1965 > > 00:03:53 verbose #1966 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:03:53 verbose #1967 > > let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args = 00:03:53 verbose #1968 > > let assemblyName = 00:03:53 verbose #1969 > > System.Reflection.Assembly.GetEntryAssembly().GetName().Name 00:03:53 verbose #1970 > > let errorHandler : Argu.IExiter = 00:03:53 verbose #1971 > > if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |> 00:03:53 verbose #1972 > > List.contains assemblyName 00:03:53 verbose #1973 > > then Argu.ExceptionExiter () 00:03:53 verbose #1974 > > else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None | _ -> 00:03:53 verbose #1975 > > Some System.ConsoleColor.Red) 00:03:53 verbose #1976 > > 00:03:53 verbose #1977 > > let parser = 00:03:53 verbose #1978 > > Argu.ArgumentParser.Create<'T> ( 00:03:53 verbose #1979 > > programName = $"{assemblyName}{SpiralPlatform.get_executable_suffix 00:03:53 verbose #1980 > > ()}", 00:03:53 verbose #1981 > > errorHandler = errorHandler 00:03:53 verbose #1982 > > ) 00:03:53 verbose #1983 > > 00:03:53 verbose #1984 > > parser.ParseCommandLine args 00:03:53 verbose #1985 > > 00:03:53 verbose #1986 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:03:53 verbose #1987 > > //// test 00:03:53 verbose #1988 > > 00:03:53 verbose #1989 > > [[<RequireQualifiedAccess>]] 00:03:53 verbose #1990 > > type Arguments = 00:03:53 verbose #1991 > > | [[<Argu.ArguAttributes.MainCommand; Argu.ArguAttributes.ExactlyOnce; 00:03:53 verbose #1992 > > Argu.ArguAttributes.Last>]] 00:03:53 verbose #1993 > > Paths of paths : string list 00:03:53 verbose #1994 > > 00:03:53 verbose #1995 > > interface Argu.IArgParserTemplate with 00:03:53 verbose #1996 > > member s.Usage = 00:03:53 verbose #1997 > > match s with 00:03:53 verbose #1998 > > | Paths _ -> nameof Paths 00:03:53 verbose #1999 > > 00:03:53 verbose #2000 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:03:53 verbose #2001 > > //// test 00:03:53 verbose #2002 > > 00:03:53 verbose #2003 > > Argu.ArgumentParser.Create<Arguments>().PrintUsage () 00:03:53 verbose #2004 > > 00:03:53 verbose #2005 > > ╭─[ 183.93ms - return value ]──────────────────────────────────────────────────╮ 00:03:53 verbose #2006 > > │ "USAGE: dotnet-repl [--help] <paths>... │ 00:03:53 verbose #2007 > > │ │ 00:03:53 verbose #2008 > > │ PATHS: │ 00:03:53 verbose #2009 > > │ │ 00:03:53 verbose #2010 > > │ <paths>... Paths │ 00:03:53 verbose #2011 > > │ │ 00:03:53 verbose #2012 > > │ OPTIONS: │ 00:03:53 verbose #2013 > > │ │ 00:03:53 verbose #2014 > > │ --help display this list of options. │ 00:03:53 verbose #2015 > > │ " │ 00:03:53 verbose #2016 > > │ │ 00:03:53 verbose #2017 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:53 verbose #2018 > > 00:03:53 verbose #2019 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:03:53 verbose #2020 > > //// test 00:03:53 verbose #2021 > > 00:03:53 verbose #2022 > > fun () -> parseArgs<Arguments> [[||]] |> ignore 00:03:53 verbose #2023 > > |> _throwsC (fun ex _ -> 00:03:53 verbose #2024 > > SpiralSm.format_exception ex 00:03:53 verbose #2025 > > |> _stringContains "Argu.ArguParseException: ERROR: missing parameter 00:03:53 verbose #2026 > > '<paths>...'." 00:03:53 verbose #2027 > > ) 00:03:53 verbose #2028 > > 00:03:53 verbose #2029 > > ╭─[ 79.94ms - stdout ]─────────────────────────────────────────────────────────╮ 00:03:53 verbose #2030 > > │ <fun:it@3-3> │ 00:03:53 verbose #2031 > > │ │ 00:03:53 verbose #2032 > > │ "Argu.ArguParseException: ERROR: missing parameter '<paths>...'. │ 00:03:53 verbose #2033 > > │ USAGE: dotnet-repl.exe [--help] <paths>... │ 00:03:53 verbose #2034 > > │ │ 00:03:53 verbose #2035 > > │ PATHS: │ 00:03:53 verbose #2036 > > │ │ 00:03:53 verbose #2037 > > │ <paths>... Paths │ 00:03:53 verbose #2038 > > │ │ 00:03:53 verbose #2039 > > │ OPTIONS: │ 00:03:53 verbose #2040 > > │ │ 00:03:53 verbose #2041 > > │ --help display this list of options. │ 00:03:53 verbose #2042 > > │ " │ 00:03:53 verbose #2043 > > │ │ 00:03:53 verbose #2044 > > │ │ 00:03:53 verbose #2045 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:53 verbose #2046 > > 00:03:53 verbose #2047 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:03:53 verbose #2048 > > let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args = 00:03:53 verbose #2049 > > args 00:03:53 verbose #2050 > > |> parseArgs<'T> 00:03:53 verbose #2051 > > |> fun results -> results.GetAllResults () 00:03:53 verbose #2052 > > 00:03:53 verbose #2053 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:03:53 verbose #2054 > > //// test 00:03:53 verbose #2055 > > 00:03:53 verbose #2056 > > [[<RequireQualifiedAccess>]] 00:03:53 verbose #2057 > > type Arguments = 00:03:53 verbose #2058 > > | [[<Argu.ArguAttributes.MainCommand; Argu.ArguAttributes.ExactlyOnce; 00:03:53 verbose #2059 > > Argu.ArguAttributes.Last>]] 00:03:53 verbose #2060 > > Paths of paths : string list 00:03:53 verbose #2061 > > 00:03:53 verbose #2062 > > interface Argu.IArgParserTemplate with 00:03:53 verbose #2063 > > member s.Usage = 00:03:53 verbose #2064 > > match s with 00:03:53 verbose #2065 > > | Paths _ -> nameof Paths 00:03:53 verbose #2066 > > 00:03:53 verbose #2067 > > parseAllArgs<Arguments> [[| "a b"; "c" |]] 00:03:53 verbose #2068 > > |> _assertEqual [[ Arguments.Paths [[ "a b"; "c" ]] ]] 00:03:53 verbose #2069 > > 00:03:53 verbose #2070 > > ╭─[ 114.05ms - stdout ]────────────────────────────────────────────────────────╮ 00:03:53 verbose #2071 > > │ [Paths ["a b"; "c"]] │ 00:03:53 verbose #2072 > > │ │ 00:03:53 verbose #2073 > > │ │ 00:03:53 verbose #2074 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:53 verbose #2075 > > 00:03:53 verbose #2076 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:03:53 verbose #2077 > > let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args = 00:03:53 verbose #2078 > > args 00:03:53 verbose #2079 > > |> parseAllArgs<'T> 00:03:53 verbose #2080 > > |> List.groupBy CommonFSharp.getUnionCaseName<'T> 00:03:53 verbose #2081 > > |> Map.ofList 00:03:53 verbose #2082 > > 00:03:53 verbose #2083 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:03:53 verbose #2084 > > //// test 00:03:53 verbose #2085 > > 00:03:53 verbose #2086 > > parseArgsMap<Arguments> [[| "a b"; "c" |]] 00:03:53 verbose #2087 > > |> _assertEqual ( 00:03:53 verbose #2088 > > [[ nameof Arguments.Paths, [[ Arguments.Paths [[ "a b"; "c" ]] ]] ]] 00:03:53 verbose #2089 > > |> Map.ofList 00:03:53 verbose #2090 > > ) 00:03:53 verbose #2091 > > 00:03:53 verbose #2092 > > ╭─[ 71.19ms - stdout ]─────────────────────────────────────────────────────────╮ 00:03:53 verbose #2093 > > │ map [("Paths", [Paths ["a b"; "c"]])] │ 00:03:53 verbose #2094 > > │ │ 00:03:53 verbose #2095 > > │ │ 00:03:53 verbose #2096 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:54 verbose #2097 > 00:00:30 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 7590 } 00:03:54 verbose #2098 > 00:00:30 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:03:54 verbose #2099 > "nbconvert", 00:03:54 verbose #2100 > "c:/home/git/polyglot/lib/fsharp/Runtime.dib.ipynb", 00:03:54 verbose #2101 > "--to", 00:03:54 verbose #2102 > "html", 00:03:54 verbose #2103 > "--HTMLExporter.theme=dark", 00:03:54 verbose #2104 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/fsharp/Runtime.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:03:56 verbose #2105 > 00:00:33 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/fsharp/Runtime.dib.ipynb to html 00:03:56 verbose #2106 > 00:00:33 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:03:56 verbose #2107 > 00:00:33 verbose #7 ! validate(nb) 00:03:58 verbose #2108 > 00:00:35 verbose #8 ! [NbConvertApp] Writing 292946 bytes to c:\home\git\polyglot\lib\fsharp\Runtime.dib.html 00:03:58 verbose #2109 > 00:00:35 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 645 } 00:03:58 verbose #2110 > 00:00:35 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 645 } 00:03:58 verbose #2111 > 00:00:35 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:03:58 verbose #2112 > "-c", 00:03:58 verbose #2113 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/Runtime.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:03:58 verbose #2114 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/Runtime.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:03:59 verbose #2115 > 00:00:35 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:03:59 verbose #2116 > 00:00:35 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:03:59 verbose #2117 > 00:00:35 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 8294 } 00:03:59 debug #2118 runtime.execute_with_options_async / { exit_code = 0; output_length = 11315 } 00:03:59 debug #6 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path Runtime.dib --retries 3 00:00:00 debug #1 writeDibCode / output: Fs / path: Common.dib 00:00:00 debug #1 writeDibCode / output: Fs / path: FileSystem.dib 00:00:00 debug #1 writeDibCode / output: Fs / path: CommonFSharp.dib 00:00:00 debug #1 writeDibCode / output: Fs / path: Runtime.dib 00:00:00 debug #1 writeDibCode / output: Fs / path: Async.dib 00:00:00 debug #1 writeDibCode / output: Fs / path: AsyncSeq.dib 00:00:00 debug #4 parseDibCode / output: Fs / file: FileSystem.dib 00:00:00 debug #4 parseDibCode / output: Fs / file: Common.dib 00:00:00 debug #4 parseDibCode / output: Fs / file: Runtime.dib 00:00:00 debug #4 parseDibCode / output: Fs / file: AsyncSeq.dib 00:00:00 debug #4 parseDibCode / output: Fs / file: CommonFSharp.dib 00:00:00 debug #4 parseDibCode / output: Fs / file: Async.dib
In [ ]:
{ pwsh ../apps/spiral/builder/build.ps1 } | Invoke-Block
00:00:00 verbose #1 async.run_with_timeout_async / { timeout = 180 } 00:00:01 debug #1 runtime.execute_with_options_async / { options = { command = ../../../workspace/target/release/spiral_builder.exe dib --path spiral_builder.dib; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:01 verbose #2 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "spiral_builder.dib"])) } 00:00:01 verbose #3 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:00:01 verbose #4 > "repl", 00:00:01 verbose #5 > "--exit-after-run", 00:00:01 verbose #6 > "--run", 00:00:01 verbose #7 > "c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib", 00:00:01 verbose #8 > "--output-path", 00:00:01 verbose #9 > "c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib.ipynb", 00:00:01 verbose #10 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib" --output-path "c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:00:03 verbose #11 > > 00:00:03 verbose #12 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:03 verbose #13 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:03 verbose #14 > > │ # spiral_builder │ 00:00:03 verbose #15 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:08 verbose #16 > > 00:00:08 verbose #17 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:08 verbose #18 > > open file_system_operators 00:00:08 verbose #19 > > open rust.rust_operators 00:00:08 verbose #20 > > open rust 00:00:08 verbose #21 > > open sm'_operators 00:00:10 verbose #22 > > 00:00:10 verbose #23 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:10 verbose #24 > > //// test 00:00:10 verbose #25 > > 00:00:10 verbose #26 > > open testing 00:00:11 verbose #27 > > 00:00:11 verbose #28 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:11 verbose #29 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:11 verbose #30 > > │ ## get_args │ 00:00:11 verbose #31 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:11 verbose #32 > > 00:00:11 verbose #33 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:11 verbose #34 > > inl get_args () = 00:00:11 verbose #35 > > { 00:00:11 verbose #36 > > fsharp = "fsharp", { 00:00:11 verbose #37 > > spi_path = "spi-path", 's' 00:00:11 verbose #38 > > } 00:00:11 verbose #39 > > cuda = "cuda", { 00:00:11 verbose #40 > > py_path = "py-path", 'p' 00:00:11 verbose #41 > > env = "env", 'e' 00:00:11 verbose #42 > > deps = "deps", 'd' 00:00:11 verbose #43 > > } 00:00:11 verbose #44 > > fable = "fable", { 00:00:11 verbose #45 > > fs_path = "fs-path", 'f' 00:00:11 verbose #46 > > command = "command", 'c' 00:00:11 verbose #47 > > } 00:00:11 verbose #48 > > rust = "rust", { 00:00:11 verbose #49 > > fs_path = "fs-path", 'f' 00:00:11 verbose #50 > > deps = "deps", 'd' 00:00:11 verbose #51 > > wasm = "wasm", 'w' 00:00:11 verbose #52 > > contract = "contract", 'c' 00:00:11 verbose #53 > > cleanup = "cleanup", 'l' 00:00:11 verbose #54 > > } 00:00:11 verbose #55 > > typescript = "typescript", { 00:00:11 verbose #56 > > fs_path = "fs-path", 'f' 00:00:11 verbose #57 > > deps = "deps", 'd' 00:00:11 verbose #58 > > } 00:00:11 verbose #59 > > python = "python", { 00:00:11 verbose #60 > > fs_path = "fs-path", 'f' 00:00:11 verbose #61 > > deps = "deps", 'd' 00:00:11 verbose #62 > > } 00:00:11 verbose #63 > > dib = "dib", { 00:00:11 verbose #64 > > path = "path", 'p' 00:00:11 verbose #65 > > retries = "retries", 'r' 00:00:11 verbose #66 > > working_directory = "working-directory", 'w' 00:00:11 verbose #67 > > } 00:00:11 verbose #68 > > } 00:00:11 verbose #69 > > 00:00:11 verbose #70 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:11 verbose #71 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:11 verbose #72 > > │ ## cuda_env │ 00:00:11 verbose #73 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:11 verbose #74 > > 00:00:11 verbose #75 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:11 verbose #76 > > union cuda_env = 00:00:11 verbose #77 > > | Pip 00:00:11 verbose #78 > > | Poetry 00:00:12 verbose #79 > > 00:00:12 verbose #80 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:12 verbose #81 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:12 verbose #82 > > │ ## get_command │ 00:00:12 verbose #83 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:12 verbose #84 > > 00:00:12 verbose #85 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:12 verbose #86 > > let get_command () = 00:00:12 verbose #87 > > ##"command" 00:00:12 verbose #88 > > |> runtime.new_command 00:00:12 verbose #89 > > |> runtime.command_subcommand_required true 00:00:12 verbose #90 > > |> runtime.command_subcommand ( 00:00:12 verbose #91 > > ##(get_args () .fsharp |> fst) 00:00:12 verbose #92 > > |> runtime.new_command 00:00:12 verbose #93 > > |> runtime.command_init_arg ((get_args () .fsharp |> snd).spi_path) ( 00:00:12 verbose #94 > > runtime.arg_required true 00:00:12 verbose #95 > > ) 00:00:12 verbose #96 > > ) 00:00:12 verbose #97 > > |> runtime.command_subcommand ( 00:00:12 verbose #98 > > ##(get_args () .cuda |> fst) 00:00:12 verbose #99 > > |> runtime.new_command 00:00:12 verbose #100 > > |> runtime.command_init_arg ((get_args () .cuda |> snd).py_path) ( 00:00:12 verbose #101 > > runtime.arg_required true 00:00:12 verbose #102 > > ) 00:00:12 verbose #103 > > |> runtime.command_init_arg ((get_args () .cuda |> snd).env) ( 00:00:12 verbose #104 > > real runtime.arg_union `cuda_env ignore 00:00:12 verbose #105 > > ) 00:00:12 verbose #106 > > |> runtime.command_init_arg ((get_args () .cuda |> snd).deps) ( 00:00:12 verbose #107 > > runtime.arg_value_names ;[[ ##"NAME"; ##"VERSION" ]] 00:00:12 verbose #108 > > >> runtime.arg_num_args_range ( 00:00:12 verbose #109 > > runtime.new_value_range 00:00:12 verbose #110 > > false 00:00:12 verbose #111 > > (am'.Start (1i32 |> convert : unativeint)) 00:00:12 verbose #112 > > (am'.End id) 00:00:12 verbose #113 > > ) 00:00:12 verbose #114 > > >> runtime.arg_action runtime.Append 00:00:12 verbose #115 > > ) 00:00:12 verbose #116 > > ) 00:00:12 verbose #117 > > |> runtime.command_subcommand ( 00:00:12 verbose #118 > > ##(get_args () .fable |> fst) 00:00:12 verbose #119 > > |> runtime.new_command 00:00:12 verbose #120 > > |> runtime.command_init_arg ((get_args () .fable |> snd).fs_path) ( 00:00:12 verbose #121 > > runtime.arg_required true 00:00:12 verbose #122 > > ) 00:00:12 verbose #123 > > |> runtime.command_init_arg ((get_args () .fable |> snd).command) ( 00:00:12 verbose #124 > > id 00:00:12 verbose #125 > > ) 00:00:12 verbose #126 > > ) 00:00:12 verbose #127 > > |> runtime.command_subcommand ( 00:00:12 verbose #128 > > ##(get_args () .rust |> fst) 00:00:12 verbose #129 > > |> runtime.new_command 00:00:12 verbose #130 > > |> runtime.command_init_arg ((get_args () .rust |> snd).fs_path) ( 00:00:12 verbose #131 > > runtime.arg_required true 00:00:12 verbose #132 > > ) 00:00:12 verbose #133 > > |> runtime.command_init_arg ((get_args () .rust |> snd).deps) ( 00:00:12 verbose #134 > > runtime.arg_value_names ;[[ ##"NAME"; ##"VERSION" ]] 00:00:12 verbose #135 > > >> runtime.arg_num_args_range ( 00:00:12 verbose #136 > > runtime.new_value_range 00:00:12 verbose #137 > > false 00:00:12 verbose #138 > > (am'.Start (1i32 |> convert : unativeint)) 00:00:12 verbose #139 > > (am'.End id) 00:00:12 verbose #140 > > ) 00:00:12 verbose #141 > > >> runtime.arg_action runtime.Append 00:00:12 verbose #142 > > ) 00:00:12 verbose #143 > > |> runtime.command_init_arg ((get_args () .rust |> snd).wasm) ( 00:00:12 verbose #144 > > runtime.arg_num_args_range ( 00:00:12 verbose #145 > > runtime.new_value_range 00:00:12 verbose #146 > > true 00:00:12 verbose #147 > > (am'.End id) 00:00:12 verbose #148 > > (am'.End fun _ => (1i32 |> convert : unativeint)) 00:00:12 verbose #149 > > ) 00:00:12 verbose #150 > > >> runtime.arg_require_equals true 00:00:12 verbose #151 > > >> runtime.arg_default_missing_value "" 00:00:12 verbose #152 > > ) 00:00:12 verbose #153 > > |> runtime.command_init_arg ((get_args () .rust |> snd).contract) ( 00:00:12 verbose #154 > > runtime.arg_num_args_range ( 00:00:12 verbose #155 > > runtime.new_value_range 00:00:12 verbose #156 > > true 00:00:12 verbose #157 > > (am'.End id) 00:00:12 verbose #158 > > (am'.End fun _ => (1i32 |> convert : unativeint)) 00:00:12 verbose #159 > > ) 00:00:12 verbose #160 > > >> runtime.arg_require_equals true 00:00:12 verbose #161 > > >> runtime.arg_default_missing_value "" 00:00:12 verbose #162 > > ) 00:00:12 verbose #163 > > |> runtime.command_init_arg ((get_args () .rust |> snd).cleanup) ( 00:00:12 verbose #164 > > runtime.arg_default_value "true" 00:00:12 verbose #165 > > >> runtime.arg_action runtime.SetFalse 00:00:12 verbose #166 > > ) 00:00:12 verbose #167 > > ) 00:00:12 verbose #168 > > |> runtime.command_subcommand ( 00:00:12 verbose #169 > > ##(get_args () .typescript |> fst) 00:00:12 verbose #170 > > |> runtime.new_command 00:00:12 verbose #171 > > |> runtime.command_init_arg ((get_args () .typescript |> snd).fs_path) ( 00:00:12 verbose #172 > > runtime.arg_required true 00:00:12 verbose #173 > > ) 00:00:12 verbose #174 > > |> runtime.command_init_arg ((get_args () .typescript |> snd).deps) ( 00:00:12 verbose #175 > > runtime.arg_value_names ;[[ ##"NAME"; ##"VERSION" ]] 00:00:12 verbose #176 > > >> runtime.arg_num_args_range ( 00:00:12 verbose #177 > > runtime.new_value_range 00:00:12 verbose #178 > > false 00:00:12 verbose #179 > > (am'.Start (1i32 |> convert : unativeint)) 00:00:12 verbose #180 > > (am'.End id) 00:00:12 verbose #181 > > ) 00:00:12 verbose #182 > > >> runtime.arg_action runtime.Append 00:00:12 verbose #183 > > ) 00:00:12 verbose #184 > > ) 00:00:12 verbose #185 > > |> runtime.command_subcommand ( 00:00:12 verbose #186 > > ##(get_args () .python |> fst) 00:00:12 verbose #187 > > |> runtime.new_command 00:00:12 verbose #188 > > |> runtime.command_init_arg ((get_args () .python |> snd).fs_path) ( 00:00:12 verbose #189 > > runtime.arg_required true 00:00:12 verbose #190 > > ) 00:00:12 verbose #191 > > |> runtime.command_init_arg ((get_args () .python |> snd).deps) ( 00:00:12 verbose #192 > > runtime.arg_value_names ;[[ ##"NAME"; ##"VERSION" ]] 00:00:12 verbose #193 > > >> runtime.arg_num_args_range ( 00:00:12 verbose #194 > > runtime.new_value_range 00:00:12 verbose #195 > > false 00:00:12 verbose #196 > > (am'.Start (1i32 |> convert : unativeint)) 00:00:12 verbose #197 > > (am'.End id) 00:00:12 verbose #198 > > ) 00:00:12 verbose #199 > > >> runtime.arg_action runtime.Append 00:00:12 verbose #200 > > ) 00:00:12 verbose #201 > > ) 00:00:12 verbose #202 > > |> runtime.command_subcommand ( 00:00:12 verbose #203 > > ##(get_args () .dib |> fst) 00:00:12 verbose #204 > > |> runtime.new_command 00:00:12 verbose #205 > > |> runtime.command_init_arg ((get_args () .dib |> snd).path) ( 00:00:12 verbose #206 > > runtime.arg_required true 00:00:12 verbose #207 > > // >> runtime.arg_value_parser (runtime.value_parser_path_buf ()) 00:00:12 verbose #208 > > ) 00:00:12 verbose #209 > > |> runtime.command_init_arg ((get_args () .dib |> snd).retries) ( 00:00:12 verbose #210 > > runtime.arg_value_parser (runtime.value_parser_expr "u8") 00:00:12 verbose #211 > > ) 00:00:12 verbose #212 > > |> runtime.command_init_arg ((get_args () .dib |> 00:00:12 verbose #213 > > snd).working_directory) ( 00:00:12 verbose #214 > > id 00:00:12 verbose #215 > > ) 00:00:12 verbose #216 > > ) 00:00:13 verbose #217 > > 00:00:13 verbose #218 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:13 verbose #219 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:13 verbose #220 > > │ ## fable │ 00:00:13 verbose #221 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:13 verbose #222 > > 00:00:13 verbose #223 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:13 verbose #224 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:13 verbose #225 > > │ ### fable_target │ 00:00:13 verbose #226 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:13 verbose #227 > > 00:00:13 verbose #228 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:13 verbose #229 > > union fable_target = 00:00:13 verbose #230 > > | Rust 00:00:13 verbose #231 > > | TypeScript 00:00:13 verbose #232 > > | Python 00:00:13 verbose #233 > > 00:00:13 verbose #234 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:13 verbose #235 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:13 verbose #236 > > │ ### fable_runtime │ 00:00:13 verbose #237 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:13 verbose #238 > > 00:00:13 verbose #239 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:13 verbose #240 > > union fable_runtime = 00:00:13 verbose #241 > > | Wasm : string 00:00:13 verbose #242 > > | Contract : string 00:00:14 verbose #243 > > 00:00:14 verbose #244 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:14 verbose #245 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:14 verbose #246 > > │ ### execute_dotnet_fable │ 00:00:14 verbose #247 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:14 verbose #248 > > 00:00:14 verbose #249 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:14 verbose #250 > > let execute_dotnet_fable { workspace_root_external fsproj_path extension 00:00:14 verbose #251 > > package_dir runtime } = 00:00:14 verbose #252 > > open runtime 00:00:14 verbose #253 > > execution_options fun x => { x with 00:00:14 verbose #254 > > command = 00:00:14 verbose #255 > > inl platform = 00:00:14 verbose #256 > > if platform.is_windows () 00:00:14 verbose #257 > > then "_WINDOWS" 00:00:14 verbose #258 > > else "_LINUX" 00:00:14 verbose #259 > > inl platform : string = $'$" --define {!platform}"' 00:00:14 verbose #260 > > inl runtime = 00:00:14 verbose #261 > > match runtime with 00:00:14 verbose #262 > > | Some (runtime : fable_runtime) => 00:00:14 verbose #263 > > inl runtime = runtime |> reflection.union_to_string |> 00:00:14 verbose #264 > > sm'.to_upper 00:00:14 verbose #265 > > $'$" --define {!runtime}"' 00:00:14 verbose #266 > > | None => "" 00:00:14 verbose #267 > > $'$"dotnet fable \\\"{!fsproj_path}\\\" --optimize --lang 00:00:14 verbose #268 > > {!extension} --extension .{!extension} --outDir 00:00:14 verbose #269 > > \\\"{!package_dir}\\\"{!platform}{!runtime}"' 00:00:14 verbose #270 > > working_directory = workspace_root_external |> resultm.box |> 00:00:14 verbose #271 > > resultm.ok' 00:00:14 verbose #272 > > } 00:00:14 verbose #273 > > |> execute_retry 3u8 00:00:14 verbose #274 > > 00:00:14 verbose #275 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:14 verbose #276 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:14 verbose #277 > > │ ### get_package_dir │ 00:00:14 verbose #278 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:14 verbose #279 > > 00:00:14 verbose #280 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:14 verbose #281 > > inl get_package_dir { workspace_root target name hash } = 00:00:14 verbose #282 > > inl dir = workspace_root </> "target/spiral_builder" </> name 00:00:14 verbose #283 > > match hash, (target : option fable_target) with 00:00:14 verbose #284 > > | Some hash, Some target => dir </> "packages" </> (target |> 00:00:14 verbose #285 > > reflection.union_to_string) </> hash 00:00:14 verbose #286 > > | _ => dir 00:00:15 verbose #287 > > 00:00:15 verbose #288 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:15 verbose #289 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:15 verbose #290 > > │ ### persist_code_project │ 00:00:15 verbose #291 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:15 verbose #292 > > 00:00:15 verbose #293 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:15 verbose #294 > > inl persist_code_project { workspace_root package_dir packages modules name code 00:00:15 verbose #295 > > } = 00:00:15 verbose #296 > > package_dir |> file_system.create_dir |> ignore 00:00:15 verbose #297 > > 00:00:15 verbose #298 > > inl fs_path = package_dir </> $'$"{!name}.fs"' |> file_system.normalize_path 00:00:15 verbose #299 > > code |> file_system.write_all_text_exists fs_path 00:00:15 verbose #300 > > 00:00:15 verbose #301 > > inl modules_code = 00:00:15 verbose #302 > > modules 00:00:15 verbose #303 > > |> listm.map fun path => 00:00:15 verbose #304 > > inl path = workspace_root </> path 00:00:15 verbose #305 > > $'$"<Compile Include=\\\"{!path}\\\" />"' : string 00:00:15 verbose #306 > > |> listm'.box 00:00:15 verbose #307 > > |> seq.of_list' 00:00:15 verbose #308 > > |> sm'.concat "\\n " 00:00:15 verbose #309 > > 00:00:15 verbose #310 > > inl packages_code = 00:00:15 verbose #311 > > packages 00:00:15 verbose #312 > > |> listm.map fun (package : string) => 00:00:15 verbose #313 > > $'$"<PackageReference Include=\\\"{!package}\\\" Version=\\\"*\\\" 00:00:15 verbose #314 > > />"' : string 00:00:15 verbose #315 > > |> listm'.box 00:00:15 verbose #316 > > |> seq.of_list' 00:00:15 verbose #317 > > |> sm'.concat "\\n " 00:00:15 verbose #318 > > 00:00:15 verbose #319 > > inl fsproj_path = package_dir </> $'$"{!name}.fsproj"' |> 00:00:15 verbose #320 > > file_system.normalize_path 00:00:15 verbose #321 > > inl fsproj_code : string = 00:00:15 verbose #322 > > $'$"<Project Sdk=\\\"Microsoft.NET.Sdk\\\">"' 00:00:15 verbose #323 > > +#. $'$"<PropertyGroup>"' 00:00:15 verbose #324 > > +#. $'$" <TargetFramework>net9.0</TargetFramework>"' 00:00:15 verbose #325 > > +#. $'$" <LangVersion>preview</LangVersion>"' 00:00:15 verbose #326 > > +#. $'$" <RollForward>Major</RollForward>"' 00:00:15 verbose #327 > > +#. $'$" <TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>"' 00:00:15 verbose #328 > > +#. $'$" <PublishAot>false</PublishAot>"' 00:00:15 verbose #329 > > +#. $'$" <PublishTrimmed>false</PublishTrimmed>"' 00:00:15 verbose #330 > > +#. $'$" <PublishSingleFile>true</PublishSingleFile>"' 00:00:15 verbose #331 > > +#. $'$" <SelfContained>true</SelfContained>"' 00:00:15 verbose #332 > > +#. $'$" <Version>0.0.1-alpha.1</Version>"' 00:00:15 verbose #333 > > +#. $'$" <OutputType>Exe</OutputType>"' 00:00:15 verbose #334 > > +#. $'$"</PropertyGroup>"' 00:00:15 verbose #335 > > 00:00:15 verbose #336 > > +#. $'$"<PropertyGroup 00:00:15 verbose #337 > > Condition=\\\"$([[MSBuild]]::IsOSPlatform(\'FreeBSD\'))\\\">"' 00:00:15 verbose #338 > > +#. $'$" <DefineConstants>_FREEBSD</DefineConstants>"' 00:00:15 verbose #339 > > +#. $'$"</PropertyGroup>"' 00:00:15 verbose #340 > > 00:00:15 verbose #341 > > +#. $'$"<PropertyGroup 00:00:15 verbose #342 > > Condition=\\\"$([[MSBuild]]::IsOSPlatform(\'Linux\'))\\\">"' 00:00:15 verbose #343 > > +#. $'$" <DefineConstants>_LINUX</DefineConstants>"' 00:00:15 verbose #344 > > +#. $'$"</PropertyGroup>"' 00:00:15 verbose #345 > > 00:00:15 verbose #346 > > +#. $'$"<PropertyGroup 00:00:15 verbose #347 > > Condition=\\\"$([[MSBuild]]::IsOSPlatform(\'OSX\'))\\\">"' 00:00:15 verbose #348 > > +#. $'$" <DefineConstants>_OSX</DefineConstants>"' 00:00:15 verbose #349 > > +#. $'$"</PropertyGroup>"' 00:00:15 verbose #350 > > 00:00:15 verbose #351 > > +#. $'$"<PropertyGroup 00:00:15 verbose #352 > > Condition=\\\"$([[MSBuild]]::IsOSPlatform(\'Windows\'))\\\">"' 00:00:15 verbose #353 > > +#. $'$" <DefineConstants>_WINDOWS</DefineConstants>"' 00:00:15 verbose #354 > > +#. $'$"</PropertyGroup>"' 00:00:15 verbose #355 > > 00:00:15 verbose #356 > > +#. $'$"<ItemGroup>"' 00:00:15 verbose #357 > > +#. $'$" {!modules_code}"' 00:00:15 verbose #358 > > +#. $'$" <Compile Include=\\\"{!fs_path}\\\" />"' 00:00:15 verbose #359 > > +#. $'$"</ItemGroup>"' 00:00:15 verbose #360 > > 00:00:15 verbose #361 > > +#. $'$"<ItemGroup>"' 00:00:15 verbose #362 > > +#. $'$" {!packages_code}"' 00:00:15 verbose #363 > > +#. $'$"</ItemGroup>"' 00:00:15 verbose #364 > > 00:00:15 verbose #365 > > +#. $'$"</Project>"' 00:00:15 verbose #366 > > 00:00:15 verbose #367 > > fsproj_code |> file_system.write_all_text_exists fsproj_path 00:00:15 verbose #368 > > 00:00:15 verbose #369 > > fsproj_path 00:00:16 verbose #370 > > 00:00:16 verbose #371 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:16 verbose #372 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:16 verbose #373 > > │ ### build_project │ 00:00:16 verbose #374 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:16 verbose #375 > > 00:00:16 verbose #376 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:16 verbose #377 > > inl build_project runtime' output_dir path = 00:00:16 verbose #378 > > inl full_path = path |> file_system.get_full_path 00:00:16 verbose #379 > > inl file_dir = full_path |> file_system.get_directory_name 00:00:16 verbose #380 > > inl extension = full_path |> file_system.get_extension 00:00:16 verbose #381 > > 00:00:16 verbose #382 > > trace Debug 00:00:16 verbose #383 > > fun () => "build_project" 00:00:16 verbose #384 > > fun () => { full_path } 00:00:16 verbose #385 > > 00:00:16 verbose #386 > > match extension with 00:00:16 verbose #387 > > | "fsproj" => () 00:00:16 verbose #388 > > | _ => failwith $'$"spiral_builder.build_project / Invalid project file 00:00:16 verbose #389 > > extension: {!extension}"' 00:00:16 verbose #390 > > 00:00:16 verbose #391 > > inl runtimes = 00:00:16 verbose #392 > > runtime' 00:00:16 verbose #393 > > |> optionm.map listm.singleton 00:00:16 verbose #394 > > |> optionm'.default_value [[ "linux-x64"; "win-x64" ]] 00:00:16 verbose #395 > > 00:00:16 verbose #396 > > inl output_dir = output_dir |> optionm'.default_value "dist" 00:00:16 verbose #397 > > 00:00:16 verbose #398 > > runtimes 00:00:16 verbose #399 > > |> listm.map fun runtime' => 00:00:16 verbose #400 > > runtime.execution_options fun x => { x with 00:00:16 verbose #401 > > command = $'$@@"dotnet publish \"\"{!path}\"\" --configuration 00:00:16 verbose #402 > > Release --output \"\"{!output_dir}\"\" --runtime {!runtime'}"' 00:00:16 verbose #403 > > working_directory = file_dir |> Some |> optionm'.box 00:00:16 verbose #404 > > } 00:00:16 verbose #405 > > |> runtime.execute_with_options 00:00:16 verbose #406 > > |> fst 00:00:16 verbose #407 > > |> listm'.sum 00:00:16 verbose #408 > > 00:00:16 verbose #409 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:16 verbose #410 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:16 verbose #411 > > │ ### build_code │ 00:00:16 verbose #412 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:16 verbose #413 > > 00:00:16 verbose #414 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:16 verbose #415 > > inl build_code { workspace_root runtime packages modules output_dir name code } 00:00:16 verbose #416 > > = 00:00:16 verbose #417 > > inl package_dir = get_package_dir { workspace_root name target = None; hash 00:00:16 verbose #418 > > = None } 00:00:16 verbose #419 > > inl fsproj_path = persist_code_project { workspace_root package_dir packages 00:00:16 verbose #420 > > modules name code } 00:00:16 verbose #421 > > inl exit_code = fsproj_path |> build_project runtime output_dir 00:00:16 verbose #422 > > if exit_code <>. 0 then 00:00:16 verbose #423 > > inl fsproj_text = fsproj_path |> file_system.read_all_text 00:00:16 verbose #424 > > trace Critical 00:00:16 verbose #425 > > fun () => "build_code" 00:00:16 verbose #426 > > fun () => { code = code |> sm'.ellipsis_end 400; fsproj_text } 00:00:16 verbose #427 > > exit_code 00:00:17 verbose #428 > > 00:00:17 verbose #429 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:17 verbose #430 > > //// test 00:00:17 verbose #431 > > ///! rust -d encoding_rs encoding_rs_io regex 00:00:17 verbose #432 > > 00:00:17 verbose #433 > > build_code 00:00:17 verbose #434 > > { 00:00:17 verbose #435 > > workspace_root = file_system.get_workspace_root () 00:00:17 verbose #436 > > runtime = None 00:00:17 verbose #437 > > packages = [[]] 00:00:17 verbose #438 > > modules = [[]] 00:00:17 verbose #439 > > output_dir = None 00:00:17 verbose #440 > > name = "test1" 00:00:17 verbose #441 > > code = "1 + 1 |> ignore" 00:00:17 verbose #442 > > } 00:00:17 verbose #443 > > |> _assert_eq 0 00:00:42 verbose #444 > > 00:00:42 verbose #445 > > ╭─[ 24.99s - return value ]────────────────────────────────────────────────────╮ 00:00:42 verbose #446 > > │ 00:00:00 verbose #1 file_system.create_dir / { dir = │ 00:00:42 verbose #447 > > │ c:\home\git\polyglot\target/spiral_builder\test1 } │ 00:00:42 verbose #448 > > │ 00:00:00 debug #2 build_project / { full_path = │ 00:00:42 verbose #449 > > │ \\?\C:\home\git\polyglot\target\spiral_builder\test1\test1.fsproj } │ 00:00:42 verbose #450 > > │ 00:00:00 debug #3 runtime.execute_with_options / { file_name = │ 00:00:42 verbose #451 > > │ dotnet; arguments = [ │ 00:00:42 verbose #452 > > │ "publish", │ 00:00:42 verbose #453 > > │ "c:/home/git/polyglot/target/spiral_builder/test1/test1.fsproj", │ 00:00:42 verbose #454 > > │ "--configuration", │ 00:00:42 verbose #455 > > │ "Release", │ 00:00:42 verbose #456 > > │ "--output", │ 00:00:42 verbose #457 > > │ "dist", │ 00:00:42 verbose #458 > > │ "--runtime", │ 00:00:42 verbose #459 > > │ "win-x64", │ 00:00:42 verbose #460 > > │ ]; options = { command = dotnet publish │ 00:00:42 verbose #461 > > │ "c:/home/git/polyglot/target/spiral_builder/test1/test1.fsproj" │ 00:00:42 verbose #462 > > │ --configuration Release --output "dist" --runtime win-x64; │ 00:00:42 verbose #463 > > │ cancellation_token = None; environment_variables = Array(MutCell([])); │ 00:00:42 verbose #464 > > │ on_line = None; stdin = None; trace = true; working_directory = Some( │ 00:00:42 verbose #465 > > │ "\\?\C:\home\git\polyglot\target\spiral_builder\test1", │ 00:00:42 verbose #466 > > │ ) } } │ 00:00:42 verbose #467 > > │ 00:00:00 verbose #4 > MSBuild version │ 00:00:42 verbose #468 > > │ 17.10.0-preview-24101-01+07fd5d51f for .NET │ 00:00:42 verbose #469 > > │ 00:00:01 verbose #5 > Determining projects to restore... │ 00:00:42 verbose #470 > > │ 00:00:02 verbose #6 > Restored │ 00:00:42 verbose #471 > > │ c:\home\git\polyglot\target\spiral_builder\test1\test1.fsproj (in 482 ms). │ 00:00:42 verbose #472 > > │ 00:00:02 verbose #7 > │ 00:00:42 verbose #473 > > │ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │ 00:00:42 verbose #474 > > │ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │ 00:00:42 verbose #475 > > │ ce.targets(313,5): message NETSDK1057: You are using a preview version of │ 00:00:42 verbose #476 > > │ .NET. See: https://aka.ms/dotnet-support-policy [ │ 00:00:42 verbose #477 > > │ c:\home\git\polyglot\t...iguration", │ 00:00:42 verbose #478 > > │ "Release", │ 00:00:42 verbose #479 > > │ "--output", │ 00:00:42 verbose #480 > > │ "dist", │ 00:00:42 verbose #481 > > │ "--runtime", │ 00:00:42 verbose #482 > > │ "linux-x64", │ 00:00:42 verbose #483 > > │ ]; options = { command = dotnet publish │ 00:00:42 verbose #484 > > │ "c:/home/git/polyglot/target/spiral_builder/test1/test1.fsproj" │ 00:00:42 verbose #485 > > │ --configuration Release --output "dist" --runtime linux-x64; │ 00:00:42 verbose #486 > > │ cancellation_token = None; environment_variables = Array(MutCell([])); │ 00:00:42 verbose #487 > > │ on_line = None; stdin = None; trace = true; working_directory = Some( │ 00:00:42 verbose #488 > > │ "\\?\C:\home\git\polyglot\target\spiral_builder\test1", │ 00:00:42 verbose #489 > > │ ) } } │ 00:00:42 verbose #490 > > │ 00:00:04 verbose #12 > MSBuild version │ 00:00:42 verbose #491 > > │ 17.10.0-preview-24101-01+07fd5d51f for .NET │ 00:00:42 verbose #492 > > │ 00:00:05 verbose #13 > Determining projects to restore... │ 00:00:42 verbose #493 > > │ 00:00:06 verbose #14 > Restored │ 00:00:42 verbose #494 > > │ c:\home\git\polyglot\target\spiral_builder\test1\test1.fsproj (in 439 ms). │ 00:00:42 verbose #495 > > │ 00:00:06 verbose #15 > │ 00:00:42 verbose #496 > > │ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │ 00:00:42 verbose #497 > > │ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │ 00:00:42 verbose #498 > > │ ce.targets(313,5): message NETSDK1057: You are using a preview version of │ 00:00:42 verbose #499 > > │ .NET. See: https://aka.ms/dotnet-support-policy [ │ 00:00:42 verbose #500 > > │ c:\home\git\polyglot\target\spiral_builder\test1\test1.fsproj] │ 00:00:42 verbose #501 > > │ 00:00:07 verbose #16 > test1 -> │ 00:00:42 verbose #502 > > │ c:\home\git\polyglot\target\spiral_builder\test1\bin\Release\net9.0\linux-x6 │ 00:00:42 verbose #503 > > │ 4\test1.dll │ 00:00:42 verbose #504 > > │ 00:00:08 verbose #17 > test1 -> │ 00:00:42 verbose #505 > > │ \\?\C:\home\git\polyglot\target\spiral_builder\test1\dist\ │ 00:00:42 verbose #506 > > │ 00:00:08 verbose #18 runtime.execute_with_options / result / { │ 00:00:42 verbose #507 > > │ exit_code = 0; std_trace_length = 689 } │ 00:00:42 verbose #508 > > │ __assert_eq / actual: 0 / expected: 0 │ 00:00:42 verbose #509 > > │ │ 00:00:42 verbose #510 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:42 verbose #511 > > 00:00:42 verbose #512 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:42 verbose #513 > > //// test 00:00:42 verbose #514 > > ///! rust -d encoding_rs encoding_rs_io regex 00:00:42 verbose #515 > > 00:00:42 verbose #516 > > build_code 00:00:42 verbose #517 > > { 00:00:42 verbose #518 > > workspace_root = file_system.get_workspace_root () 00:00:42 verbose #519 > > runtime = None 00:00:42 verbose #520 > > packages = [[]] 00:00:42 verbose #521 > > modules = [[]] 00:00:42 verbose #522 > > output_dir = None 00:00:42 verbose #523 > > name = "test2" 00:00:42 verbose #524 > > code = "1 + a |> ignore" 00:00:42 verbose #525 > > } 00:00:42 verbose #526 > > |> _assert_eq 2 00:01:01 verbose #527 > > 00:01:01 verbose #528 > > ╭─[ 19.56s - return value ]────────────────────────────────────────────────────╮ 00:01:01 verbose #529 > > │ 00:00:00 verbose #1 file_system.create_dir / { dir = │ 00:01:01 verbose #530 > > │ c:\home\git\polyglot\target/spiral_builder\test2 } │ 00:01:01 verbose #531 > > │ 00:00:00 debug #2 build_project / { full_path = │ 00:01:01 verbose #532 > > │ \\?\C:\home\git\polyglot\target\spiral_builder\test2\test2.fsproj } │ 00:01:01 verbose #533 > > │ 00:00:00 debug #3 runtime.execute_with_options / { file_name = │ 00:01:01 verbose #534 > > │ dotnet; arguments = [ │ 00:01:01 verbose #535 > > │ "publish", │ 00:01:01 verbose #536 > > │ "c:/home/git/polyglot/target/spiral_builder/test2/test2.fsproj", │ 00:01:01 verbose #537 > > │ "--configuration", │ 00:01:01 verbose #538 > > │ "Release", │ 00:01:01 verbose #539 > > │ "--output", │ 00:01:01 verbose #540 > > │ "dist", │ 00:01:01 verbose #541 > > │ "--runtime", │ 00:01:01 verbose #542 > > │ "win-x64", │ 00:01:01 verbose #543 > > │ ]; options = { command = dotnet publish │ 00:01:01 verbose #544 > > │ "c:/home/git/polyglot/target/spiral_builder/test2/test2.fsproj" │ 00:01:01 verbose #545 > > │ --configuration Release --output "dist" --runtime win-x64; │ 00:01:01 verbose #546 > > │ cancellation_token = None; environment_variables = Array(MutCell([])); │ 00:01:01 verbose #547 > > │ on_line = None; stdin = None; trace = true; working_directory = Some( │ 00:01:01 verbose #548 > > │ "\\?\C:\home\git\polyglot\target\spiral_builder\test2", │ 00:01:01 verbose #549 > > │ ) } } │ 00:01:01 verbose #550 > > │ 00:00:00 verbose #4 > MSBuild version │ 00:01:01 verbose #551 > > │ 17.10.0-preview-24101-01+07fd5d51f for .NET │ 00:01:01 verbose #552 > > │ 00:00:01 verbose #5 > Determining projects to restore... │ 00:01:01 verbose #553 > > │ 00:00:02 verbose #6 > Restored │ 00:01:01 verbose #554 > > │ c:\home\git\polyglot\target\spiral_builder\test2\test2.fsproj (in 622 ms). │ 00:01:01 verbose #555 > > │ 00:00:02 verbose #7 > │ 00:01:01 verbose #556 > > │ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │ 00:01:01 verbose #557 > > │ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │ 00:01:01 verbose #558 > > │ ce.targets(313,5): message NETSDK1057: You are using a preview version of │ 00:01:01 verbose #559 > > │ .NET. See: https://aka.ms/dotnet-support-policy [c:\home\git\polyglot\t...he │ 00:01:01 verbose #560 > > │ value or constructor 'a' is not defined. [ │ 00:01:01 verbose #561 > > │ c:\home\git\polyglot\target\spiral_builder\test2\test2.fsproj] │ 00:01:01 verbose #562 > > │ 00:00:09 verbose #16 runtime.execute_with_options / result / { │ 00:01:01 verbose #563 > > │ exit_code = 1; std_trace_length = 707 } │ 00:01:01 verbose #564 > > │ 00:00:09 critical #17 build_code / { code = 1 + a |> ignore; │ 00:01:01 verbose #565 > > │ fsproj_text = <Project Sdk="Microsoft.NET.Sdk"> │ 00:01:01 verbose #566 > > │ <PropertyGroup> │ 00:01:01 verbose #567 > > │ <TargetFramework>net9.0</TargetFramework> │ 00:01:01 verbose #568 > > │ <LangVersion>preview</LangVersion> │ 00:01:01 verbose #569 > > │ <RollForward>Major</RollForward> │ 00:01:01 verbose #570 > > │ <TargetLatestRuntimePatch>true</TargetLatestRuntimePatch> │ 00:01:01 verbose #571 > > │ <PublishAot>false</PublishAot> │ 00:01:01 verbose #572 > > │ <PublishTrimmed>false</PublishTrimmed> │ 00:01:01 verbose #573 > > │ <PublishSingleFile>true</PublishSingleFile> │ 00:01:01 verbose #574 > > │ <SelfContained>true</SelfContained> │ 00:01:01 verbose #575 > > │ <Version>0.0.1-alpha.1</Version> │ 00:01:01 verbose #576 > > │ <OutputType>Exe</OutputType> │ 00:01:01 verbose #577 > > │ </PropertyGroup> │ 00:01:01 verbose #578 > > │ <PropertyGroup Condition="$([MSBuild]::IsOSPlatform('FreeBSD'))"> │ 00:01:01 verbose #579 > > │ <DefineConstants>_FREEBSD</DefineConstants> │ 00:01:01 verbose #580 > > │ </PropertyGroup> │ 00:01:01 verbose #581 > > │ <PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Linux'))"> │ 00:01:01 verbose #582 > > │ <DefineConstants>_LINUX</DefineConstants> │ 00:01:01 verbose #583 > > │ </PropertyGroup> │ 00:01:01 verbose #584 > > │ <PropertyGroup Condition="$([MSBuild]::IsOSPlatform('OSX'))"> │ 00:01:01 verbose #585 > > │ <DefineConstants>_OSX</DefineConstants> │ 00:01:01 verbose #586 > > │ </PropertyGroup> │ 00:01:01 verbose #587 > > │ <PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))"> │ 00:01:01 verbose #588 > > │ <DefineConstants>_WINDOWS</DefineConstants> │ 00:01:01 verbose #589 > > │ </PropertyGroup> │ 00:01:01 verbose #590 > > │ <ItemGroup> │ 00:01:01 verbose #591 > > │ │ 00:01:01 verbose #592 > > │ <Compile │ 00:01:01 verbose #593 > > │ Include="c:/home/git/polyglot/target/spiral_builder/test2/test2.fs" /> │ 00:01:01 verbose #594 > > │ </ItemGroup> │ 00:01:01 verbose #595 > > │ <ItemGroup> │ 00:01:01 verbose #596 > > │ │ 00:01:01 verbose #597 > > │ </ItemGroup> │ 00:01:01 verbose #598 > > │ </Project> } │ 00:01:01 verbose #599 > > │ __assert_eq / actual: 2 / expected: 2 │ 00:01:01 verbose #600 > > │ │ 00:01:01 verbose #601 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:01 verbose #602 > > 00:01:01 verbose #603 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:01 verbose #604 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:01 verbose #605 > > │ ### read_file │ 00:01:01 verbose #606 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:01 verbose #607 > > 00:01:01 verbose #608 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:01 verbose #609 > > inl read_file path = 00:01:01 verbose #610 > > inl code = 00:01:01 verbose #611 > > path 00:01:01 verbose #612 > > |> file_system.read_all_text 00:01:01 verbose #613 > > |> sm'.replace_regex $'@@"(?P<a> *)(?P<b>let\\s+main\\s+.*?\\s*=)"' 00:01:01 verbose #614 > > "$a[[<EntryPoint>]]\n$a$b" 00:01:01 verbose #615 > > 00:01:01 verbose #616 > > inl code_trim = code |> sm'.trim_end [[]] 00:01:01 verbose #617 > > if code_trim |> sm'.ends_with "\\n()" 00:01:01 verbose #618 > > then code_trim |> sm'.slice 0i64 ((code_trim |> sm'.length) - 3) 00:01:01 verbose #619 > > else code 00:01:02 verbose #620 > > 00:01:02 verbose #621 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:02 verbose #622 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:02 verbose #623 > > │ ### persist_file │ 00:01:02 verbose #624 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:02 verbose #625 > > 00:01:02 verbose #626 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:02 verbose #627 > > inl persist_file { workspace_root package_dir packages modules path } = 00:01:02 verbose #628 > > inl full_path = path |> file_system.get_full_path 00:01:02 verbose #629 > > inl name = full_path |> file_system.get_file_name_without_extension 00:01:02 verbose #630 > > inl code = full_path |> read_file 00:01:02 verbose #631 > > persist_code_project { workspace_root package_dir packages modules name code 00:01:02 verbose #632 > > } 00:01:02 verbose #633 > > 00:01:02 verbose #634 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:02 verbose #635 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:02 verbose #636 > > │ ### build_file │ 00:01:02 verbose #637 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:02 verbose #638 > > 00:01:02 verbose #639 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:02 verbose #640 > > inl build_file { workspace_root runtime packages modules path } = 00:01:02 verbose #641 > > inl full_path = path |> file_system.get_full_path 00:01:02 verbose #642 > > inl dir = full_path |> file_system.get_directory_name 00:01:02 verbose #643 > > build_code 00:01:02 verbose #644 > > { 00:01:02 verbose #645 > > workspace_root 00:01:02 verbose #646 > > runtime 00:01:02 verbose #647 > > packages 00:01:02 verbose #648 > > modules 00:01:02 verbose #649 > > output_dir = dir </> "dist" |> Some 00:01:02 verbose #650 > > name = full_path |> file_system.get_file_name_without_extension 00:01:02 verbose #651 > > code = full_path |> read_file 00:01:02 verbose #652 > > } 00:01:03 verbose #653 > > 00:01:03 verbose #654 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:03 verbose #655 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:03 verbose #656 > > │ ## rust │ 00:01:03 verbose #657 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:03 verbose #658 > > 00:01:03 verbose #659 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:03 verbose #660 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:03 verbose #661 > > │ ### get_workspace_cargo_toml_content │ 00:01:03 verbose #662 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:03 verbose #663 > > 00:01:03 verbose #664 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:03 verbose #665 > > inl get_workspace_cargo_toml_content { workspace_root } : string = 00:01:03 verbose #666 > > inl workspace_root = workspace_root |> file_system.normalize_path 00:01:03 verbose #667 > > $'$"cargo-features = [[\\\"profile-rustflags\\\"]]"' 00:01:03 verbose #668 > > +#. $'$""' 00:01:03 verbose #669 > > +#. $'$"[[workspace]]"' 00:01:03 verbose #670 > > +#. $'$"resolver = \\\"2\\\""' 00:01:03 verbose #671 > > +#. $'$"members = [[\\\"packages/Rust/*\\\"]]"' 00:01:03 verbose #672 > > +#. $'$""' 00:01:03 verbose #673 > > +#. $'$"[[workspace.dependencies.fable_library_rust]]"' 00:01:03 verbose #674 > > +#. $'$"path = 00:01:03 verbose #675 > > \\\"{!workspace_root}/lib/rust/fable/fable_modules/fable-library-rust\\\""' 00:01:03 verbose #676 > > +#. $'$"default-features = false"' 00:01:03 verbose #677 > > +#. $'$"features = [[]]"' 00:01:03 verbose #678 > > +#. $'$""' 00:01:03 verbose #679 > > +#. $'$"[[workspace.dependencies]]"' 00:01:03 verbose #680 > > +#. $'$"inline_colorization = \\\"~0.1\\\""' 00:01:03 verbose #681 > > +#. $'$""' 00:01:03 verbose #682 > > +#. $'$"[[profile.release]]"' 00:01:03 verbose #683 > > +#. $'$"codegen-units = 1"' 00:01:03 verbose #684 > > +#. $'$"opt-level = \\\"z\\\""' 00:01:03 verbose #685 > > +#. $'$"lto = true"' 00:01:03 verbose #686 > > +#. $'$"debug = false"' 00:01:03 verbose #687 > > +#. $'$"panic = \\\"abort\\\""' 00:01:03 verbose #688 > > +#. $'$"overflow-checks = true"' 00:01:03 verbose #689 > > +#. $'$"rustflags = [[\\\"-C\\\", \\\"link-arg=-s\\\"]]"' 00:01:04 verbose #690 > > 00:01:04 verbose #691 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:04 verbose #692 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:04 verbose #693 > > │ ### get_cargo_toml_content │ 00:01:04 verbose #694 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:04 verbose #695 > > 00:01:04 verbose #696 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:04 verbose #697 > > inl get_cargo_toml_content { hash_hex runtime deps } : string = 00:01:04 verbose #698 > > $'$"[[package]]"' 00:01:04 verbose #699 > > +#. $'$"name = \\\"spiral_builder_{!hash_hex}\\\""' 00:01:04 verbose #700 > > +#. $'$"version = \\\"0.0.1\\\""' 00:01:04 verbose #701 > > +#. $'$"edition = \\\"2021\\\""' 00:01:04 verbose #702 > > +#. $'$""' 00:01:04 verbose #703 > > +#. $'$"[[dependencies]]"' 00:01:04 verbose #704 > > +#. ( 00:01:04 verbose #705 > > if runtime = None then 00:01:04 verbose #706 > > $'$"fable_library_rust = {{ workspace = true, features = 00:01:04 verbose #707 > > [[\\\"static_do_bindings\\\", \\\"datetime\\\", \\\"guid\\\", \\\"threaded\\\"]] 00:01:04 verbose #708 > > }}"' 00:01:04 verbose #709 > > else 00:01:04 verbose #710 > > $'$"fable_library_rust = {{ workspace = true }}"' 00:01:04 verbose #711 > > ) 00:01:04 verbose #712 > > +#. $'$"inline_colorization = {{ workspace = true }}"' 00:01:04 verbose #713 > > +#. $'$"{!deps}"' 00:01:04 verbose #714 > > +#. $'$""' 00:01:04 verbose #715 > > +#. ( 00:01:04 verbose #716 > > if runtime = None then 00:01:04 verbose #717 > > $'$"[[[[bin]]]]"' 00:01:04 verbose #718 > > +#. $'$"name = \\\"spiral_builder_{!hash_hex}\\\""' 00:01:04 verbose #719 > > else 00:01:04 verbose #720 > > $'$"[[lib]]"' 00:01:04 verbose #721 > > +#. $'$"crate-type = [[\\\"cdylib\\\"]]"' 00:01:04 verbose #722 > > ) 00:01:04 verbose #723 > > +#. $'$"path = \\\"spiral_builder.rs\\\" "' 00:01:04 verbose #724 > > 00:01:04 verbose #725 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:04 verbose #726 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:04 verbose #727 > > │ ### get_empty_cargo_toml_content │ 00:01:04 verbose #728 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:04 verbose #729 > > 00:01:04 verbose #730 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:04 verbose #731 > > inl get_empty_cargo_toml_content () = 00:01:04 verbose #732 > > inl guid = date_time.now () |> date_time.new_guid_from_date_time |> 00:01:04 verbose #733 > > sm'.obj_to_string 00:01:04 verbose #734 > > $'$"[[package]]"' 00:01:04 verbose #735 > > +#. $'$"name = \\\"spiral_builder_{!guid}\\\""' 00:01:04 verbose #736 > > +#. $'$"version = \\\"0.0.1\\\""' 00:01:04 verbose #737 > > +#. $'$"edition = \\\"2021\\\""' 00:01:04 verbose #738 > > +#. $'$""' 00:01:04 verbose #739 > > +#. $'$"[[[[bin]]]]"' 00:01:04 verbose #740 > > +#. $'$"name = \\\"spiral_builder_{!guid}\\\""' 00:01:04 verbose #741 > > +#. $'$"path = \\\"spiral_builder.rs\\\""' 00:01:05 verbose #742 > > 00:01:05 verbose #743 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:05 verbose #744 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:05 verbose #745 > > │ ### process_rust │ 00:01:05 verbose #746 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:05 verbose #747 > > 00:01:05 verbose #748 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:05 verbose #749 > > inl process_rust { fs_path deps trace_level runtime cleanup } = 00:01:05 verbose #750 > > open runtime 00:01:05 verbose #751 > > inl is_trace = trace_level = Verbose 00:01:05 verbose #752 > > inl _trace (fn : () -> string) = 00:01:05 verbose #753 > > if is_trace 00:01:05 verbose #754 > > then trace Info (fun () => $'$"spiral_builder.process_rust / {!fn ()}"') 00:01:05 verbose #755 > > id 00:01:05 verbose #756 > > else fn () |> console.write_line 00:01:05 verbose #757 > > 00:01:05 verbose #758 > > inl extension = "rs" 00:01:05 verbose #759 > > inl code = fs_path |> file_system.read_all_text 00:01:05 verbose #760 > > 00:01:05 verbose #761 > > inl hash_hex = { extension code runtime } |> sm'.format |> crypto.hash_text 00:01:05 verbose #762 > > 00:01:05 verbose #763 > > inl workspace_name = "spiral_builder" 00:01:05 verbose #764 > > 00:01:05 verbose #765 > > inl workspace_root_external = file_system.get_workspace_root_external () 00:01:05 verbose #766 > > inl workspace_root = workspace_root_external |> resultm.box |> 00:01:05 verbose #767 > > resultm.unwrap_or_else id 00:01:05 verbose #768 > > 00:01:05 verbose #769 > > inl package_dir = 00:01:05 verbose #770 > > get_package_dir { workspace_root name = workspace_name; target = Some 00:01:05 verbose #771 > > Rust; hash = Some hash_hex } 00:01:05 verbose #772 > > 00:01:05 verbose #773 > > inl fsproj_path = 00:01:05 verbose #774 > > persist_code_project 00:01:05 verbose #775 > > { 00:01:05 verbose #776 > > workspace_root 00:01:05 verbose #777 > > package_dir 00:01:05 verbose #778 > > packages = [[ "Fable.Core" ]] 00:01:05 verbose #779 > > modules = [[]] 00:01:05 verbose #780 > > name = workspace_name 00:01:05 verbose #781 > > code 00:01:05 verbose #782 > > } 00:01:05 verbose #783 > > 00:01:05 verbose #784 > > inl workspace_dir = package_dir </> "../../.." 00:01:05 verbose #785 > > inl workspace_cargo_toml_path = workspace_dir </> "Cargo.toml" 00:01:05 verbose #786 > > 00:01:05 verbose #787 > > if workspace_cargo_toml_path |> file_system.file_exists |> not 00:01:05 verbose #788 > > then get_empty_cargo_toml_content () |> file_system.write_all_text 00:01:05 verbose #789 > > workspace_cargo_toml_path 00:01:05 verbose #790 > > 00:01:05 verbose #791 > > inl cargo_toml_path = package_dir </> "Cargo.toml" 00:01:05 verbose #792 > > 00:01:05 verbose #793 > > if cargo_toml_path |> file_system.file_exists |> not 00:01:05 verbose #794 > > then get_empty_cargo_toml_content () |> file_system.write_all_text 00:01:05 verbose #795 > > cargo_toml_path 00:01:05 verbose #796 > > 00:01:05 verbose #797 > > inl lib_link_target_path = workspace_root </> 00:01:05 verbose #798 > > "lib/rust/fable/fable_modules/fable-library-rust" 00:01:05 verbose #799 > > inl lib_link_path = package_dir </> "fable_modules/fable-library-rust" 00:01:05 verbose #800 > > 00:01:05 verbose #801 > > lib_link_path |> file_system.link_directory lib_link_target_path 00:01:05 verbose #802 > > 00:01:05 verbose #803 > > inl exit_code, dotnet_fable_result = 00:01:05 verbose #804 > > execute_dotnet_fable { workspace_root_external fsproj_path extension 00:01:05 verbose #805 > > package_dir runtime } 00:01:05 verbose #806 > > 00:01:05 verbose #807 > > if exit_code <>. 0 then 00:01:05 verbose #808 > > trace Critical 00:01:05 verbose #809 > > fun () => "spiral_builder.process_rust / dotnet fable error" 00:01:05 verbose #810 > > fun () => { exit_code dotnet_fable_result } 00:01:05 verbose #811 > > { extension = Some extension; code = None; output = Some 00:01:05 verbose #812 > > dotnet_fable_result } 00:01:05 verbose #813 > > else 00:01:05 verbose #814 > > inl deps = 00:01:05 verbose #815 > > inl deps = 00:01:05 verbose #816 > > if runtime = None 00:01:05 verbose #817 > > then deps 00:01:05 verbose #818 > > else 00:01:05 verbose #819 > > // TODO: simplify 00:01:05 verbose #820 > > inl has_near_sdk = 00:01:05 verbose #821 > > deps 00:01:05 verbose #822 > > |> am'.vec_filter (sm'.from_std_string >> sm'.contains 00:01:05 verbose #823 > > "near-sdk") 00:01:05 verbose #824 > > |> am'.vec_len 00:01:05 verbose #825 > > |> i32 00:01:05 verbose #826 > > |> fun n => n > 0 00:01:05 verbose #827 > > // TODO: simplify with ++ 00:01:05 verbose #828 > > if has_near_sdk 00:01:05 verbose #829 > > then deps 00:01:05 verbose #830 > > else deps |> am'.vec_extend (;[[ "near-sdk" |> 00:01:05 verbose #831 > > sm'.to_std_string ]] |> am'.to_vec) 00:01:05 verbose #832 > > deps 00:01:05 verbose #833 > > |> am'.vec_map fun dep => 00:01:05 verbose #834 > > inl dep = dep |> sm'.from_std_string 00:01:05 verbose #835 > > if dep |> sm'.contains "=" 00:01:05 verbose #836 > > then dep 00:01:05 verbose #837 > > elif dep |> sm'.ends_with "]]" 00:01:05 verbose #838 > > then dep |> sm'.replace "[[" $'$"={{version=\'*\',features=[["' 00:01:05 verbose #839 > > |> fun x => $'$"{!x}}}"' 00:01:05 verbose #840 > > else $'$"{!dep}=\'*\'"' 00:01:05 verbose #841 > > |> am'.from_vec 00:01:05 verbose #842 > > |> fun x => x : _ i32 _ 00:01:05 verbose #843 > > |> seq.of_array' 00:01:05 verbose #844 > > |> sm'.concat "\n" 00:01:05 verbose #845 > > 00:01:05 verbose #846 > > inl cargo_toml_content = get_cargo_toml_content { hash_hex runtime deps 00:01:05 verbose #847 > > } 00:01:05 verbose #848 > > inl workspace_cargo_toml_content = get_workspace_cargo_toml_content { 00:01:05 verbose #849 > > workspace_root } 00:01:05 verbose #850 > > 00:01:05 verbose #851 > > cargo_toml_content |> file_system.write_all_text_exists cargo_toml_path 00:01:05 verbose #852 > > 00:01:05 verbose #853 > > workspace_cargo_toml_content |> file_system.write_all_text_exists 00:01:05 verbose #854 > > workspace_cargo_toml_path 00:01:05 verbose #855 > > 00:01:05 verbose #856 > > inl range_rs_path = lib_link_path </> "src/Range.rs" 00:01:05 verbose #857 > > if range_rs_path |> file_system.file_exists then 00:01:05 verbose #858 > > inl text = range_rs_path |> file_system.read_all_text 00:01:05 verbose #859 > > text 00:01:05 verbose #860 > > |> sm'.replace "use crate::String_::fromCharCode;" "use 00:01:05 verbose #861 > > crate::String_::fromChar;" 00:01:05 verbose #862 > > |> sm'.replace "fromCharCode(c)" "std::char::from_u32(c).unwrap()" 00:01:05 verbose #863 > > |> file_system.write_all_text_exists range_rs_path 00:01:05 verbose #864 > > 00:01:05 verbose #865 > > inl exit_code, cargo_fmt_result = 00:01:05 verbose #866 > > fun () => 00:01:05 verbose #867 > > inl exit_code, result = 00:01:05 verbose #868 > > execution_options fun x => { x with 00:01:05 verbose #869 > > command = $'$"cargo fmt --manifest-path 00:01:05 verbose #870 > > \\\"{!cargo_toml_path}\\\" --"' 00:01:05 verbose #871 > > working_directory = workspace_root_external |> 00:01:05 verbose #872 > > resultm.box |> resultm.ok' 00:01:05 verbose #873 > > } 00:01:05 verbose #874 > > |> execute_with_options 00:01:05 verbose #875 > > 00:01:05 verbose #876 > > inl return () = 00:01:05 verbose #877 > > if exit_code = 0 00:01:05 verbose #878 > > then Ok (exit_code, result) 00:01:05 verbose #879 > > else Error (exit_code, result) 00:01:05 verbose #880 > > 00:01:05 verbose #881 > > if result |> sm'.contains "failed to load manifest for workspace 00:01:05 verbose #882 > > member" |> not 00:01:05 verbose #883 > > then return () 00:01:05 verbose #884 > > else 00:01:05 verbose #885 > > inl missing_toml_path = 00:01:05 verbose #886 > > "failed to read `(?<a>.*?Cargo.toml)`" 00:01:05 verbose #887 > > |> sm'.new_regex 00:01:05 verbose #888 > > |> resultm.unwrap' 00:01:05 verbose #889 > > |> sm'.regex_captures result 00:01:05 verbose #890 > > |> am'.from_vec 00:01:05 verbose #891 > > |> fun x => x : _ i32 _ 00:01:05 verbose #892 > > |> am'.try_item 0 00:01:05 verbose #893 > > |> optionm.map (mapm.get "a" >> optionm'.unbox) 00:01:05 verbose #894 > > |> optionm'.flatten 00:01:05 verbose #895 > > 00:01:05 verbose #896 > > match missing_toml_path with 00:01:05 verbose #897 > > | None => Error (exit_code, result) 00:01:05 verbose #898 > > | Some missing_toml_path => 00:01:05 verbose #899 > > if missing_toml_path |> file_system.file_exists |> not 00:01:05 verbose #900 > > then 00:01:05 verbose #901 > > missing_toml_path 00:01:05 verbose #902 > > |> file_system.get_directory_name 00:01:05 verbose #903 > > |> file_system.create_dir 00:01:05 verbose #904 > > |> ignore 00:01:05 verbose #905 > > 00:01:05 verbose #906 > > get_empty_cargo_toml_content () 00:01:05 verbose #907 > > |> file_system.write_all_text missing_toml_path 00:01:05 verbose #908 > > return () 00:01:05 verbose #909 > > |> retry_fn' 3u8 00:01:05 verbose #910 > > 00:01:05 verbose #911 > > if exit_code <>. 0 then 00:01:05 verbose #912 > > trace Critical 00:01:05 verbose #913 > > fun () => "spiral_builder.process_rust / cargo fmt error" 00:01:05 verbose #914 > > fun () => { exit_code cargo_fmt_result } 00:01:05 verbose #915 > > 00:01:05 verbose #916 > > inl new_code_path = package_dir </> $'$"{!workspace_name}.{!extension}"' 00:01:05 verbose #917 > > inl new_code = new_code_path |> file_system.read_all_text 00:01:05 verbose #918 > > 00:01:05 verbose #919 > > inl main_code_header = 00:01:05 verbose #920 > > "pub fn main() -> Result<(), String> " +. !\($'"\\\"{\\\".into()"') 00:01:05 verbose #921 > > inl main_code : string = 00:01:05 verbose #922 > > ( 00:01:05 verbose #923 > > if runtime = None 00:01:05 verbose #924 > > then "" 00:01:05 verbose #925 > > else 00:01:05 verbose #926 > > $'$"#[[near_sdk::near_bindgen]]"' 00:01:05 verbose #927 > > +#. $'$"#[[derive(near_sdk::PanicOnDefault)]]"' 00:01:05 verbose #928 > > +#. $'$"pub struct MainState {{"' 00:01:05 verbose #929 > > +#. $'$"}}"' 00:01:05 verbose #930 > > +#. $'$""' 00:01:05 verbose #931 > > +#. $'$"#[[near_sdk::near_bindgen]]"' 00:01:05 verbose #932 > > +#. $'$"impl MainState {{"' 00:01:05 verbose #933 > > +#. $'$" pub fn state_main() {{"' 00:01:05 verbose #934 > > +#. $'$" Spiral_builder::method0();"' 00:01:05 verbose #935 > > +#. $'$" }}"' 00:01:05 verbose #936 > > +#. $'$"}}"' 00:01:05 verbose #937 > > ) 00:01:05 verbose #938 > > +#. $'$"{!main_code_header} Ok(()) }}"' 00:01:05 verbose #939 > > 00:01:05 verbose #940 > > inl cached = new_code |> sm'.contains main_code_header 00:01:05 verbose #941 > > 00:01:05 verbose #942 > > inl new_code = 00:01:05 verbose #943 > > if cached 00:01:05 verbose #944 > > then new_code 00:01:05 verbose #945 > > else 00:01:05 verbose #946 > > new_code 00:01:05 verbose #947 > > |> sm'.replace 00:01:05 verbose #948 > > ("),)" +. !\($'"\\\";\\\".into()"')) 00:01:05 verbose #949 > > "));" 00:01:05 verbose #950 > > |> sm'.replace 00:01:05 verbose #951 > > ("},)" +. !\($'"\\\";\\\".into()"')) 00:01:05 verbose #952 > > "});" 00:01:05 verbose #953 > > |> sm'.replace_regex 00:01:05 verbose #954 > > "\\s\\sdefaultOf\\(\\);" 00:01:05 verbose #955 > > " defaultOf::<()>();" 00:01:05 verbose #956 > > |> sm'.replace 00:01:05 verbose #957 > > "::Slice'_" 00:01:05 verbose #958 > > "::Slice__" 00:01:05 verbose #959 > > |> sm'.replace 00:01:05 verbose #960 > > " Slice'_" 00:01:05 verbose #961 > > " Slice__" 00:01:05 verbose #962 > > |> sm'.replace 00:01:05 verbose #963 > > ("defaultOf()" +. !\($'"\\\",\\\".into()"')) 00:01:05 verbose #964 > > "defaultOf::<std::sync::Arc<dyn IDisposable>>()," 00:01:05 verbose #965 > > |> sm'.replace 00:01:05 verbose #966 > > ("_self" +. !\($'"\\\"_.\\\".into()"')) 00:01:05 verbose #967 > > "self." 00:01:05 verbose #968 > > |> sm'.replace 00:01:05 verbose #969 > > ("get_or_insert_wit" +. !\($'"\\\"h\\\".into()"')) 00:01:05 verbose #970 > > "get_or_init" 00:01:05 verbose #971 > > |> sm'.replace 00:01:05 verbose #972 > > ("use 00:01:05 verbose #973 > > fable_library_rust::System::Collections::Concurrent::ConcurrentStack_1" +. 00:01:05 verbose #974 > > !\($'"\\\";\\\".into()"')) 00:01:05 verbose #975 > > "type ConcurrentStack_1<T> = T;" 00:01:05 verbose #976 > > |> sm'.replace 00:01:05 verbose #977 > > ("use fable_library_rust::System::Collections::Generic" +. 00:01:05 verbose #978 > > !\($'"\\\"::\\\".into()"')) 00:01:05 verbose #979 > > "use 00:01:05 verbose #980 > > fable_library_rust::Interfaces_::System::Collections::Generic::" 00:01:05 verbose #981 > > |> sm'.replace 00:01:05 verbose #982 > > ("use fable_library_rust::System::IDisposable" +. 00:01:05 verbose #983 > > !\($'"\\\";\\\".into()"')) 00:01:05 verbose #984 > > "use fable_library_rust::Interfaces_::System::IDisposable;" 00:01:05 verbose #985 > > |> sm'.replace 00:01:05 verbose #986 > > ("use 00:01:05 verbose #987 > > fable_library_rust::System::Threading::CancellationToken" +. 00:01:05 verbose #988 > > !\($'"\\\";\\\".into()"')) 00:01:05 verbose #989 > > "type CancellationToken = ();" 00:01:05 verbose #990 > > |> sm'.replace 00:01:05 verbose #991 > > ("use fable_library_rust::System::TimeZoneInfo" +. 00:01:05 verbose #992 > > !\($'"\\\";\\\".into()"')) 00:01:05 verbose #993 > > "type TimeZoneInfo = i64;" 00:01:05 verbose #994 > > |> sm'.replace 00:01:05 verbose #995 > > ("use 00:01:05 verbose #996 > > fable_library_rust::System::Threading::Tasks::TaskCanceledException" +. 00:01:05 verbose #997 > > !\($'"\\\";\\\".into()"')) 00:01:05 verbose #998 > > "type TaskCanceledException = ();" 00:01:05 verbose #999 > > 00:01:05 verbose #1000 > > if not cached 00:01:05 verbose #1001 > > then 00:01:05 verbose #1002 > > $'$"{!new_code}\\n\\n{!main_code}\\n"' 00:01:05 verbose #1003 > > |> file_system.write_all_text_exists new_code_path 00:01:05 verbose #1004 > > 00:01:05 verbose #1005 > > inl command = 00:01:05 verbose #1006 > > if runtime <> None 00:01:05 verbose #1007 > > then $'$"cargo build --release --target wasm32-unknown-unknown 00:01:05 verbose #1008 > > --manifest-path \\\"{!cargo_toml_path}\\\""' 00:01:05 verbose #1009 > > else $'$"cargo run --manifest-path \\\"{!cargo_toml_path}\\\""' 00:01:05 verbose #1010 > > inl environment_variables = 00:01:05 verbose #1011 > > if runtime <> None 00:01:05 verbose #1012 > > then ;[[]] 00:01:05 verbose #1013 > > else 00:01:05 verbose #1014 > > inl fast = false 00:01:05 verbose #1015 > > ;[[ 00:01:05 verbose #1016 > > "TRACE_LEVEL", "Verbose" 00:01:05 verbose #1017 > > "RUSTC_WRAPPER", "sccache" 00:01:05 verbose #1018 > > "RUSTFLAGS", 00:01:05 verbose #1019 > > if fast 00:01:05 verbose #1020 > > then "-C prefer-dynamic -C strip=symbols -C link-arg=-s -C 00:01:05 verbose #1021 > > debuginfo=0" 00:01:05 verbose #1022 > > else "-C prefer-dynamic" 00:01:05 verbose #1023 > > ]] 00:01:05 verbose #1024 > > inl exit_code, cargo_result = 00:01:05 verbose #1025 > > execution_options fun x => { x with 00:01:05 verbose #1026 > > command 00:01:05 verbose #1027 > > environment_variables 00:01:05 verbose #1028 > > working_directory = workspace_root_external |> resultm.box |> 00:01:05 verbose #1029 > > resultm.ok' 00:01:05 verbose #1030 > > } 00:01:05 verbose #1031 > > |> execute_with_options 00:01:05 verbose #1032 > > 00:01:05 verbose #1033 > > inl result = 00:01:05 verbose #1034 > > if runtime = None then 00:01:05 verbose #1035 > > inl external_command = 00:01:05 verbose #1036 > > inl vars = 00:01:05 verbose #1037 > > a environment_variables 00:01:05 verbose #1038 > > |> am.map fun k, v => $'$"$env:{!k}=\'\'{!v}\'\'"' : 00:01:05 verbose #1039 > > string 00:01:05 verbose #1040 > > |> fun x => x : _ i32 _ 00:01:05 verbose #1041 > > |> seq.of_array 00:01:05 verbose #1042 > > |> sm'.concat ";" 00:01:05 verbose #1043 > > inl command = 00:01:05 verbose #1044 > > a ;[[ 00:01:05 verbose #1045 > > vars 00:01:05 verbose #1046 > > command 00:01:05 verbose #1047 > > ]] 00:01:05 verbose #1048 > > |> fun x => x : _ i32 _ 00:01:05 verbose #1049 > > |> seq.of_array 00:01:05 verbose #1050 > > |> sm'.concat ";" 00:01:05 verbose #1051 > > $'$"pwsh -c \'{!command}\'"' : string 00:01:05 verbose #1052 > > if exit_code = 0 then 00:01:05 verbose #1053 > > inl output = 00:01:05 verbose #1054 > > try 00:01:05 verbose #1055 > > fun () => 00:01:05 verbose #1056 > > cargo_result 00:01:05 verbose #1057 > > |> sm'.split "\n" 00:01:05 verbose #1058 > > |> fun x => a x : _ i32 _ 00:01:05 verbose #1059 > > |> am'.skip_while fun line => 00:01:05 verbose #1060 > > (line |> sm'.contains "profile [[optimized]] 00:01:05 verbose #1061 > > target" |> not) 00:01:05 verbose #1062 > > && (line |> sm'.contains "profile 00:01:05 verbose #1063 > > [[unoptimized]] target" |> not) 00:01:05 verbose #1064 > > && (line |> sm'.contains "profile 00:01:05 verbose #1065 > > [[unoptimized + debuginfo]] target" |> not) 00:01:05 verbose #1066 > > |> am'.skip 2 00:01:05 verbose #1067 > > |> seq.of_array 00:01:05 verbose #1068 > > |> sm'.concat "\n" 00:01:05 verbose #1069 > > fun ex => 00:01:05 verbose #1070 > > trace Critical 00:01:05 verbose #1071 > > fun () => "spiral_builder.process_rust 00:01:05 verbose #1072 > > Exception" 00:01:05 verbose #1073 > > fun () => { ex new_code_path 00:01:05 verbose #1074 > > external_command cargo_result } 00:01:05 verbose #1075 > > None 00:01:05 verbose #1076 > > |> optionm'.box 00:01:05 verbose #1077 > > |> optionm'.unwrap 00:01:05 verbose #1078 > > 00:01:05 verbose #1079 > > { extension = Some extension; code = Some new_code; output = 00:01:05 verbose #1080 > > Some output } 00:01:05 verbose #1081 > > else 00:01:05 verbose #1082 > > trace Critical 00:01:05 verbose #1083 > > fun () => "spiral_builder.process_rust / error" 00:01:05 verbose #1084 > > fun () => { exit_code new_code_path external_command 00:01:05 verbose #1085 > > cleanup cargo_result } 00:01:05 verbose #1086 > > { extension = Some extension; code = None; output = None } 00:01:05 verbose #1087 > > else 00:01:05 verbose #1088 > > inl wasm_path : string = 00:01:05 verbose #1089 > > 00:01:05 verbose #1090 > > $'$"target/spiral_builder/{!workspace_name}/target/wasm32-unknown-unknown/releas 00:01:05 verbose #1091 > > e/spiral_builder_{!hash_hex}.wasm"' 00:01:05 verbose #1092 > > 00:01:05 verbose #1093 > > inl command = 00:01:05 verbose #1094 > > inl invoke_block_path = "scripts/invoke-block.ps1" 00:01:05 verbose #1095 > > inl spiral_wasm_command : string = 00:01:05 verbose #1096 > > inl runtime_cmd = 00:01:05 verbose #1097 > > match runtime with 00:01:05 verbose #1098 > > | Some (Wasm cmd) => cmd 00:01:05 verbose #1099 > > | Some (Contract cmd) => cmd 00:01:05 verbose #1100 > > | _ => "" 00:01:05 verbose #1101 > > $'$"\'workspace/target/release/spiral_wasm -t Debug -w 00:01:05 verbose #1102 > > {!wasm_path} {!runtime_cmd}\'"' 00:01:05 verbose #1103 > > $'$"pwsh -c \\\"pwsh {!invoke_block_path} 00:01:05 verbose #1104 > > {!spiral_wasm_command} -Linux -EnvironmentVariables 00:01:05 verbose #1105 > > NEAR_RPC_TIMEOUT_SECS=100\\\""' 00:01:05 verbose #1106 > > 00:01:05 verbose #1107 > > if exit_code = 0 then 00:01:05 verbose #1108 > > inl exit_code, spiral_wasm_result = 00:01:05 verbose #1109 > > execution_options fun x => { x with 00:01:05 verbose #1110 > > command 00:01:05 verbose #1111 > > working_directory = workspace_root |> optionm'.some' 00:01:05 verbose #1112 > > } 00:01:05 verbose #1113 > > |> execute_with_options 00:01:05 verbose #1114 > > 00:01:05 verbose #1115 > > if exit_code = 0 then 00:01:05 verbose #1116 > > { extension = Some extension; code = Some new_code; 00:01:05 verbose #1117 > > output = Some spiral_wasm_result } 00:01:05 verbose #1118 > > else 00:01:05 verbose #1119 > > trace Critical 00:01:05 verbose #1120 > > fun () => "spiral_builder.process_rust / wasm error" 00:01:05 verbose #1121 > > fun () => { 00:01:05 verbose #1122 > > exit_code new_code_path cargo_result cleanup 00:01:05 verbose #1123 > > spiral_wasm_result = 00:01:05 verbose #1124 > > $'$"\\n{!spiral_wasm_result}"' : string 00:01:05 verbose #1125 > > } 00:01:05 verbose #1126 > > { extension = Some extension; code = None; output = None 00:01:05 verbose #1127 > > } 00:01:05 verbose #1128 > > else 00:01:05 verbose #1129 > > trace Critical 00:01:05 verbose #1130 > > fun () => "spiral_builder.process_rust / cargo error" 00:01:05 verbose #1131 > > fun () => { 00:01:05 verbose #1132 > > exit_code new_code_path wasm_path command cleanup 00:01:05 verbose #1133 > > cargo_result = $'$"\\n{!cargo_result}"' : string 00:01:05 verbose #1134 > > } 00:01:05 verbose #1135 > > { extension = Some extension; code = None; output = None } 00:01:05 verbose #1136 > > 00:01:05 verbose #1137 > > if cleanup then 00:01:05 verbose #1138 > > inl cleanup = 00:01:05 verbose #1139 > > inl build_target = 00:01:05 verbose #1140 > > if runtime <> None 00:01:05 verbose #1141 > > then "wasm32-unknown-unknown/release" 00:01:05 verbose #1142 > > else "debug" 00:01:05 verbose #1143 > > 00:01:05 verbose #1144 > > [[ ".d"; ".exe"; ".pdb"; ".wasm"; "" ]] 00:01:05 verbose #1145 > > |> listm.map fun ext => 00:01:05 verbose #1146 > > workspace_dir </> 00:01:05 verbose #1147 > > $'$"target/{!build_target}/spiral_builder_{!hash_hex}{!ext}"' 00:01:05 verbose #1148 > > |> listm.map fun path => path, path |> file_system.file_exists 00:01:05 verbose #1149 > > 00:01:05 verbose #1150 > > trace Verbose 00:01:05 verbose #1151 > > fun () => "spiral_builder.process_rust / cleanup" 00:01:05 verbose #1152 > > fun () => { new_code_path cleanup } 00:01:05 verbose #1153 > > 00:01:05 verbose #1154 > > cleanup 00:01:05 verbose #1155 > > |> listm'.filter snd 00:01:05 verbose #1156 > > |> listm.iter (fst >> file_system.file_delete) 00:01:05 verbose #1157 > > 00:01:05 verbose #1158 > > result 00:01:05 verbose #1159 > > 00:01:05 verbose #1160 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:05 verbose #1161 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:05 verbose #1162 > > │ ## dib │ 00:01:05 verbose #1163 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:05 verbose #1164 > > 00:01:05 verbose #1165 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:05 verbose #1166 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:05 verbose #1167 > > │ ### process_dib │ 00:01:05 verbose #1168 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:05 verbose #1169 > > 00:01:05 verbose #1170 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:05 verbose #1171 > > inl process_dib { path retries working_directory } = 00:01:05 verbose #1172 > > inl exit_code, repl_result = 00:01:05 verbose #1173 > > let rec loop retry = 00:01:05 verbose #1174 > > inl exit_code, repl_result = 00:01:05 verbose #1175 > > runtime.execution_options fun x => { x with 00:01:05 verbose #1176 > > command = $'$"dotnet repl --exit-after-run --run 00:01:05 verbose #1177 > > \\\"{!path}\\\" --output-path \\\"{!path}.ipynb\\\""' 00:01:05 verbose #1178 > > environment_variables = ;[[ 00:01:05 verbose #1179 > > "TRACE_LEVEL", "Verbose" 00:01:05 verbose #1180 > > "AUTOMATION", "True" 00:01:05 verbose #1181 > > ]] 00:01:05 verbose #1182 > > trace = false 00:01:05 verbose #1183 > > working_directory = working_directory |> optionm'.box 00:01:05 verbose #1184 > > } 00:01:05 verbose #1185 > > |> runtime.execute_with_options 00:01:05 verbose #1186 > > 00:01:05 verbose #1187 > > if exit_code = 0 || retry >= retries 00:01:05 verbose #1188 > > then exit_code, repl_result 00:01:05 verbose #1189 > > else 00:01:05 verbose #1190 > > trace Debug 00:01:05 verbose #1191 > > fun () => $'"spiral_builder.run / repl error"' 00:01:05 verbose #1192 > > fun () => { exit_code repl_result retry = 00:01:05 verbose #1193 > > $'$"{!retry}/{!retries}"' : string } 00:01:05 verbose #1194 > > loop (retry + 1) 00:01:05 verbose #1195 > > loop 1 00:01:05 verbose #1196 > > 00:01:05 verbose #1197 > > inl exit_code, result = 00:01:05 verbose #1198 > > if exit_code <>. 0 00:01:05 verbose #1199 > > then exit_code, repl_result 00:01:05 verbose #1200 > > else 00:01:05 verbose #1201 > > inl exit_code, jupyter_result = 00:01:05 verbose #1202 > > runtime.execution_options fun x => { x with 00:01:05 verbose #1203 > > command = $'$"jupyter nbconvert \\\"{!path}.ipynb\\\" --to 00:01:05 verbose #1204 > > html --HTMLExporter.theme=dark"' 00:01:05 verbose #1205 > > } 00:01:05 verbose #1206 > > |> runtime.execute_with_options 00:01:05 verbose #1207 > > 00:01:05 verbose #1208 > > trace Debug 00:01:05 verbose #1209 > > fun () => $'"spiral_builder.run / dib / jupyter nbconvert"' 00:01:05 verbose #1210 > > fun () => { exit_code jupyter_result_length = jupyter_result |> 00:01:05 verbose #1211 > > sm'.length : i32 } 00:01:05 verbose #1212 > > 00:01:05 verbose #1213 > > if exit_code <>. 0 00:01:05 verbose #1214 > > then exit_code, $'$"repl_result: {!repl_result}\n\njupyter_result: 00:01:05 verbose #1215 > > {!jupyter_result}"' 00:01:05 verbose #1216 > > else 00:01:05 verbose #1217 > > inl exit_code, pwsh_replace_html_result = 00:01:05 verbose #1218 > > inl path = path |> sm'.replace "'" "''" 00:01:05 verbose #1219 > > runtime.execution_options fun x => { x with 00:01:05 verbose #1220 > > command = $'$"pwsh -c \\\"$counter = 1; $path = 00:01:05 verbose #1221 > > \'{!path}.html\'; (Get-Content $path -Raw) -replace 00:01:05 verbose #1222 > > \'(id=\\\\\\"cell-id=)[[a-fA-F0-9]]{{8}}\', {{ $_.Groups[[1]].Value + $counter++ 00:01:05 verbose #1223 > > }} | Set-Content $path\\\""' 00:01:05 verbose #1224 > > } 00:01:05 verbose #1225 > > |> runtime.execute_with_options 00:01:05 verbose #1226 > > 00:01:05 verbose #1227 > > trace Debug 00:01:05 verbose #1228 > > fun () => $'"spiral_builder.run / dib / html cell ids"' 00:01:05 verbose #1229 > > fun () => { exit_code pwsh_replace_html_result_length = 00:01:05 verbose #1230 > > pwsh_replace_html_result |> sm'.length : i32 } 00:01:05 verbose #1231 > > 00:01:05 verbose #1232 > > $'$"{!path}.html"' 00:01:05 verbose #1233 > > |> file_system.read_all_text 00:01:05 verbose #1234 > > |> sm'.replace "\r\n" "\n" 00:01:05 verbose #1235 > > |> file_system.write_all_text $'$"{!path}.html"' 00:01:05 verbose #1236 > > 00:01:05 verbose #1237 > > $'$"{!path}.ipynb"' 00:01:05 verbose #1238 > > |> file_system.read_all_text 00:01:05 verbose #1239 > > |> sm'.replace "\r\n" "\n" 00:01:05 verbose #1240 > > |> sm'.replace "\\r\\n" "\\n" 00:01:05 verbose #1241 > > |> file_system.write_all_text $'$"{!path}.ipynb"' 00:01:05 verbose #1242 > > 00:01:05 verbose #1243 > > exit_code, $'$"repl_result: {!repl_result}\n\njupyter_result: 00:01:05 verbose #1244 > > {!jupyter_result}\n\npwsh_replace_html_result: {!pwsh_replace_html_result}"' 00:01:05 verbose #1245 > > 00:01:05 verbose #1246 > > trace Debug 00:01:05 verbose #1247 > > fun () => $'"spiral_builder.run / dib"' 00:01:05 verbose #1248 > > fun () => { exit_code result_length = result |> sm'.length : i32 } 00:01:05 verbose #1249 > > 00:01:05 verbose #1250 > > if exit_code <>. 0 00:01:05 verbose #1251 > > then failwith $'$"spiral_builder.run / dib / exit_code: {!exit_code} 00:01:05 verbose #1252 > > result: {!result}"' 00:01:05 verbose #1253 > > ;[[ 00:01:05 verbose #1254 > > "stdio", 00:01:05 verbose #1255 > > result 00:01:05 verbose #1256 > > ]] 00:01:06 verbose #1257 > > 00:01:06 verbose #1258 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:06 verbose #1259 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:06 verbose #1260 > > │ ## typescript │ 00:01:06 verbose #1261 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:06 verbose #1262 > > 00:01:06 verbose #1263 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:06 verbose #1264 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:06 verbose #1265 > > │ ### process_typescript │ 00:01:06 verbose #1266 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:06 verbose #1267 > > 00:01:06 verbose #1268 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:06 verbose #1269 > > inl process_typescript { fs_path deps trace_level } = 00:01:06 verbose #1270 > > inl extension = "ts" 00:01:06 verbose #1271 > > inl is_trace = trace_level = Verbose 00:01:06 verbose #1272 > > inl _trace (fn : () -> string) = 00:01:06 verbose #1273 > > if is_trace 00:01:06 verbose #1274 > > then trace Info (fun () => $'$"spiral_builder.process_typescript / {!fn 00:01:06 verbose #1275 > > ()}"') id 00:01:06 verbose #1276 > > else fn () |> console.write_line 00:01:06 verbose #1277 > > 00:01:06 verbose #1278 > > inl code = fs_path |> file_system.read_all_text 00:01:06 verbose #1279 > > 00:01:06 verbose #1280 > > inl hash_hex = (extension, code) |> sm'.format_debug |> crypto.hash_text 00:01:06 verbose #1281 > > 00:01:06 verbose #1282 > > inl workspace_name = "spiral_builder" 00:01:06 verbose #1283 > > 00:01:06 verbose #1284 > > inl workspace_root_external = file_system.get_workspace_root_external () 00:01:06 verbose #1285 > > inl workspace_root = workspace_root_external |> resultm.box |> 00:01:06 verbose #1286 > > resultm.unwrap_or_else id 00:01:06 verbose #1287 > > 00:01:06 verbose #1288 > > inl package_dir = 00:01:06 verbose #1289 > > get_package_dir 00:01:06 verbose #1290 > > { workspace_root name = workspace_name; target = Some TypeScript; 00:01:06 verbose #1291 > > hash = Some hash_hex } 00:01:06 verbose #1292 > > 00:01:06 verbose #1293 > > inl fsproj_path = 00:01:06 verbose #1294 > > persist_code_project 00:01:06 verbose #1295 > > { 00:01:06 verbose #1296 > > workspace_root 00:01:06 verbose #1297 > > package_dir 00:01:06 verbose #1298 > > packages = [[ "Fable.Core" ]] 00:01:06 verbose #1299 > > modules = [[]] 00:01:06 verbose #1300 > > name = workspace_name 00:01:06 verbose #1301 > > code 00:01:06 verbose #1302 > > } 00:01:06 verbose #1303 > > 00:01:06 verbose #1304 > > inl lib_path = workspace_root </> "lib/typescript/fable/fable_modules" 00:01:06 verbose #1305 > > 00:01:06 verbose #1306 > > inl versions : _ (string * string) = 00:01:06 verbose #1307 > > lib_path 00:01:06 verbose #1308 > > |> file_system.new_walk_dir 00:01:06 verbose #1309 > > |> file_system.walk_dir_filter fun entry => async.new_future_move_send 00:01:06 verbose #1310 > > fun () => 00:01:06 verbose #1311 > > entry 00:01:06 verbose #1312 > > |> file_system.dir_entry_file_type 00:01:06 verbose #1313 > > |> async.await_send 00:01:06 verbose #1314 > > |> resultm.map_error' sm'.format' 00:01:06 verbose #1315 > > |> resultm.unbox 00:01:06 verbose #1316 > > |> function 00:01:06 verbose #1317 > > | Ok file_type when file_type |> file_system.file_type_is_dir |> 00:01:06 verbose #1318 > > not => file_system.Ignore 00:01:06 verbose #1319 > > | _ => 00:01:06 verbose #1320 > > inl path = 00:01:06 verbose #1321 > > entry 00:01:06 verbose #1322 > > |> file_system.dir_entry_path 00:01:06 verbose #1323 > > |> file_system.path_buf_display 00:01:06 verbose #1324 > > |> sm'.format' 00:01:06 verbose #1325 > > |> sm'.from_std_string 00:01:06 verbose #1326 > > if path |> file_system.get_directory_name |> sm'.starts_with 00:01:06 verbose #1327 > > "fable-library-ts." 00:01:06 verbose #1328 > > then file_system.Continue 00:01:06 verbose #1329 > > else file_system.IgnoreDir 00:01:06 verbose #1330 > > |> async.stream_filter_map fun (entry : _ _ 00:01:06 verbose #1331 > > file_system.async_walkdir_error) => 00:01:06 verbose #1332 > > inl entry = entry |> resultm.map_error' sm'.format' |> resultm.unbox 00:01:06 verbose #1333 > > match entry with 00:01:06 verbose #1334 > > | Ok entry => 00:01:06 verbose #1335 > > inl path = 00:01:06 verbose #1336 > > entry 00:01:06 verbose #1337 > > |> file_system.dir_entry_path 00:01:06 verbose #1338 > > |> file_system.path_buf_display 00:01:06 verbose #1339 > > |> sm'.format' 00:01:06 verbose #1340 > > |> sm'.from_std_string 00:01:06 verbose #1341 > > inl version = 00:01:06 verbose #1342 > > $'$"fable-library-{!extension}\\.(?<a>[[\\d.]]+)$"' 00:01:06 verbose #1343 > > |> sm'.new_regex 00:01:06 verbose #1344 > > |> resultm.unwrap' 00:01:06 verbose #1345 > > |> sm'.regex_captures path 00:01:06 verbose #1346 > > |> am'.from_vec 00:01:06 verbose #1347 > > |> fun x => x : _ i32 _ 00:01:06 verbose #1348 > > |> am'.try_item 0 00:01:06 verbose #1349 > > |> optionm.map (mapm.get "a" >> optionm'.unbox) 00:01:06 verbose #1350 > > |> optionm'.flatten 00:01:06 verbose #1351 > > match version with 00:01:06 verbose #1352 > > | None => None 00:01:06 verbose #1353 > > | Some version => Some (path, version) 00:01:06 verbose #1354 > > | Error error => 00:01:06 verbose #1355 > > trace Critical 00:01:06 verbose #1356 > > fun () => $'"spiral_builder.process_typescript 00:01:06 verbose #1357 > > stream_filter_map"' 00:01:06 verbose #1358 > > fun () => { error } 00:01:06 verbose #1359 > > None 00:01:06 verbose #1360 > > |> optionm'.box 00:01:06 verbose #1361 > > |> async.stream_collect 00:01:06 verbose #1362 > > |> async.await 00:01:06 verbose #1363 > > |> async.into_par_iter 00:01:06 verbose #1364 > > |> async.par_map id 00:01:06 verbose #1365 > > |> async.par_collect 00:01:06 verbose #1366 > > 00:01:06 verbose #1367 > > inl version = 00:01:06 verbose #1368 > > versions 00:01:06 verbose #1369 > > |> am'.from_vec 00:01:06 verbose #1370 > > |> fun x => x : _ i32 _ 00:01:06 verbose #1371 > > |> am'.try_item 0 00:01:06 verbose #1372 > > 00:01:06 verbose #1373 > > trace Debug 00:01:06 verbose #1374 > > fun () => $'"spiral_builder.process_typescript"' 00:01:06 verbose #1375 > > fun () => { version } 00:01:06 verbose #1376 > > 00:01:06 verbose #1377 > > match version with 00:01:06 verbose #1378 > > | None => () 00:01:06 verbose #1379 > > | Some (_path, version) => 00:01:06 verbose #1380 > > inl lib_link_target_path = lib_path </> 00:01:06 verbose #1381 > > $'$"fable-library-{!extension}.{!version}"' 00:01:06 verbose #1382 > > inl lib_link_path = package_dir </> 00:01:06 verbose #1383 > > $'$"fable_modules/fable-library-{!extension}.{!version}"' 00:01:06 verbose #1384 > > 00:01:06 verbose #1385 > > lib_link_path |> file_system.link_directory lib_link_target_path 00:01:06 verbose #1386 > > 00:01:06 verbose #1387 > > inl exit_code, dotnet_fable_result = 00:01:06 verbose #1388 > > execute_dotnet_fable { workspace_root_external fsproj_path extension 00:01:06 verbose #1389 > > package_dir runtime = None } 00:01:06 verbose #1390 > > 00:01:06 verbose #1391 > > if exit_code <>. 0 then 00:01:06 verbose #1392 > > trace Critical 00:01:06 verbose #1393 > > fun () => $'$"spiral_builder.process_typescript"' 00:01:06 verbose #1394 > > fun () => { exit_code dotnet_fable_result } 00:01:06 verbose #1395 > > { extension = Some extension; code = None; output = Some 00:01:06 verbose #1396 > > dotnet_fable_result } 00:01:06 verbose #1397 > > else 00:01:06 verbose #1398 > > inl deps = 00:01:06 verbose #1399 > > deps 00:01:06 verbose #1400 > > |> am'.vec_map fun dep => 00:01:06 verbose #1401 > > inl dep = dep |> sm'.from_std_string 00:01:06 verbose #1402 > > if dep |> sm'.contains "=" 00:01:06 verbose #1403 > > then dep 00:01:06 verbose #1404 > > else $'$"\\"{!dep}\\":\\"*\\""' 00:01:06 verbose #1405 > > |> am'.from_vec 00:01:06 verbose #1406 > > |> fun x => x : _ i32 _ 00:01:06 verbose #1407 > > |> seq.of_array' 00:01:06 verbose #1408 > > |> sm'.concat ",\n" 00:01:06 verbose #1409 > > 00:01:06 verbose #1410 > > inl package_json_content = 00:01:06 verbose #1411 > > $'$"{{"' 00:01:06 verbose #1412 > > +. $'$" \\\"name\\\": \\\"spiral_builder_{!hash_hex}\\\","' 00:01:06 verbose #1413 > > +. $'$" \\\"dependencies\\\": {{"' 00:01:06 verbose #1414 > > +. deps 00:01:06 verbose #1415 > > +. $'$" }},"' 00:01:06 verbose #1416 > > +. $'$" \\\"devDependencies\\\": {{"' 00:01:06 verbose #1417 > > +. $'$" }},"' 00:01:06 verbose #1418 > > +. $'$"}}"' 00:01:06 verbose #1419 > > 00:01:06 verbose #1420 > > inl workspace_package_json_content = 00:01:06 verbose #1421 > > "" 00:01:06 verbose #1422 > > 00:01:06 verbose #1423 > > inl package_json_path = package_dir </> "package.json" 00:01:06 verbose #1424 > > 00:01:06 verbose #1425 > > inl workspace_dir = package_dir </> "../.." 00:01:06 verbose #1426 > > inl workspace_package_json_path = workspace_dir </> "package.json" 00:01:06 verbose #1427 > > 00:01:06 verbose #1428 > > package_json_content |> file_system.write_all_text_exists 00:01:06 verbose #1429 > > package_json_path 00:01:06 verbose #1430 > > 00:01:06 verbose #1431 > > workspace_package_json_content |> file_system.write_all_text_exists 00:01:06 verbose #1432 > > workspace_package_json_path 00:01:06 verbose #1433 > > 00:01:06 verbose #1434 > > inl new_code_path = package_dir </> $'$"{!workspace_name}.{!extension}"' 00:01:06 verbose #1435 > > trace Debug 00:01:06 verbose #1436 > > fun () => $'"spiral_builder.process_typescript"' 00:01:06 verbose #1437 > > fun () => { new_code_path } 00:01:06 verbose #1438 > > inl new_code = new_code_path |> file_system.read_all_text 00:01:06 verbose #1439 > > 00:01:06 verbose #1440 > > inl main_code_header = 00:01:06 verbose #1441 > > "// spiral_builder.process_typescript" 00:01:06 verbose #1442 > > inl main_code = "// spiral_builder.process_typescript" 00:01:06 verbose #1443 > > 00:01:06 verbose #1444 > > inl cached = new_code |> sm'.contains main_code_header 00:01:06 verbose #1445 > > 00:01:06 verbose #1446 > > inl new_code = 00:01:06 verbose #1447 > > if cached 00:01:06 verbose #1448 > > then new_code 00:01:06 verbose #1449 > > else 00:01:06 verbose #1450 > > new_code 00:01:06 verbose #1451 > > |> sm'.replace 00:01:06 verbose #1452 > > $'$"\\\"./fable_modules/fable-library-ts.{!version}/"' 00:01:06 verbose #1453 > > 00:01:06 verbose #1454 > > $'$"\\\"{!workspace_root}/lib/typescript/fable/fable_modules/fable-library-ts.{! 00:01:06 verbose #1455 > > version}/"' 00:01:06 verbose #1456 > > |> sm'.replace_regex 00:01:06 verbose #1457 > > "\\s\\sdefaultOf\\(\\);" 00:01:06 verbose #1458 > > " defaultOf::<()>();" 00:01:06 verbose #1459 > > 00:01:06 verbose #1460 > > if not cached then 00:01:06 verbose #1461 > > $'$"{!new_code}\\n\\n{!main_code}\\n"' 00:01:06 verbose #1462 > > |> file_system.write_all_text_exists new_code_path 00:01:06 verbose #1463 > > 00:01:06 verbose #1464 > > inl command = $'$"bun run \\\"{!new_code_path}\\\""' 00:01:06 verbose #1465 > > inl environment_variables = 00:01:06 verbose #1466 > > match "~/.bun/bin" |> env.append_path with 00:01:06 verbose #1467 > > | Some path => [[ "PATH", path ]] 00:01:06 verbose #1468 > > | None => [[]] 00:01:06 verbose #1469 > > ++ [[ 00:01:06 verbose #1470 > > "TRACE_LEVEL", "Verbose" 00:01:06 verbose #1471 > > ]] 00:01:06 verbose #1472 > > |> listm'.box 00:01:06 verbose #1473 > > |> listm'.to_array' 00:01:06 verbose #1474 > > inl exit_code, run_result = 00:01:06 verbose #1475 > > runtime.execution_options fun x => { x with 00:01:06 verbose #1476 > > command 00:01:06 verbose #1477 > > environment_variables 00:01:06 verbose #1478 > > working_directory = workspace_root_external |> resultm.box |> 00:01:06 verbose #1479 > > resultm.ok' 00:01:06 verbose #1480 > > } 00:01:06 verbose #1481 > > |> runtime.execute_with_options 00:01:06 verbose #1482 > > 00:01:06 verbose #1483 > > inl external_command = 00:01:06 verbose #1484 > > inl vars = 00:01:06 verbose #1485 > > a environment_variables 00:01:06 verbose #1486 > > |> am.map fun k, v => $'$"$env:{!k}=\'\'{!v}\'\'"' : string 00:01:06 verbose #1487 > > |> fun x => x : _ i32 _ 00:01:06 verbose #1488 > > |> seq.of_array 00:01:06 verbose #1489 > > |> sm'.concat ";" 00:01:06 verbose #1490 > > $'$"pwsh -c \'{!vars}; {!command}\'"' : string 00:01:06 verbose #1491 > > if exit_code = 0 then 00:01:06 verbose #1492 > > inl output = 00:01:06 verbose #1493 > > try 00:01:06 verbose #1494 > > fun () => 00:01:06 verbose #1495 > > run_result 00:01:06 verbose #1496 > > |> sm'.split "\n" 00:01:06 verbose #1497 > > |> fun x => a x : _ i32 _ 00:01:06 verbose #1498 > > |> seq.of_array 00:01:06 verbose #1499 > > |> sm'.concat "\n" 00:01:06 verbose #1500 > > fun ex => 00:01:06 verbose #1501 > > trace Critical 00:01:06 verbose #1502 > > fun () => "spiral_builder.process_typescript 00:01:06 verbose #1503 > > Exception" 00:01:06 verbose #1504 > > fun () => { ex new_code_path external_command 00:01:06 verbose #1505 > > run_result } 00:01:06 verbose #1506 > > None 00:01:06 verbose #1507 > > |> optionm'.box 00:01:06 verbose #1508 > > |> optionm'.unwrap 00:01:06 verbose #1509 > > 00:01:06 verbose #1510 > > { extension = Some extension; code = Some new_code; output = Some 00:01:06 verbose #1511 > > output } 00:01:06 verbose #1512 > > else 00:01:06 verbose #1513 > > trace Critical 00:01:06 verbose #1514 > > fun () => "spiral_builder.process_typescript / error" 00:01:06 verbose #1515 > > fun () => { exit_code run_result new_code_path external_command 00:01:06 verbose #1516 > > } 00:01:06 verbose #1517 > > { extension = Some extension; code = None; output = None } 00:01:07 verbose #1518 > > 00:01:07 verbose #1519 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:07 verbose #1520 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:07 verbose #1521 > > │ ## python │ 00:01:07 verbose #1522 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:07 verbose #1523 > > 00:01:07 verbose #1524 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:07 verbose #1525 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:07 verbose #1526 > > │ ### process_python │ 00:01:07 verbose #1527 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:07 verbose #1528 > > 00:01:07 verbose #1529 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:07 verbose #1530 > > inl process_python { fs_path deps trace_level } = 00:01:07 verbose #1531 > > inl extension = "py" 00:01:07 verbose #1532 > > inl is_trace = trace_level = Verbose 00:01:07 verbose #1533 > > inl _trace (fn : () -> string) = 00:01:07 verbose #1534 > > if is_trace 00:01:07 verbose #1535 > > then trace Info (fun () => $'$"spiral_builder.process_python / {!fn 00:01:07 verbose #1536 > > ()}"') id 00:01:07 verbose #1537 > > else fn () |> console.write_line 00:01:07 verbose #1538 > > 00:01:07 verbose #1539 > > inl code = fs_path |> file_system.read_all_text 00:01:07 verbose #1540 > > 00:01:07 verbose #1541 > > inl hash_hex = (extension, code) |> sm'.format_debug |> crypto.hash_text 00:01:07 verbose #1542 > > 00:01:07 verbose #1543 > > inl workspace_name = "spiral_builder" 00:01:07 verbose #1544 > > 00:01:07 verbose #1545 > > inl workspace_root_external = file_system.get_workspace_root_external () 00:01:07 verbose #1546 > > inl workspace_root = workspace_root_external |> resultm.box |> 00:01:07 verbose #1547 > > resultm.unwrap_or_else id 00:01:07 verbose #1548 > > 00:01:07 verbose #1549 > > inl package_dir = 00:01:07 verbose #1550 > > get_package_dir { workspace_root name = workspace_name; target = Some 00:01:07 verbose #1551 > > Python; hash = Some hash_hex } 00:01:07 verbose #1552 > > 00:01:07 verbose #1553 > > inl fsproj_path = 00:01:07 verbose #1554 > > persist_code_project 00:01:07 verbose #1555 > > { 00:01:07 verbose #1556 > > workspace_root 00:01:07 verbose #1557 > > package_dir 00:01:07 verbose #1558 > > packages = [[ "Fable.Core" ]] 00:01:07 verbose #1559 > > modules = [[]] 00:01:07 verbose #1560 > > name = workspace_name 00:01:07 verbose #1561 > > code 00:01:07 verbose #1562 > > } 00:01:07 verbose #1563 > > 00:01:07 verbose #1564 > > inl lib_path = workspace_root </> "lib/python/fable/fable_modules" 00:01:07 verbose #1565 > > 00:01:07 verbose #1566 > > inl lib_link_target_path = lib_path </> $'$"fable_library"' 00:01:07 verbose #1567 > > inl lib_link_path = package_dir </> $'$"fable_modules/fable_library"' 00:01:07 verbose #1568 > > 00:01:07 verbose #1569 > > lib_link_path |> file_system.link_directory lib_link_target_path 00:01:07 verbose #1570 > > 00:01:07 verbose #1571 > > inl exit_code, dotnet_fable_result = 00:01:07 verbose #1572 > > execute_dotnet_fable { workspace_root_external fsproj_path extension 00:01:07 verbose #1573 > > package_dir runtime = None } 00:01:07 verbose #1574 > > 00:01:07 verbose #1575 > > if exit_code <>. 0 then 00:01:07 verbose #1576 > > trace Critical 00:01:07 verbose #1577 > > fun () => $'$"spiral_builder.process_python"' 00:01:07 verbose #1578 > > fun () => { exit_code dotnet_fable_result } 00:01:07 verbose #1579 > > { extension = Some extension; code = None; output = Some 00:01:07 verbose #1580 > > dotnet_fable_result } 00:01:07 verbose #1581 > > else 00:01:07 verbose #1582 > > inl deps = 00:01:07 verbose #1583 > > deps 00:01:07 verbose #1584 > > |> am'.vec_map fun dep => 00:01:07 verbose #1585 > > inl dep = dep |> sm'.from_std_string 00:01:07 verbose #1586 > > if dep |> sm'.contains "=" 00:01:07 verbose #1587 > > then dep 00:01:07 verbose #1588 > > else $'$"\\"{!dep}\\":\\"*\\""' 00:01:07 verbose #1589 > > |> am'.from_vec 00:01:07 verbose #1590 > > |> fun x => x : _ i32 _ 00:01:07 verbose #1591 > > |> seq.of_array' 00:01:07 verbose #1592 > > |> sm'.concat ",\n" 00:01:07 verbose #1593 > > 00:01:07 verbose #1594 > > inl package_json_content = 00:01:07 verbose #1595 > > $'$"{{"' 00:01:07 verbose #1596 > > +. $'$" \\\"name\\\": \\\"spiral_builder_{!hash_hex}\\\","' 00:01:07 verbose #1597 > > +. $'$" \\\"dependencies\\\": {{"' 00:01:07 verbose #1598 > > +. deps 00:01:07 verbose #1599 > > +. $'$" }},"' 00:01:07 verbose #1600 > > +. $'$" \\\"devDependencies\\\": {{"' 00:01:07 verbose #1601 > > +. $'$" }},"' 00:01:07 verbose #1602 > > +. $'$"}}"' 00:01:07 verbose #1603 > > 00:01:07 verbose #1604 > > inl workspace_package_json_content = 00:01:07 verbose #1605 > > "" 00:01:07 verbose #1606 > > 00:01:07 verbose #1607 > > inl package_json_path = package_dir </> "package.json" 00:01:07 verbose #1608 > > 00:01:07 verbose #1609 > > inl workspace_dir = package_dir </> "../.." 00:01:07 verbose #1610 > > inl workspace_package_json_path = workspace_dir </> "package.json" 00:01:07 verbose #1611 > > 00:01:07 verbose #1612 > > package_json_content |> file_system.write_all_text_exists 00:01:07 verbose #1613 > > package_json_path 00:01:07 verbose #1614 > > 00:01:07 verbose #1615 > > workspace_package_json_content |> file_system.write_all_text_exists 00:01:07 verbose #1616 > > workspace_package_json_path 00:01:07 verbose #1617 > > 00:01:07 verbose #1618 > > inl new_code_path = package_dir </> $'$"{!workspace_name}.{!extension}"' 00:01:07 verbose #1619 > > trace Debug 00:01:07 verbose #1620 > > fun () => $'"spiral_builder.process_python"' 00:01:07 verbose #1621 > > fun () => { new_code_path } 00:01:07 verbose #1622 > > inl new_code = new_code_path |> file_system.read_all_text 00:01:07 verbose #1623 > > 00:01:07 verbose #1624 > > inl main_code_header = 00:01:07 verbose #1625 > > "# spiral_builder.process_python" 00:01:07 verbose #1626 > > inl main_code = "# spiral_builder.process_python" 00:01:07 verbose #1627 > > 00:01:07 verbose #1628 > > inl cached = new_code |> sm'.contains main_code_header 00:01:07 verbose #1629 > > 00:01:07 verbose #1630 > > inl new_code = 00:01:07 verbose #1631 > > if cached 00:01:07 verbose #1632 > > then new_code 00:01:07 verbose #1633 > > else 00:01:07 verbose #1634 > > new_code 00:01:07 verbose #1635 > > |> sm'.replace 00:01:07 verbose #1636 > > ("),)" +. !\($'"\\\";\\\".into()"')) 00:01:07 verbose #1637 > > "));" 00:01:07 verbose #1638 > > |> sm'.replace_regex 00:01:07 verbose #1639 > > "\\s\\sdefaultOf\\(\\);" 00:01:07 verbose #1640 > > " defaultOf::<()>();" 00:01:07 verbose #1641 > > 00:01:07 verbose #1642 > > if not cached 00:01:07 verbose #1643 > > then 00:01:07 verbose #1644 > > $'$"{!new_code}\\n\\n{!main_code}\\n"' 00:01:07 verbose #1645 > > |> file_system.write_all_text_exists new_code_path 00:01:07 verbose #1646 > > 00:01:07 verbose #1647 > > inl command = $'$"python \\\"{!new_code_path}\\\""' 00:01:07 verbose #1648 > > inl environment_variables = 00:01:07 verbose #1649 > > ;[[ 00:01:07 verbose #1650 > > "TRACE_LEVEL", "Verbose" 00:01:07 verbose #1651 > > ]] 00:01:07 verbose #1652 > > inl exit_code, run_result = 00:01:07 verbose #1653 > > runtime.execution_options fun x => { x with 00:01:07 verbose #1654 > > command 00:01:07 verbose #1655 > > environment_variables 00:01:07 verbose #1656 > > working_directory = workspace_root_external |> resultm.box |> 00:01:07 verbose #1657 > > resultm.ok' 00:01:07 verbose #1658 > > } 00:01:07 verbose #1659 > > |> runtime.execute_with_options 00:01:07 verbose #1660 > > 00:01:07 verbose #1661 > > inl external_command = 00:01:07 verbose #1662 > > inl vars = 00:01:07 verbose #1663 > > a environment_variables 00:01:07 verbose #1664 > > |> am.map fun k, v => $'$"$env:{!k}=\'\'{!v}\'\'"' : string 00:01:07 verbose #1665 > > |> fun x => x : _ i32 _ 00:01:07 verbose #1666 > > |> seq.of_array 00:01:07 verbose #1667 > > |> sm'.concat ";" 00:01:07 verbose #1668 > > $'$"pwsh -c \'{!vars}; {!command}\'"' : string 00:01:07 verbose #1669 > > if exit_code = 0 then 00:01:07 verbose #1670 > > inl output = 00:01:07 verbose #1671 > > try 00:01:07 verbose #1672 > > fun () => 00:01:07 verbose #1673 > > run_result 00:01:07 verbose #1674 > > |> sm'.split "\n" 00:01:07 verbose #1675 > > |> fun x => a x : _ i32 _ 00:01:07 verbose #1676 > > |> seq.of_array 00:01:07 verbose #1677 > > |> sm'.concat "\n" 00:01:07 verbose #1678 > > fun ex => 00:01:07 verbose #1679 > > trace Critical 00:01:07 verbose #1680 > > fun () => "spiral_builder.process_python 00:01:07 verbose #1681 > > Exception" 00:01:07 verbose #1682 > > fun () => { ex new_code_path external_command 00:01:07 verbose #1683 > > run_result } 00:01:07 verbose #1684 > > None 00:01:07 verbose #1685 > > |> optionm'.box 00:01:07 verbose #1686 > > |> optionm'.unwrap 00:01:07 verbose #1687 > > 00:01:07 verbose #1688 > > { extension = Some extension; code = Some new_code; output = Some 00:01:07 verbose #1689 > > output } 00:01:07 verbose #1690 > > else 00:01:07 verbose #1691 > > trace Critical 00:01:07 verbose #1692 > > fun () => "spiral_builder.process_python / error" 00:01:07 verbose #1693 > > fun () => { exit_code run_result new_code_path external_command 00:01:07 verbose #1694 > > } 00:01:07 verbose #1695 > > { extension = Some extension; code = None; output = None } 00:01:08 verbose #1696 > > 00:01:08 verbose #1697 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:08 verbose #1698 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:08 verbose #1699 > > │ ## cuda │ 00:01:08 verbose #1700 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:08 verbose #1701 > > 00:01:08 verbose #1702 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:08 verbose #1703 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:08 verbose #1704 > > │ ### process_cuda │ 00:01:08 verbose #1705 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:08 verbose #1706 > > 00:01:08 verbose #1707 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:08 verbose #1708 > > inl process_cuda { py_path env deps } = 00:01:08 verbose #1709 > > inl extension = "py" 00:01:08 verbose #1710 > > 00:01:08 verbose #1711 > > inl new_code_path = py_path 00:01:08 verbose #1712 > > inl new_code = new_code_path |> file_system.read_all_text 00:01:08 verbose #1713 > > 00:01:08 verbose #1714 > > inl workspace_root_external = file_system.get_workspace_root_external () 00:01:08 verbose #1715 > > inl workspace_root = workspace_root_external |> resultm.box |> 00:01:08 verbose #1716 > > resultm.unwrap_or_else id 00:01:08 verbose #1717 > > 00:01:08 verbose #1718 > > inl package_dir = new_code_path |> file_system.get_directory_name 00:01:08 verbose #1719 > > 00:01:08 verbose #1720 > > inl manifest_path = 00:01:08 verbose #1721 > > match env with 00:01:08 verbose #1722 > > | Pip => package_dir </> "requirements.txt" 00:01:08 verbose #1723 > > | Poetry => package_dir </> "pyproject.toml" 00:01:08 verbose #1724 > > 00:01:08 verbose #1725 > > inl deps = 00:01:08 verbose #1726 > > deps 00:01:08 verbose #1727 > > |> am'.vec_map fun dep => 00:01:08 verbose #1728 > > inl dep = dep |> sm'.from_std_string 00:01:08 verbose #1729 > > if dep |> sm'.contains "=" 00:01:08 verbose #1730 > > then dep 00:01:08 verbose #1731 > > elif dep |> sm'.ends_with "]]" 00:01:08 verbose #1732 > > then dep |> sm'.replace "[[" $'$"={{version=\'*\',features=[["' |> 00:01:08 verbose #1733 > > fun x => $'$"{!x}}}"' 00:01:08 verbose #1734 > > else $'$"{!dep}=\'*\'"' 00:01:08 verbose #1735 > > |> am'.from_vec 00:01:08 verbose #1736 > > |> fun x => x : _ i32 _ 00:01:08 verbose #1737 > > |> seq.of_array' 00:01:08 verbose #1738 > > |> sm'.concat "\n" 00:01:08 verbose #1739 > > 00:01:08 verbose #1740 > > inl exit_code, run_result = 00:01:08 verbose #1741 > > if deps = "" 00:01:08 verbose #1742 > > then 0, "" 00:01:08 verbose #1743 > > else 00:01:08 verbose #1744 > > inl manifest = 00:01:08 verbose #1745 > > match env with 00:01:08 verbose #1746 > > | Pip => 00:01:08 verbose #1747 > > deps 00:01:08 verbose #1748 > > | Poetry => 00:01:08 verbose #1749 > > $'$"[[tool.poetry]]"' 00:01:08 verbose #1750 > > +#. $'$"name = \\\"test\\\""' 00:01:08 verbose #1751 > > +#. $'$"version = \\\"0.0.1\\\""' 00:01:08 verbose #1752 > > +#. $'$"description = \\\"\\\""' 00:01:08 verbose #1753 > > +#. $'$"authors = [[]]"' 00:01:08 verbose #1754 > > +#. $'$""' 00:01:08 verbose #1755 > > +#. $'$"[[tool.poetry.dependencies]]"' 00:01:08 verbose #1756 > > +#. $'$"python=\\\"~3.12\\\""' 00:01:08 verbose #1757 > > +#. $'$"{!deps}"' 00:01:08 verbose #1758 > > +#. $'$""' 00:01:08 verbose #1759 > > +#. $'$"[[build-system]]"' 00:01:08 verbose #1760 > > +#. $'$"requires = [[\\\"poetry-core\\\"]]"' 00:01:08 verbose #1761 > > +#. $'$"build-backend = \\\"poetry.core.masonry.api\\\""' 00:01:08 verbose #1762 > > 00:01:08 verbose #1763 > > manifest |> file_system.write_all_text_exists manifest_path 00:01:08 verbose #1764 > > 00:01:08 verbose #1765 > > runtime.execution_options fun x => { x with 00:01:08 verbose #1766 > > command = 00:01:08 verbose #1767 > > match env with 00:01:08 verbose #1768 > > | Pip => $'$"pip install -r requirements.txt"' 00:01:08 verbose #1769 > > | Poetry => $'$"poetry install"' 00:01:08 verbose #1770 > > working_directory = package_dir |> optionm'.some' 00:01:08 verbose #1771 > > } 00:01:08 verbose #1772 > > |> runtime.execute_with_options 00:01:08 verbose #1773 > > 00:01:08 verbose #1774 > > if exit_code <>. 0 then 00:01:08 verbose #1775 > > trace Critical 00:01:08 verbose #1776 > > fun () => "spiral_builder.process_cuda / env install error" 00:01:08 verbose #1777 > > fun () => { env exit_code run_result new_code_path } 00:01:08 verbose #1778 > > { extension = Some extension; code = None; output = None } 00:01:08 verbose #1779 > > else 00:01:08 verbose #1780 > > inl command = 00:01:08 verbose #1781 > > match env with 00:01:08 verbose #1782 > > | Pip => $'$"python \\\"{!new_code_path}\\\""' 00:01:08 verbose #1783 > > | Poetry => $'$"poetry run python \\\"{!new_code_path}\\\""' 00:01:08 verbose #1784 > > inl environment_variables = 00:01:08 verbose #1785 > > ;[[ 00:01:08 verbose #1786 > > "TRACE_LEVEL", "Verbose" 00:01:08 verbose #1787 > > ]] 00:01:08 verbose #1788 > > inl exit_code, run_result = 00:01:08 verbose #1789 > > runtime.execution_options fun x => { x with 00:01:08 verbose #1790 > > command 00:01:08 verbose #1791 > > environment_variables 00:01:08 verbose #1792 > > working_directory = package_dir |> optionm'.some' 00:01:08 verbose #1793 > > } 00:01:08 verbose #1794 > > |> runtime.execute_with_options 00:01:08 verbose #1795 > > 00:01:08 verbose #1796 > > inl external_command = 00:01:08 verbose #1797 > > inl vars = 00:01:08 verbose #1798 > > a environment_variables 00:01:08 verbose #1799 > > |> am.map fun k, v => $'$"$env:{!k}=\'\'{!v}\'\'"' : string 00:01:08 verbose #1800 > > |> fun x => x : _ i32 _ 00:01:08 verbose #1801 > > |> seq.of_array 00:01:08 verbose #1802 > > |> sm'.concat ";" 00:01:08 verbose #1803 > > $'$"pwsh -c \'{!vars}; {!command}\'"' : string 00:01:08 verbose #1804 > > if exit_code = 0 00:01:08 verbose #1805 > > || (run_result |> sm'.contains 00:01:08 verbose #1806 > > "cupy_backends.cuda.api.runtime.CUDARuntimeError: cudaErrorInsufficientDriver") 00:01:08 verbose #1807 > > then 00:01:08 verbose #1808 > > inl output = 00:01:08 verbose #1809 > > try 00:01:08 verbose #1810 > > fun () => 00:01:08 verbose #1811 > > run_result 00:01:08 verbose #1812 > > |> sm'.split "\n" 00:01:08 verbose #1813 > > |> fun x => a x : _ i32 _ 00:01:08 verbose #1814 > > |> seq.of_array 00:01:08 verbose #1815 > > |> sm'.concat "\n" 00:01:08 verbose #1816 > > fun ex => 00:01:08 verbose #1817 > > trace Critical 00:01:08 verbose #1818 > > fun () => "spiral_builder.process_cuda / Exception" 00:01:08 verbose #1819 > > fun () => { ex run_result new_code_path 00:01:08 verbose #1820 > > external_command } 00:01:08 verbose #1821 > > None 00:01:08 verbose #1822 > > |> optionm'.box 00:01:08 verbose #1823 > > |> optionm'.unwrap 00:01:08 verbose #1824 > > 00:01:08 verbose #1825 > > { extension = Some extension; code = Some new_code; output = Some 00:01:08 verbose #1826 > > output } 00:01:08 verbose #1827 > > else 00:01:08 verbose #1828 > > trace Critical 00:01:08 verbose #1829 > > fun () => "spiral_builder.process_cuda / error" 00:01:08 verbose #1830 > > fun () => { exit_code run_result new_code_path external_command 00:01:08 verbose #1831 > > } 00:01:08 verbose #1832 > > { extension = Some extension; code = None; output = None } 00:01:08 verbose #1833 > > 00:01:08 verbose #1834 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:08 verbose #1835 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:08 verbose #1836 > > │ ## fsharp │ 00:01:08 verbose #1837 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:08 verbose #1838 > > 00:01:08 verbose #1839 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:08 verbose #1840 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:08 verbose #1841 > > │ ### process_fsharp │ 00:01:08 verbose #1842 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:08 verbose #1843 > > 00:01:08 verbose #1844 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:08 verbose #1845 > > inl process_fsharp { spi_path } = 00:01:08 verbose #1846 > > inl extension = "fsx" 00:01:08 verbose #1847 > > 00:01:08 verbose #1848 > > inl new_code_path = spi_path 00:01:08 verbose #1849 > > inl new_code = new_code_path |> file_system.read_all_text 00:01:08 verbose #1850 > > 00:01:08 verbose #1851 > > inl workspace_root_external = file_system.get_workspace_root_external () 00:01:08 verbose #1852 > > inl workspace_root = workspace_root_external |> resultm.box |> 00:01:08 verbose #1853 > > resultm.unwrap_or_else id 00:01:08 verbose #1854 > > 00:01:08 verbose #1855 > > inl supervisor_path = workspace_root </> 00:01:08 verbose #1856 > > $"apps/spiral/dist/Supervisor!(platform.get_executable_suffix ())" 00:01:08 verbose #1857 > > inl code_dir = new_code_path |> file_system.get_directory_name 00:01:08 verbose #1858 > > inl file_name = new_code_path |> file_system.get_file_name_without_extension 00:01:08 verbose #1859 > > inl output_path = code_dir </> $'$"{!file_name}.{!extension}"' 00:01:08 verbose #1860 > > inl command = $'$"{!supervisor_path} --build-file \\\"{!new_code_path}\\\" 00:01:08 verbose #1861 > > \\\"{!output_path}\\\""' 00:01:08 verbose #1862 > > inl environment_variables = 00:01:08 verbose #1863 > > ;[[ 00:01:08 verbose #1864 > > "TRACE_LEVEL", "Verbose" 00:01:08 verbose #1865 > > ]] 00:01:08 verbose #1866 > > inl exit_code, run_result = 00:01:08 verbose #1867 > > runtime.execution_options fun x => { x with 00:01:08 verbose #1868 > > command 00:01:08 verbose #1869 > > environment_variables 00:01:08 verbose #1870 > > working_directory = workspace_root_external |> resultm.box |> 00:01:08 verbose #1871 > > resultm.ok' 00:01:08 verbose #1872 > > } 00:01:08 verbose #1873 > > |> runtime.execute_with_options 00:01:08 verbose #1874 > > 00:01:08 verbose #1875 > > inl external_command = 00:01:08 verbose #1876 > > inl vars = 00:01:08 verbose #1877 > > a environment_variables 00:01:08 verbose #1878 > > |> am.map fun k, v => $'$"$env:{!k}=\'\'{!v}\'\'"' : string 00:01:08 verbose #1879 > > |> fun x => x : _ i32 _ 00:01:08 verbose #1880 > > |> seq.of_array 00:01:08 verbose #1881 > > |> sm'.concat ";" 00:01:08 verbose #1882 > > $'$"pwsh -c \'{!vars}; {!command}\'"' : string 00:01:08 verbose #1883 > > if exit_code = 0 then 00:01:08 verbose #1884 > > inl output = 00:01:08 verbose #1885 > > try 00:01:08 verbose #1886 > > fun () => 00:01:08 verbose #1887 > > run_result 00:01:08 verbose #1888 > > |> sm'.split "\n" 00:01:08 verbose #1889 > > |> fun x => a x : _ i32 _ 00:01:08 verbose #1890 > > |> seq.of_array 00:01:08 verbose #1891 > > |> sm'.concat "\n" 00:01:08 verbose #1892 > > fun ex => 00:01:08 verbose #1893 > > trace Critical 00:01:08 verbose #1894 > > fun () => "spiral_builder.process_fsharp / Exception" 00:01:08 verbose #1895 > > fun () => { ex run_result new_code_path external_command 00:01:08 verbose #1896 > > } 00:01:08 verbose #1897 > > None 00:01:08 verbose #1898 > > |> optionm'.box 00:01:08 verbose #1899 > > |> optionm'.unwrap 00:01:08 verbose #1900 > > 00:01:08 verbose #1901 > > { extension = Some extension; code = Some new_code; output = Some output 00:01:08 verbose #1902 > > } 00:01:08 verbose #1903 > > else 00:01:08 verbose #1904 > > trace Critical 00:01:08 verbose #1905 > > fun () => "spiral_builder.process_fsharp / error" 00:01:08 verbose #1906 > > fun () => { exit_code run_result new_code_path external_command } 00:01:08 verbose #1907 > > { extension = Some extension; code = None; output = None } 00:01:09 verbose #1908 > > 00:01:09 verbose #1909 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:09 verbose #1910 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:09 verbose #1911 > > │ ## run │ 00:01:09 verbose #1912 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:09 verbose #1913 > > 00:01:09 verbose #1914 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:09 verbose #1915 > > let rec run trace_level (matches : runtime.arg_matches) : async.future_pin 00:01:09 verbose #1916 > > (resultm.result' string string) = 00:01:09 verbose #1917 > > fun () => 00:01:09 verbose #1918 > > match matches |> runtime.matches_subcommand |> optionm'.unbox with 00:01:09 verbose #1919 > > | Some (subcommand, arg_matches) 00:01:09 verbose #1920 > > when (subcommand |> sm'.from_std_string) = (get_args () .cuda |> 00:01:09 verbose #1921 > > fst) => 00:01:09 verbose #1922 > > 00:01:09 verbose #1923 > > inl py_path = 00:01:09 verbose #1924 > > arg_matches 00:01:09 verbose #1925 > > |> runtime.matches_get_one ((get_args () .cuda |> snd).py_path 00:01:09 verbose #1926 > > |> fst) 00:01:09 verbose #1927 > > |> optionm'.unbox 00:01:09 verbose #1928 > > |> optionm.value 00:01:09 verbose #1929 > > |> sm'.from_std_string 00:01:09 verbose #1930 > > 00:01:09 verbose #1931 > > inl env = 00:01:09 verbose #1932 > > arg_matches 00:01:09 verbose #1933 > > |> runtime.matches_get_one ((get_args () .cuda |> snd).env |> 00:01:09 verbose #1934 > > fst) 00:01:09 verbose #1935 > > |> optionm'.unbox 00:01:09 verbose #1936 > > |> optionm.map ( 00:01:09 verbose #1937 > > sm'.from_std_string 00:01:09 verbose #1938 > > >> reflection.union_try_pick 00:01:09 verbose #1939 > > ) 00:01:09 verbose #1940 > > |> optionm'.flatten 00:01:09 verbose #1941 > > |> optionm'.default_value Pip 00:01:09 verbose #1942 > > 00:01:09 verbose #1943 > > inl deps : am'.vec sm'.std_string = 00:01:09 verbose #1944 > > arg_matches 00:01:09 verbose #1945 > > |> runtime.matches_get_many ((get_args () .cuda |> snd).deps |> 00:01:09 verbose #1946 > > fst) 00:01:09 verbose #1947 > > |> optionm'.unbox 00:01:09 verbose #1948 > > |> optionm'.default_value (;[[]] |> am'.to_vec) 00:01:09 verbose #1949 > > 00:01:09 verbose #1950 > > inl command_result = 00:01:09 verbose #1951 > > process_cuda { py_path env deps } 00:01:09 verbose #1952 > > |> fun { extension code output } => 00:01:09 verbose #1953 > > ;[[ 00:01:09 verbose #1954 > > "extension", extension |> optionm'.default_value "" 00:01:09 verbose #1955 > > "code", code |> optionm'.default_value "" 00:01:09 verbose #1956 > > "output", output |> optionm'.default_value "" 00:01:09 verbose #1957 > > ]] 00:01:09 verbose #1958 > > 00:01:09 verbose #1959 > > ;[[ 00:01:09 verbose #1960 > > "command_result", 00:01:09 verbose #1961 > > command_result 00:01:09 verbose #1962 > > |> am'.to_vec 00:01:09 verbose #1963 > > |> am'.vec_map' fun k, v => 00:01:09 verbose #1964 > > new_pair (sm'.to_std_string k) (sm'.to_std_string v) 00:01:09 verbose #1965 > > |> mapm.b_tree_map_from_vec_pairs 00:01:09 verbose #1966 > > |> sm'.serialize 00:01:09 verbose #1967 > > |> resultm.unwrap' 00:01:09 verbose #1968 > > |> sm'.from_std_string 00:01:09 verbose #1969 > > ]] 00:01:09 verbose #1970 > > 00:01:09 verbose #1971 > > | Some (subcommand, arg_matches) 00:01:09 verbose #1972 > > when (subcommand |> sm'.from_std_string) = (get_args () .fable 00:01:09 verbose #1973 > > |> fst) => 00:01:09 verbose #1974 > > 00:01:09 verbose #1975 > > inl fs_path = 00:01:09 verbose #1976 > > arg_matches 00:01:09 verbose #1977 > > |> runtime.matches_get_one ((get_args () .fable |> snd).fs_path 00:01:09 verbose #1978 > > |> fst) 00:01:09 verbose #1979 > > |> optionm'.unbox 00:01:09 verbose #1980 > > |> optionm.value 00:01:09 verbose #1981 > > |> sm'.from_std_string 00:01:09 verbose #1982 > > 00:01:09 verbose #1983 > > inl command = 00:01:09 verbose #1984 > > arg_matches 00:01:09 verbose #1985 > > |> runtime.matches_get_one ((get_args () .fable |> snd).command 00:01:09 verbose #1986 > > |> fst) 00:01:09 verbose #1987 > > |> optionm'.unbox 00:01:09 verbose #1988 > > |> optionm.map sm'.from_std_string 00:01:09 verbose #1989 > > 00:01:09 verbose #1990 > > inl command_result = 00:01:09 verbose #1991 > > match command with 00:01:09 verbose #1992 > > | Some command => 00:01:09 verbose #1993 > > get_command () 00:01:09 verbose #1994 > > |> runtime.command_get_matches_from ( 00:01:09 verbose #1995 > > $'$"_ {!command} --fs-path \\\"{!fs_path}\\\""' |> 00:01:09 verbose #1996 > > runtime.split_args |> resultm.get 00:01:09 verbose #1997 > > ) 00:01:09 verbose #1998 > > |> run trace_level 00:01:09 verbose #1999 > > |> async.await 00:01:09 verbose #2000 > > |> resultm.unwrap' 00:01:09 verbose #2001 > > | None => "{}" 00:01:09 verbose #2002 > > 00:01:09 verbose #2003 > > ;[[ 00:01:09 verbose #2004 > > "command_result", 00:01:09 verbose #2005 > > command_result 00:01:09 verbose #2006 > > ]] 00:01:09 verbose #2007 > > 00:01:09 verbose #2008 > > | Some (subcommand, arg_matches) 00:01:09 verbose #2009 > > when (subcommand |> sm'.from_std_string) = (get_args () .dib |> fst) 00:01:09 verbose #2010 > > => 00:01:09 verbose #2011 > > 00:01:09 verbose #2012 > > inl path = 00:01:09 verbose #2013 > > arg_matches 00:01:09 verbose #2014 > > |> runtime.matches_get_one ((get_args () .dib |> snd).path |> 00:01:09 verbose #2015 > > fst) 00:01:09 verbose #2016 > > |> optionm'.map'' ( 00:01:09 verbose #2017 > > sm'.from_std_string 00:01:09 verbose #2018 > > >> file_system.absolute_path 00:01:09 verbose #2019 > > ) 00:01:09 verbose #2020 > > |> optionm'.unwrap 00:01:09 verbose #2021 > > 00:01:09 verbose #2022 > > inl retries = 00:01:09 verbose #2023 > > arg_matches 00:01:09 verbose #2024 > > |> runtime.matches_get_one ((get_args () .dib |> snd).retries |> 00:01:09 verbose #2025 > > fst) 00:01:09 verbose #2026 > > |> optionm'.default_value' 1u8 00:01:09 verbose #2027 > > 00:01:09 verbose #2028 > > inl working_directory = 00:01:09 verbose #2029 > > arg_matches 00:01:09 verbose #2030 > > |> runtime.matches_get_one ((get_args () .dib |> 00:01:09 verbose #2031 > > snd).working_directory |> fst) 00:01:09 verbose #2032 > > |> optionm'.unbox 00:01:09 verbose #2033 > > 00:01:09 verbose #2034 > > process_dib { path retries working_directory } 00:01:09 verbose #2035 > > 00:01:09 verbose #2036 > > | matches => 00:01:09 verbose #2037 > > match matches with 00:01:09 verbose #2038 > > | Some (subcommand, arg_matches) 00:01:09 verbose #2039 > > when (subcommand |> sm'.from_std_string) = (get_args () 00:01:09 verbose #2040 > > .rust |> fst) => 00:01:09 verbose #2041 > > 00:01:09 verbose #2042 > > inl fs_path = 00:01:09 verbose #2043 > > arg_matches 00:01:09 verbose #2044 > > |> runtime.matches_get_one ((get_args () .rust |> 00:01:09 verbose #2045 > > snd).fs_path |> fst) 00:01:09 verbose #2046 > > |> optionm'.unbox 00:01:09 verbose #2047 > > |> optionm.value 00:01:09 verbose #2048 > > |> sm'.from_std_string 00:01:09 verbose #2049 > > 00:01:09 verbose #2050 > > inl deps : am'.vec sm'.std_string = 00:01:09 verbose #2051 > > arg_matches 00:01:09 verbose #2052 > > |> runtime.matches_get_many ((get_args () .rust |> snd).deps 00:01:09 verbose #2053 > > |> fst) 00:01:09 verbose #2054 > > |> optionm'.unbox 00:01:09 verbose #2055 > > |> optionm'.default_value (;[[]] |> am'.to_vec) 00:01:09 verbose #2056 > > 00:01:09 verbose #2057 > > inl cleanup = 00:01:09 verbose #2058 > > arg_matches 00:01:09 verbose #2059 > > |> runtime.matches_get_flag ((get_args () .rust |> 00:01:09 verbose #2060 > > snd).cleanup |> fst) 00:01:09 verbose #2061 > > 00:01:09 verbose #2062 > > inl wasm = 00:01:09 verbose #2063 > > arg_matches 00:01:09 verbose #2064 > > |> runtime.matches_get_one ((get_args () .rust |> snd).wasm 00:01:09 verbose #2065 > > |> fst) 00:01:09 verbose #2066 > > |> optionm'.unbox 00:01:09 verbose #2067 > > |> optionm.map sm'.from_std_string 00:01:09 verbose #2068 > > 00:01:09 verbose #2069 > > inl contract = 00:01:09 verbose #2070 > > arg_matches 00:01:09 verbose #2071 > > |> runtime.matches_get_one ((get_args () .rust |> 00:01:09 verbose #2072 > > snd).contract |> fst) 00:01:09 verbose #2073 > > |> optionm'.unbox 00:01:09 verbose #2074 > > |> optionm.map sm'.from_std_string 00:01:09 verbose #2075 > > 00:01:09 verbose #2076 > > inl runtime = 00:01:09 verbose #2077 > > match wasm, contract with 00:01:09 verbose #2078 > > | Some wasm, _ => Wasm wasm |> Some 00:01:09 verbose #2079 > > | _, Some contract => Contract contract |> Some 00:01:09 verbose #2080 > > | _ => None 00:01:09 verbose #2081 > > 00:01:09 verbose #2082 > > process_rust { fs_path deps trace_level runtime cleanup } 00:01:09 verbose #2083 > > 00:01:09 verbose #2084 > > | Some (subcommand, arg_matches) 00:01:09 verbose #2085 > > when (subcommand |> sm'.from_std_string) = (get_args () 00:01:09 verbose #2086 > > .typescript |> fst) => 00:01:09 verbose #2087 > > 00:01:09 verbose #2088 > > inl fs_path = 00:01:09 verbose #2089 > > arg_matches 00:01:09 verbose #2090 > > |> runtime.matches_get_one ((get_args () .typescript |> 00:01:09 verbose #2091 > > snd).fs_path |> fst) 00:01:09 verbose #2092 > > |> optionm'.unbox 00:01:09 verbose #2093 > > |> optionm.value 00:01:09 verbose #2094 > > |> sm'.from_std_string 00:01:09 verbose #2095 > > 00:01:09 verbose #2096 > > inl deps : am'.vec sm'.std_string = 00:01:09 verbose #2097 > > arg_matches 00:01:09 verbose #2098 > > |> runtime.matches_get_many ((get_args () .typescript |> 00:01:09 verbose #2099 > > snd).deps |> fst) 00:01:09 verbose #2100 > > |> optionm'.unbox 00:01:09 verbose #2101 > > |> optionm'.default_value (;[[]] |> am'.to_vec) 00:01:09 verbose #2102 > > 00:01:09 verbose #2103 > > process_typescript { fs_path deps trace_level } 00:01:09 verbose #2104 > > 00:01:09 verbose #2105 > > | Some (subcommand, arg_matches) 00:01:09 verbose #2106 > > when (subcommand |> sm'.from_std_string) = (get_args () 00:01:09 verbose #2107 > > .python |> fst) => 00:01:09 verbose #2108 > > inl fs_path = 00:01:09 verbose #2109 > > arg_matches 00:01:09 verbose #2110 > > |> runtime.matches_get_one ((get_args () .python |> 00:01:09 verbose #2111 > > snd).fs_path |> fst) 00:01:09 verbose #2112 > > |> optionm'.unbox 00:01:09 verbose #2113 > > |> optionm.value 00:01:09 verbose #2114 > > |> sm'.from_std_string 00:01:09 verbose #2115 > > 00:01:09 verbose #2116 > > inl deps : am'.vec sm'.std_string = 00:01:09 verbose #2117 > > arg_matches 00:01:09 verbose #2118 > > |> runtime.matches_get_many ((get_args () .python |> 00:01:09 verbose #2119 > > snd).deps |> fst) 00:01:09 verbose #2120 > > |> optionm'.unbox 00:01:09 verbose #2121 > > |> optionm'.default_value (;[[]] |> am'.to_vec) 00:01:09 verbose #2122 > > 00:01:09 verbose #2123 > > process_python { fs_path deps trace_level } 00:01:09 verbose #2124 > > 00:01:09 verbose #2125 > > | Some (subcommand, arg_matches) => 00:01:09 verbose #2126 > > trace Debug 00:01:09 verbose #2127 > > fun () => $'"spiral_builder.run / invalid subcommand"' 00:01:09 verbose #2128 > > fun () => { subcommand arg_matches } 00:01:09 verbose #2129 > > 00:01:09 verbose #2130 > > { extension = None; code = None; output = None } 00:01:09 verbose #2131 > > | _ => 00:01:09 verbose #2132 > > { extension = None; code = None; output = None } 00:01:09 verbose #2133 > > |> fun { extension code output } => 00:01:09 verbose #2134 > > ;[[ 00:01:09 verbose #2135 > > "extension", extension |> optionm'.default_value "" 00:01:09 verbose #2136 > > "code", code |> optionm'.default_value "" 00:01:09 verbose #2137 > > "output", output |> optionm'.default_value "" 00:01:09 verbose #2138 > > ]] 00:01:09 verbose #2139 > > |> am'.to_vec 00:01:09 verbose #2140 > > |> am'.vec_map' fun k, v => 00:01:09 verbose #2141 > > new_pair (sm'.to_std_string k) (sm'.to_std_string v) 00:01:09 verbose #2142 > > |> mapm.b_tree_map_from_vec_pairs 00:01:09 verbose #2143 > > |> sm'.serialize 00:01:09 verbose #2144 > > |> resultm.map_error' (sm'.format' >> sm'.from_std_string) 00:01:09 verbose #2145 > > |> resultm.map' sm'.from_std_string 00:01:09 verbose #2146 > > |> async.new_future_move 00:01:10 verbose #2147 > > 00:01:10 verbose #2148 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:10 verbose #2149 > > //// test 00:01:10 verbose #2150 > > ///! rust -d async-walkdir chrono clap encoding_rs encoding_rs_io futures rand 00:01:10 verbose #2151 > > rayon regex serde_json sha2 tokio[['rt-multi-thread']] tokio-stream 00:01:10 verbose #2152 > > 00:01:10 verbose #2153 > > inl file_name = "main.fs" 00:01:10 verbose #2154 > > inl code = "3 - 6 |> System.Console.WriteLine\n" 00:01:10 verbose #2155 > > 00:01:10 verbose #2156 > > inl temp_dir, disposable = 00:01:10 verbose #2157 > > (file_name, code) 00:01:10 verbose #2158 > > |> sm'.format_debug 00:01:10 verbose #2159 > > |> crypto.hash_text 00:01:10 verbose #2160 > > |> file_system.create_temp_dir' 00:01:10 verbose #2161 > > inl fs_path = temp_dir </> file_name 00:01:10 verbose #2162 > > 00:01:10 verbose #2163 > > code |> file_system.write_all_text fs_path 00:01:10 verbose #2164 > > 00:01:10 verbose #2165 > > get_command () 00:01:10 verbose #2166 > > |> runtime.command_get_matches_from ($'$"_ fable -f \\\"{!fs_path}\\\" -c 00:01:10 verbose #2167 > > \\\"rust -d regex=\'*\'\\\""' |> runtime.split_args |> resultm.get) 00:01:10 verbose #2168 > > |> run Verbose 00:01:10 verbose #2169 > > |> async.block_on 00:01:10 verbose #2170 > > |> resultm.unwrap' 00:01:10 verbose #2171 > > |> sm'.deserialize 00:01:10 verbose #2172 > > |> resultm.unwrap' 00:01:10 verbose #2173 > > |> mapm.get ("command_result" |> sm'.to_std_string) 00:01:10 verbose #2174 > > |> optionm'.unwrap 00:01:10 verbose #2175 > > |> sm'.from_std_string 00:01:10 verbose #2176 > > |> sm'.deserialize 00:01:10 verbose #2177 > > |> resultm.unwrap' 00:01:10 verbose #2178 > > |> fun result => 00:01:10 verbose #2179 > > result 00:01:10 verbose #2180 > > |> mapm.get ("extension" |> sm'.to_std_string) 00:01:10 verbose #2181 > > |> optionm'.unwrap 00:01:10 verbose #2182 > > |> sm'.from_std_string 00:01:10 verbose #2183 > > |> _assert_eq "rs" 00:01:10 verbose #2184 > > result 00:01:10 verbose #2185 > > |> mapm.get ("output" |> sm'.to_std_string) 00:01:10 verbose #2186 > > |> optionm'.unwrap 00:01:10 verbose #2187 > > |> sm'.from_std_string 00:01:10 verbose #2188 > > |> _assert_eq "-3" 00:01:10 verbose #2189 > > 00:01:10 verbose #2190 > > disposable |> use |> ignore 00:01:42 verbose #2191 > > 00:01:42 verbose #2192 > > ╭─[ 32.57s - return value ]────────────────────────────────────────────────────╮ 00:01:42 verbose #2193 > > │ 00:00:00 verbose #1 file_system.create_dir / { dir = │ 00:01:42 verbose #2194 > > │ C:\Users\i574n\AppData\Local\Temp\!create_temp_path_\spiral_builder_077890cd │ 00:01:42 verbose #2195 > > │ f9926eab09d2d29078f6ca18f2be3f1ce5036b7608282e49c5e1f7cf\c6422374-71e4-07d4- │ 00:01:42 verbose #2196 > > │ 0ba4-c3084b24fbba } │ 00:01:42 verbose #2197 > > │ 00:00:00 verbose #2 file_system.create_dir / { dir = │ 00:01:42 verbose #2198 > > │ c:\home\git\polyglot\target/spiral_builder\spiral_builder\packages\Rust\30d2 │ 00:01:42 verbose #2199 > > │ 06e2fbf536c98c2b62b269daad8bf6f8f0e05540e7189f63cfdf29f12081 } │ 00:01:42 verbose #2200 > > │ 00:00:00 debug #3 runtime.execute_with_options / { file_name = │ 00:01:42 verbose #2201 > > │ dotnet; arguments = [ │ 00:01:42 verbose #2202 > > │ "fable", │ 00:01:42 verbose #2203 > > │ │ 00:01:42 verbose #2204 > > │ "c:/home/git/polyglot/target/spiral_builder/spiral_builder/packages/Rust/30d │ 00:01:42 verbose #2205 > > │ 206e2fbf536c98c2b62b269daad8bf6f8f0e05540e7189f63cfdf29f12081/spiral_builder │ 00:01:42 verbose #2206 > > │ .fsproj", │ 00:01:42 verbose #2207 > > │ "--optimize", │ 00:01:42 verbose #2208 > > │ "--lang", │ 00:01:42 verbose #2209 > > │ "rs", │ 00:01:42 verbose #2210 > > │ "--extension", │ 00:01:42 verbose #2211 > > │ ".rs", │ 00:01:42 verbose #2212 > > │ "--outDir", │ 00:01:42 verbose #2213 > > │ │ 00:01:42 verbose #2214 > > │ "c:\\home\\git\\polyglot\\target/spiral_builder\\spiral_builder\\packages\\R │ 00:01:42 verbose #2215 > > │ ust\\30d206e2fbf536c98c2b62b269daad8bf6f8f0e05540e7189f63cfdf29f12081", │ 00:01:42 verbose #2216 > > │ "--define", │ 00:01:42 verbose #2217 > > │ "_WINDOWS", │ 00:01:42 verbose #2218 > > │ ]; options = { command = dotnet fable │ 00:01:42 verbose #2219 > > │ "c:/home/git/polyglot/target/spiral_builder/spiral_builder/packages/Rust/30d │ 00:01:42 verbose #2220 > > │ 206e2fbf536c98c2b62b269daad8bf6f8f0e05540e7189f63cfdf29f12081/spiral_builder │ 00:01:42 verbose #2221 > > │ .fsproj" --optimize --lang rs --extension .rs --outDir │ 00:01:42 verbose #2222 > > │ "c:\home\git\polyglot\target/spiral_builder\spiral_builder\packages\Rust\30d │ 00:01:42 verbose #2223 > > │ 206e2fbf536c98c2b62b269daad8bf6f8f0e05540e7189f63cfdf29f12081" --define │ 00:01:42 verbose #2224 > > │ _WINDOWS; cancellation_token = None; environment_variables = Array(MutCell([ │ 00:01:42 verbose #2225 > > │ ])); on_line = None; stdin = None; trace = │ 00:01:42 verbose #2226 > > │ tr...der\packages\Rust\30d206e2fbf536c98c2b62b269daad8bf6f8f0e05540e7189f63c │ 00:01:42 verbose #2227 > > │ fdf29f12081\spiral_builder.rs; cleanup = │ 00:01:42 verbose #2228 > > │ UH4_1("c:\home\git\polyglot\target/spiral_builder\spiral_builder\packages\Ru │ 00:01:42 verbose #2229 > > │ st\30d206e2fbf536c98c2b62b269daad8bf6f8f0e05540e7189f63cfdf29f12081\../../.. │ 00:01:42 verbose #2230 > > │ \target/debug/spiral_builder_30d206e2fbf536c98c2b62b269daad8bf6f8f0e05540e71 │ 00:01:42 verbose #2231 > > │ 89f63cfdf29f12081.d", true, │ 00:01:42 verbose #2232 > > │ UH4_1("c:\home\git\polyglot\target/spiral_builder\spiral_builder\packages\Ru │ 00:01:42 verbose #2233 > > │ st\30d206e2fbf536c98c2b62b269daad8bf6f8f0e05540e7189f63cfdf29f12081\../../.. │ 00:01:42 verbose #2234 > > │ \target/debug/spiral_builder_30d206e2fbf536c98c2b62b269daad8bf6f8f0e05540e71 │ 00:01:42 verbose #2235 > > │ 89f63cfdf29f12081.exe", true, │ 00:01:42 verbose #2236 > > │ UH4_1("c:\home\git\polyglot\target/spiral_builder\spiral_builder\packages\Ru │ 00:01:42 verbose #2237 > > │ st\30d206e2fbf536c98c2b62b269daad8bf6f8f0e05540e7189f63cfdf29f12081\../../.. │ 00:01:42 verbose #2238 > > │ \target/debug/spiral_builder_30d206e2fbf536c98c2b62b269daad8bf6f8f0e05540e71 │ 00:01:42 verbose #2239 > > │ 89f63cfdf29f12081.pdb", true, │ 00:01:42 verbose #2240 > > │ UH4_1("c:\home\git\polyglot\target/spiral_builder\spiral_builder\packages\Ru │ 00:01:42 verbose #2241 > > │ st\30d206e2fbf536c98c2b62b269daad8bf6f8f0e05540e7189f63cfdf29f12081\../../.. │ 00:01:42 verbose #2242 > > │ \target/debug/spiral_builder_30d206e2fbf536c98c2b62b269daad8bf6f8f0e05540e71 │ 00:01:42 verbose #2243 > > │ 89f63cfdf29f12081.wasm", false, │ 00:01:42 verbose #2244 > > │ UH4_1("c:\home\git\polyglot\target/spiral_builder\spiral_builder\packages\Ru │ 00:01:42 verbose #2245 > > │ st\30d206e2fbf536c98c2b62b269daad8bf6f8f0e05540e7189f63cfdf29f12081\../../.. │ 00:01:42 verbose #2246 > > │ \target/debug/spiral_builder_30d206e2fbf536c98c2b62b269daad8bf6f8f0e05540e71 │ 00:01:42 verbose #2247 > > │ 89f63cfdf29f12081", false, UH4_0))))) } │ 00:01:42 verbose #2248 > > │ __assert_eq / actual: "rs" / expected: "rs" │ 00:01:42 verbose #2249 > > │ __assert_eq / actual: "-3" / expected: "-3" │ 00:01:42 verbose #2250 > > │ │ 00:01:42 verbose #2251 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:42 verbose #2252 > > 00:01:42 verbose #2253 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:42 verbose #2254 > > //// test 00:01:42 verbose #2255 > > ///! rust -d async-walkdir chrono clap encoding_rs encoding_rs_io futures rand 00:01:42 verbose #2256 > > rayon regex serde_json sha2 tokio[['rt-multi-thread']] tokio-stream 00:01:42 verbose #2257 > > 00:01:42 verbose #2258 > > inl file_name = "main.fs" 00:01:42 verbose #2259 > > inl code = "3 - 6 |> System.Console.WriteLine\n" 00:01:42 verbose #2260 > > 00:01:42 verbose #2261 > > inl temp_dir, disposable = 00:01:42 verbose #2262 > > (file_name, code) 00:01:42 verbose #2263 > > |> sm'.format_debug 00:01:42 verbose #2264 > > |> crypto.hash_text 00:01:42 verbose #2265 > > |> file_system.create_temp_dir' 00:01:42 verbose #2266 > > inl fs_path = temp_dir </> file_name 00:01:42 verbose #2267 > > 00:01:42 verbose #2268 > > code |> file_system.write_all_text fs_path 00:01:42 verbose #2269 > > 00:01:42 verbose #2270 > > get_command () 00:01:42 verbose #2271 > > |> runtime.command_get_matches_from ($'$"_ fable -f \\\"{!fs_path}\\\" -c 00:01:42 verbose #2272 > > \\\"typescript\\\""' |> runtime.split_args |> resultm.get) 00:01:42 verbose #2273 > > |> run Verbose 00:01:42 verbose #2274 > > |> async.block_on 00:01:42 verbose #2275 > > |> resultm.unwrap' 00:01:42 verbose #2276 > > |> sm'.deserialize 00:01:42 verbose #2277 > > |> resultm.unwrap' 00:01:42 verbose #2278 > > |> mapm.get ("command_result" |> sm'.to_std_string) 00:01:42 verbose #2279 > > |> optionm'.unwrap 00:01:42 verbose #2280 > > |> sm'.from_std_string 00:01:42 verbose #2281 > > |> sm'.deserialize 00:01:42 verbose #2282 > > |> resultm.unwrap' 00:01:42 verbose #2283 > > |> fun result => 00:01:42 verbose #2284 > > result 00:01:42 verbose #2285 > > |> mapm.get ("extension" |> sm'.to_std_string) 00:01:42 verbose #2286 > > |> optionm'.unwrap 00:01:42 verbose #2287 > > |> sm'.from_std_string 00:01:42 verbose #2288 > > |> _assert_eq "ts" 00:01:42 verbose #2289 > > result 00:01:42 verbose #2290 > > |> mapm.get ("output" |> sm'.to_std_string) 00:01:42 verbose #2291 > > |> optionm'.unwrap 00:01:42 verbose #2292 > > |> sm'.from_std_string 00:01:42 verbose #2293 > > |> _assert_eq "-3" 00:01:42 verbose #2294 > > 00:01:42 verbose #2295 > > disposable |> use |> ignore 00:02:11 verbose #2296 > > 00:02:11 verbose #2297 > > ╭─[ 28.70s - return value ]────────────────────────────────────────────────────╮ 00:02:11 verbose #2298 > > │ 00:00:00 verbose #1 file_system.create_dir / { dir = │ 00:02:11 verbose #2299 > > │ C:\Users\i574n\AppData\Local\Temp\!create_temp_path_\spiral_builder_af769c59 │ 00:02:11 verbose #2300 > > │ f67932124694e8ceb7f63e79cf8a7ab8f94f2f7b100b38da19e88f28\c6422374-71e4-07d4- │ 00:02:11 verbose #2301 > > │ 0ba4-c3084b24fbba } │ 00:02:11 verbose #2302 > > │ 00:00:00 verbose #2 file_system.create_dir / { dir = │ 00:02:11 verbose #2303 > > │ c:\home\git\polyglot\target/spiral_builder\spiral_builder\packages\TypeScrip │ 00:02:11 verbose #2304 > > │ t\702335b0756baa7db0d02dbbeaf9fc04cf2c3b7dbb45866c578c5109aaa8c4a8 } │ 00:02:11 verbose #2305 > > │ 00:00:00 debug #3 spiral_builder.process_typescript / { version = │ 00:02:11 verbose #2306 > > │ US44_1 } │ 00:02:11 verbose #2307 > > │ 00:00:00 debug #4 runtime.execute_with_options / { file_name = │ 00:02:11 verbose #2308 > > │ dotnet; arguments = [ │ 00:02:11 verbose #2309 > > │ "fable", │ 00:02:11 verbose #2310 > > │ │ 00:02:11 verbose #2311 > > │ "c:/home/git/polyglot/target/spiral_builder/spiral_builder/packages/TypeScri │ 00:02:11 verbose #2312 > > │ pt/702335b0756baa7db0d02dbbeaf9fc04cf2c3b7dbb45866c578c5109aaa8c4a8/spiral_b │ 00:02:11 verbose #2313 > > │ uilder.fsproj", │ 00:02:11 verbose #2314 > > │ "--optimize", │ 00:02:11 verbose #2315 > > │ "--lang", │ 00:02:11 verbose #2316 > > │ "ts", │ 00:02:11 verbose #2317 > > │ "--extension", │ 00:02:11 verbose #2318 > > │ ".ts", │ 00:02:11 verbose #2319 > > │ "--outDir", │ 00:02:11 verbose #2320 > > │ │ 00:02:11 verbose #2321 > > │ "c:\\home\\git\\polyglot\\target/spiral_builder\\spiral_builder\\packages\\T │ 00:02:11 verbose #2322 > > │ ypeScript\\702335b0756baa7db0d02dbbeaf9fc04cf2c3b7dbb45866c578c5109aaa8c4a8" │ 00:02:11 verbose #2323 > > │ , │ 00:02:11 verbose #2324 > > │ "--define", │ 00:02:11 verbose #2325 > > │ "_WINDOWS", │ 00:02:11 verbose #2326 > > │ ]; options = { command = dotnet fable │ 00:02:11 verbose #2327 > > │ "c:/home/git/polyglot/target/spiral_builder/spiral_builder/packages/TypeScri │ 00:02:11 verbose #2328 > > │ pt/702335b0756baa7db0d02dbbeaf9fc04cf2c3b7dbb45866c578c5109aaa8c4a8/spiral_b │ 00:02:11 verbose #2329 > > │ uilder.fsproj" --optimize --lang ts --extension .ts --outDir │ 00:02:11 verbose #2330 > > │ "c:\home\git\polyglot\target/spiral_builder\spiral_builder\packages\TypeScri │ 00:02:11 verbose #2331 > > │ pt\702335b0756baa7db0d02dbbeaf9fc04cf2c3b7dbb45866c578c5109aaa8c4a8" │ 00:02:11 verbose #2332 > > │ --define │ 00:02:11 verbose #2333 > > │ _WIN...pps\vscode-insiders\current\bin;C:\Users\i574n\scoop\apps\python\curr │ 00:02:11 verbose #2334 > > │ ent\Scripts;C:\Users\i574n\scoop\apps\python\current\.;C:\Users\i574n\scoop\ │ 00:02:11 verbose #2335 > > │ apps\elixir\current\bin;C:\Users\i574n\scoop\apps\rustup\current\.cargo\bin; │ 00:02:11 verbose #2336 > > │ C:\Users\i574n\scoop\apps\latex\current\texmfs\install\miktex\bin\x64;C:\Use │ 00:02:11 verbose #2337 > > │ rs\i574n\scoop\apps\dotnet-sdk-preview\current;C:\Users\i574n\scoop\apps\dot │ 00:02:11 verbose #2338 > > │ net-sdk\current;C:\Users\i574n\scoop\apps\gsudo\current;C:\Users\i574n\scoop │ 00:02:11 verbose #2339 > > │ \apps\python\current;C:\Users\i574n\scoop\apps\nircmd\current;C:\Users\i574n │ 00:02:11 verbose #2340 > > │ \AppData\Local\Microsoft\WindowsApps;C:\Users\i574n/scoop/buckets/mold/home/ │ 00:02:11 verbose #2341 > > │ windows/path;C:\Users\i574n/scoop/persist/rustup/.cargo/bin;C:\Users\i574n/s │ 00:02:11 verbose #2342 > > │ coop/apps/nvm/current/nodejs/nodejs;C:\Users\i574n/scoop/apps/cygwin/current │ 00:02:11 verbose #2343 > > │ /root/bin;C:\Users\i574n\AppData\Local\Programs\Microsoft VS │ 00:02:11 verbose #2344 > > │ Code\bin;C:\Users\i574n\AppData\Local\Microsoft\WindowsApps;C:\Users\i574n\. │ 00:02:11 verbose #2345 > > │ bun\bin;C:\Users\i574n\.dotnet\tools;C:\Users\i574n\scoop\shims;C:\Users\i57 │ 00:02:11 verbose #2346 > > │ 4n\.fly\bin;C:\Program │ 00:02:11 verbose #2347 > > │ Files\Wasmtime\bin;C:\Users\i574n/.cargo/bin;C:\Users\i574n/.bun/bin;C:\User │ 00:02:11 verbose #2348 > > │ s\i574n/.cargo/bin;C:\Users\i574n/.bun/bin;C:\Users\i574n/.cargo/bin;C:\User │ 00:02:11 verbose #2349 > > │ s\i574n/.bun/bin"), ("TRACE_LEVEL", "Verbose")])); on_line = None; stdin = │ 00:02:11 verbose #2350 > > │ None; trace = true; working_directory = None } } │ 00:02:11 verbose #2351 > > │ 00:00:01 verbose #19 > -3 │ 00:02:11 verbose #2352 > > │ 00:00:01 verbose #20 runtime.execute_with_options / result / { │ 00:02:11 verbose #2353 > > │ exit_code = 0; std_trace_length = 2 } │ 00:02:11 verbose #2354 > > │ __assert_eq / actual: "ts" / expected: "ts" │ 00:02:11 verbose #2355 > > │ __assert_eq / actual: "-3" / expected: "-3" │ 00:02:11 verbose #2356 > > │ │ 00:02:11 verbose #2357 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:11 verbose #2358 > > 00:02:11 verbose #2359 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:11 verbose #2360 > > //// test 00:02:11 verbose #2361 > > ///! rust -d async-walkdir chrono clap encoding_rs encoding_rs_io futures rand 00:02:11 verbose #2362 > > rayon regex serde_json sha2 tokio[['rt-multi-thread']] tokio-stream 00:02:11 verbose #2363 > > 00:02:11 verbose #2364 > > inl file_name = "main.fs" 00:02:11 verbose #2365 > > inl code = "3 - 6 |> System.Console.WriteLine\n" 00:02:11 verbose #2366 > > 00:02:11 verbose #2367 > > inl temp_dir, disposable = 00:02:11 verbose #2368 > > (file_name, code) 00:02:11 verbose #2369 > > |> sm'.format_debug 00:02:11 verbose #2370 > > |> crypto.hash_text 00:02:11 verbose #2371 > > |> file_system.create_temp_dir' 00:02:11 verbose #2372 > > inl fs_path = temp_dir </> file_name 00:02:11 verbose #2373 > > 00:02:11 verbose #2374 > > code |> file_system.write_all_text fs_path 00:02:11 verbose #2375 > > 00:02:11 verbose #2376 > > get_command () 00:02:11 verbose #2377 > > |> runtime.command_get_matches_from ($'$"_ fable -f \\\"{!fs_path}\\\" -c 00:02:11 verbose #2378 > > \\\"python\\\""' |> runtime.split_args |> resultm.get) 00:02:11 verbose #2379 > > |> run Verbose 00:02:11 verbose #2380 > > |> async.block_on 00:02:11 verbose #2381 > > |> resultm.unwrap' 00:02:11 verbose #2382 > > |> sm'.deserialize 00:02:11 verbose #2383 > > |> resultm.unwrap' 00:02:11 verbose #2384 > > |> mapm.get ("command_result" |> sm'.to_std_string) 00:02:11 verbose #2385 > > |> optionm'.unwrap 00:02:11 verbose #2386 > > |> sm'.from_std_string 00:02:11 verbose #2387 > > |> sm'.deserialize 00:02:11 verbose #2388 > > |> resultm.unwrap' 00:02:11 verbose #2389 > > |> fun result => 00:02:11 verbose #2390 > > result 00:02:11 verbose #2391 > > |> mapm.get ("extension" |> sm'.to_std_string) 00:02:11 verbose #2392 > > |> optionm'.unwrap 00:02:11 verbose #2393 > > |> sm'.from_std_string 00:02:11 verbose #2394 > > |> _assert_eq "py" 00:02:11 verbose #2395 > > result 00:02:11 verbose #2396 > > |> mapm.get ("output" |> sm'.to_std_string) 00:02:11 verbose #2397 > > |> optionm'.unwrap 00:02:11 verbose #2398 > > |> sm'.from_std_string 00:02:11 verbose #2399 > > |> _assert_eq "-3" 00:02:11 verbose #2400 > > 00:02:11 verbose #2401 > > disposable |> use |> ignore 00:02:40 verbose #2402 > > 00:02:40 verbose #2403 > > ╭─[ 28.97s - return value ]────────────────────────────────────────────────────╮ 00:02:40 verbose #2404 > > │ 00:00:00 verbose #1 file_system.create_dir / { dir = │ 00:02:40 verbose #2405 > > │ C:\Users\i574n\AppData\Local\Temp\!create_temp_path_\spiral_builder_e0cb8b32 │ 00:02:40 verbose #2406 > > │ 3b629d4b0e908b3d94f7f748bae9af8961a6ac1193cf111052a4df46\c6422374-71e4-07d4- │ 00:02:40 verbose #2407 > > │ 0ba4-c3084b24fbba } │ 00:02:40 verbose #2408 > > │ 00:00:00 verbose #2 file_system.create_dir / { dir = │ 00:02:40 verbose #2409 > > │ c:\home\git\polyglot\target/spiral_builder\spiral_builder\packages\Python\cb │ 00:02:40 verbose #2410 > > │ 8f3dd33197bb0bc95f09b3f3057a6844a0b70d75477350491883d14d8680ce } │ 00:02:40 verbose #2411 > > │ 00:00:00 debug #3 runtime.execute_with_options / { file_name = │ 00:02:40 verbose #2412 > > │ dotnet; arguments = [ │ 00:02:40 verbose #2413 > > │ "fable", │ 00:02:40 verbose #2414 > > │ │ 00:02:40 verbose #2415 > > │ "c:/home/git/polyglot/target/spiral_builder/spiral_builder/packages/Python/c │ 00:02:40 verbose #2416 > > │ b8f3dd33197bb0bc95f09b3f3057a6844a0b70d75477350491883d14d8680ce/spiral_build │ 00:02:40 verbose #2417 > > │ er.fsproj", │ 00:02:40 verbose #2418 > > │ "--optimize", │ 00:02:40 verbose #2419 > > │ "--lang", │ 00:02:40 verbose #2420 > > │ "py", │ 00:02:40 verbose #2421 > > │ "--extension", │ 00:02:40 verbose #2422 > > │ ".py", │ 00:02:40 verbose #2423 > > │ "--outDir", │ 00:02:40 verbose #2424 > > │ │ 00:02:40 verbose #2425 > > │ "c:\\home\\git\\polyglot\\target/spiral_builder\\spiral_builder\\packages\\P │ 00:02:40 verbose #2426 > > │ ython\\cb8f3dd33197bb0bc95f09b3f3057a6844a0b70d75477350491883d14d8680ce", │ 00:02:40 verbose #2427 > > │ "--define", │ 00:02:40 verbose #2428 > > │ "_WINDOWS", │ 00:02:40 verbose #2429 > > │ ]; options = { command = dotnet fable │ 00:02:40 verbose #2430 > > │ "c:/home/git/polyglot/target/spiral_builder/spiral_builder/packages/Python/c │ 00:02:40 verbose #2431 > > │ b8f3dd33197bb0bc95f09b3f3057a6844a0b70d75477350491883d14d8680ce/spiral_build │ 00:02:40 verbose #2432 > > │ er.fsproj" --optimize --lang py --extension .py --outDir │ 00:02:40 verbose #2433 > > │ "c:\home\git\polyglot\target/spiral_builder\spiral_builder\packages\Python\c │ 00:02:40 verbose #2434 > > │ b8f3dd33197bb0bc95f09b3f3057a6844a0b70d75477350491883d14d8680ce" --define │ 00:02:40 verbose #2435 > > │ _WINDOWS; cancellation_token = None; environment_variables = Array(MutCell([ │ 00:02:40 verbose #2436 > > │ ])); on_line = None; stdin = None; ... issues run `dotnet fable clean` or │ 00:02:40 verbose #2437 > > │ try `--noCache` option. │ 00:02:40 verbose #2438 > > │ 00:00:01 verbose #11 > Project and references (1 source files) parsed │ 00:02:40 verbose #2439 > > │ in 377ms │ 00:02:40 verbose #2440 > > │ 00:00:01 verbose #12 > │ 00:02:40 verbose #2441 > > │ 00:00:01 verbose #13 > Skipped compilation because all generated files │ 00:02:40 verbose #2442 > > │ are up-to-date! │ 00:02:40 verbose #2443 > > │ 00:00:01 verbose #14 runtime.execute_with_options / result / { │ 00:02:40 verbose #2444 > > │ exit_code = 0; std_trace_length = 535 } │ 00:02:40 verbose #2445 > > │ 00:00:01 debug #15 spiral_builder.process_python / { new_code_path = │ 00:02:40 verbose #2446 > > │ c:\home\git\polyglot\target/spiral_builder\spiral_builder\packages\Python\cb │ 00:02:40 verbose #2447 > > │ 8f3dd33197bb0bc95f09b3f3057a6844a0b70d75477350491883d14d8680ce\spiral_builde │ 00:02:40 verbose #2448 > > │ r.py } │ 00:02:40 verbose #2449 > > │ 00:00:01 debug #16 runtime.execute_with_options / { file_name = │ 00:02:40 verbose #2450 > > │ python; arguments = [ │ 00:02:40 verbose #2451 > > │ │ 00:02:40 verbose #2452 > > │ "c:\\home\\git\\polyglot\\target/spiral_builder\\spiral_builder\\packages\\P │ 00:02:40 verbose #2453 > > │ ython\\cb8f3dd33197bb0bc95f09b3f3057a6844a0b70d75477350491883d14d8680ce\\spi │ 00:02:40 verbose #2454 > > │ ral_builder.py", │ 00:02:40 verbose #2455 > > │ ]; options = { command = python │ 00:02:40 verbose #2456 > > │ "c:\home\git\polyglot\target/spiral_builder\spiral_builder\packages\Python\c │ 00:02:40 verbose #2457 > > │ b8f3dd33197bb0bc95f09b3f3057a6844a0b70d75477350491883d14d8680ce\spiral_build │ 00:02:40 verbose #2458 > > │ er.py"; cancellation_token = None; environment_variables = Array(MutCell([ │ 00:02:40 verbose #2459 > > │ ("TRACE_LEVEL", "Verbose")])); on_line = None; stdin = None; trace = true; │ 00:02:40 verbose #2460 > > │ working_directory = None } } │ 00:02:40 verbose #2461 > > │ 00:00:01 verbose #17 > -3 │ 00:02:40 verbose #2462 > > │ 00:00:01 verbose #18 runtime.execute_with_options / result / { │ 00:02:40 verbose #2463 > > │ exit_code = 0; std_trace_length = 2 } │ 00:02:40 verbose #2464 > > │ __assert_eq / actual: "py" / expected: "py" │ 00:02:40 verbose #2465 > > │ __assert_eq / actual: "-3" / expected: "-3" │ 00:02:40 verbose #2466 > > │ │ 00:02:40 verbose #2467 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:40 verbose #2468 > > 00:02:40 verbose #2469 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:40 verbose #2470 > > //// test 00:02:40 verbose #2471 > > ///! rust -d async-walkdir chrono clap encoding_rs encoding_rs_io rand rayon 00:02:40 verbose #2472 > > regex serde_json sha2 tokio[['rt-multi-thread']] tokio-stream 00:02:40 verbose #2473 > > 00:02:40 verbose #2474 > > inl file_name = "test.dib" 00:02:40 verbose #2475 > > inl code = 00:02:40 verbose #2476 > > 00:02:40 verbose #2477 > > "#!meta\n\n{\"kernelInfo\":{\"defaultKernelName\":\"fsharp\",\"items\":[[]]}}\n\ 00:02:40 verbose #2478 > > n#!fsharp\n\n3 - 6\n" 00:02:40 verbose #2479 > > 00:02:40 verbose #2480 > > inl temp_dir, disposable = 00:02:40 verbose #2481 > > (file_name, code) 00:02:40 verbose #2482 > > |> sm'.format_debug 00:02:40 verbose #2483 > > |> crypto.hash_text 00:02:40 verbose #2484 > > |> file_system.create_temp_dir' 00:02:40 verbose #2485 > > inl path = temp_dir </> file_name |> file_system.normalize_path 00:02:40 verbose #2486 > > 00:02:40 verbose #2487 > > code 00:02:40 verbose #2488 > > |> file_system.write_all_text path 00:02:40 verbose #2489 > > 00:02:40 verbose #2490 > > get_command () 00:02:40 verbose #2491 > > |> runtime.command_get_matches_from ($'$"_ dib -p {!path}"' |> 00:02:40 verbose #2492 > > runtime.split_args |> resultm.get) 00:02:40 verbose #2493 > > |> run Verbose 00:02:40 verbose #2494 > > |> async.block_on 00:02:40 verbose #2495 > > |> resultm.unwrap' 00:02:40 verbose #2496 > > |> __assert sm'.contains Silent "<pre>-3 " 00:02:40 verbose #2497 > > 00:02:40 verbose #2498 > > $'$"{!path}.html"' 00:02:40 verbose #2499 > > |> file_system.read_all_text 00:02:40 verbose #2500 > > |> __assert sm'.contains Silent "\"cell-id=1\"" 00:02:40 verbose #2501 > > 00:02:40 verbose #2502 > > disposable |> use |> ignore 00:03:25 verbose #2503 > > 00:03:25 verbose #2504 > > ╭─[ 44.78s - return value ]────────────────────────────────────────────────────╮ 00:03:25 verbose #2505 > > │ 00:00:00 verbose #1 file_system.create_dir / { dir = │ 00:03:25 verbose #2506 > > │ C:\Users\i574n\AppData\Local\Temp\!create_temp_path_\spiral_builder_093988cf │ 00:03:25 verbose #2507 > > │ 93cd42c7a250021d8877f1ceec3f09b5b6f63d57c7ad0d9ff6e51a8b\af524e22-8e9a-5d18- │ 00:03:25 verbose #2508 > > │ 99ed-bd86e1b74623 } │ 00:03:25 verbose #2509 > > │ 00:00:00 debug #2 runtime.execute_with_options / { file_name = │ 00:03:25 verbose #2510 > > │ dotnet; arguments = [ │ 00:03:25 verbose #2511 > > │ "repl", │ 00:03:25 verbose #2512 > > │ "--exit-after-run", │ 00:03:25 verbose #2513 > > │ "--run", │ 00:03:25 verbose #2514 > > │ │ 00:03:25 verbose #2515 > > │ "c:/Users/i574n/AppData/Local/Temp/!create_temp_path_/spiral_builder_093988c │ 00:03:25 verbose #2516 > > │ f93cd42c7a250021d8877f1ceec3f09b5b6f63d57c7ad0d9ff6e51a8b/af524e22-8e9a-5d18 │ 00:03:25 verbose #2517 > > │ -99ed-bd86e1b74623/test.dib", │ 00:03:25 verbose #2518 > > │ "--output-path", │ 00:03:25 verbose #2519 > > │ │ 00:03:25 verbose #2520 > > │ "c:/Users/i574n/AppData/Local/Temp/!create_temp_path_/spiral_builder_093988c │ 00:03:25 verbose #2521 > > │ f93cd42c7a250021d8877f1ceec3f09b5b6f63d57c7ad0d9ff6e51a8b/af524e22-8e9a-5d18 │ 00:03:25 verbose #2522 > > │ -99ed-bd86e1b74623/test.dib.ipynb", │ 00:03:25 verbose #2523 > > │ ]; options = { command = dotnet repl --exit-after-run --run │ 00:03:25 verbose #2524 > > │ "c:/Users/i574n/AppData/Local/Temp/!create_temp_path_/spiral_builder_093988c │ 00:03:25 verbose #2525 > > │ f93cd42c7a250021d8877f1ceec3f09b5b6f63d57c7ad0d9ff6e51a8b/af524e22-8e9a-5d18 │ 00:03:25 verbose #2526 > > │ -99ed-bd86e1b74623/test.dib" --output-path │ 00:03:25 verbose #2527 > > │ "c:/Users/i574n/AppData/Local/Temp/!create_temp_path_/spiral_builder_093988c │ 00:03:25 verbose #2528 > > │ f93cd42c7a250021d8877f1ceec3f09b5b6f63d57c7ad0d9ff6e51a8b/af524e22-8e9a-5d18 │ 00:03:25 verbose #2529 > > │ -99ed-bd86e1b74623/test.dib.ipynb"; cancellation_token = None; │ 00:03:25 verbose #2530 > > │ environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), │ 00:03:25 verbose #2531 > > │ ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; │ 00:03:25 verbose #2532 > > │ working_directory = None } } │ 00:03:25 verbose #2533 > > │ > │ 00:03:25 verbose #2534 > > │ > ── fsharp │ 00:03:25 verbose #2535 > > │ ──────────────────────────────────────────────────────────────────...ime.exe │ 00:03:25 verbose #2536 > > │ cute_with_options / result / { exit_code = 0; std_trace_length = 915 } │ 00:03:25 verbose #2537 > > │ 00:00:13 debug #10 spiral_builder.run / dib / jupyter nbconvert / { │ 00:03:25 verbose #2538 > > │ exit_code = 0; jupyter_result_length = 915 } │ 00:03:25 verbose #2539 > > │ 00:00:13 debug #11 runtime.execute_with_options / { file_name = │ 00:03:25 verbose #2540 > > │ pwsh; arguments = [ │ 00:03:25 verbose #2541 > > │ "-c", │ 00:03:25 verbose #2542 > > │ "$counter = 1; $path = │ 00:03:25 verbose #2543 > > │ 'c:/Users/i574n/AppData/Local/Temp/!create_temp_path_/spiral_builder_093988c │ 00:03:25 verbose #2544 > > │ f93cd42c7a250021d8877f1ceec3f09b5b6f63d57c7ad0d9ff6e51a8b/af524e22-8e9a-5d18 │ 00:03:25 verbose #2545 > > │ -99ed-bd86e1b74623/test.dib.html'; (Get-Content $path -Raw) -replace │ 00:03:25 verbose #2546 > > │ '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | │ 00:03:25 verbose #2547 > > │ Set-Content $path", │ 00:03:25 verbose #2548 > > │ ]; options = { command = pwsh -c "$counter = 1; $path = │ 00:03:25 verbose #2549 > > │ 'c:/Users/i574n/AppData/Local/Temp/!create_temp_path_/spiral_builder_093988c │ 00:03:25 verbose #2550 > > │ f93cd42c7a250021d8877f1ceec3f09b5b6f63d57c7ad0d9ff6e51a8b/af524e22-8e9a-5d18 │ 00:03:25 verbose #2551 > > │ -99ed-bd86e1b74623/test.dib.html'; (Get-Content $path -Raw) -replace │ 00:03:25 verbose #2552 > > │ '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | │ 00:03:25 verbose #2553 > > │ Set-Content $path"; cancellation_token = None; environment_variables = │ 00:03:25 verbose #2554 > > │ Array(MutCell([])); on_line = None; stdin = None; trace = true; │ 00:03:25 verbose #2555 > > │ working_directory = None } } │ 00:03:25 verbose #2556 > > │ 00:00:14 verbose #12 runtime.execute_with_options / result / { │ 00:03:25 verbose #2557 > > │ exit_code = 0; std_trace_length = 0 } │ 00:03:25 verbose #2558 > > │ 00:00:14 debug #13 spiral_builder.run / dib / html cell ids / { │ 00:03:25 verbose #2559 > > │ exit_code = 0; pwsh_replace_html_result_length = 0 } │ 00:03:25 verbose #2560 > > │ 00:00:14 debug #14 spiral_builder.run / dib / { exit_code = 0; │ 00:03:25 verbose #2561 > > │ result_length = 3897 } │ 00:03:25 verbose #2562 > > │ │ 00:03:25 verbose #2563 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:25 verbose #2564 > > 00:03:25 verbose #2565 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:25 verbose #2566 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:25 verbose #2567 > > │ ## tests │ 00:03:25 verbose #2568 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:25 verbose #2569 > > 00:03:25 verbose #2570 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:25 verbose #2571 > > inl tests () = 00:03:25 verbose #2572 > > testing.run_tests { 00:03:25 verbose #2573 > > verify_app = get_command >> runtime.command_debug_assert 00:03:25 verbose #2574 > > } 00:03:26 verbose #2575 > > 00:03:26 verbose #2576 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:26 verbose #2577 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:26 verbose #2578 > > │ ## main │ 00:03:26 verbose #2579 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:26 verbose #2580 > > 00:03:26 verbose #2581 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:26 verbose #2582 > > ///! _ 00:03:26 verbose #2583 > > 00:03:26 verbose #2584 > > inl main (args : array_base string) = 00:03:26 verbose #2585 > > inl trace_state = get_trace_state_or_init None 00:03:26 verbose #2586 > > 00:03:26 verbose #2587 > > trace Debug 00:03:26 verbose #2588 > > fun () => $'$"spiral_builder.main"' 00:03:26 verbose #2589 > > fun () => { args } 00:03:26 verbose #2590 > > 00:03:26 verbose #2591 > > inl command = get_command () 00:03:26 verbose #2592 > > inl arg_matches = command |> runtime.command_get_matches 00:03:26 verbose #2593 > > 00:03:26 verbose #2594 > > inl trace_state_level = trace_state.level 00:03:26 verbose #2595 > > 00:03:26 verbose #2596 > > inl result = 00:03:26 verbose #2597 > > arg_matches 00:03:26 verbose #2598 > > |> run *trace_state_level 00:03:26 verbose #2599 > > |> async.block_on 00:03:26 verbose #2600 > > |> resultm.unwrap' 00:03:26 verbose #2601 > > 00:03:26 verbose #2602 > > if *trace_state_level = Info 00:03:26 verbose #2603 > > then result |> console.write_line 00:03:26 verbose #2604 > > 00:03:26 verbose #2605 > > 0i32 00:03:26 verbose #2606 > > 00:03:26 verbose #2607 > > inl main () = 00:03:26 verbose #2608 > > $'let tests () = !tests ()' : () 00:03:26 verbose #2609 > > $'let main args = !main args' : () 00:03:39 verbose #2610 > 00:03:38 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 115031 } 00:03:39 verbose #2611 > 00:03:38 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:03:39 verbose #2612 > "nbconvert", 00:03:39 verbose #2613 > "c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib.ipynb", 00:03:39 verbose #2614 > "--to", 00:03:39 verbose #2615 > "html", 00:03:39 verbose #2616 > "--HTMLExporter.theme=dark", 00:03:39 verbose #2617 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:03:42 verbose #2618 > 00:03:41 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib.ipynb to html 00:03:42 verbose #2619 > 00:03:41 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:03:42 verbose #2620 > 00:03:41 verbose #7 ! validate(nb) 00:03:47 verbose #2621 > 00:03:45 verbose #8 ! [NbConvertApp] Writing 594148 bytes to c:\home\git\polyglot\apps\spiral\builder\spiral_builder.dib.html 00:03:47 verbose #2622 > 00:03:46 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 677 } 00:03:47 verbose #2623 > 00:03:46 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 677 } 00:03:47 verbose #2624 > 00:03:46 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:03:47 verbose #2625 > "-c", 00:03:47 verbose #2626 > "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:03:47 verbose #2627 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:03:48 verbose #2628 > 00:03:46 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:03:48 verbose #2629 > 00:03:46 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:03:48 verbose #2630 > 00:03:46 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 115767 } 00:03:48 debug #2631 runtime.execute_with_options_async / { exit_code = 0; output_length = 123771 } 00:03:48 debug #1 main / executeCommand / exitCode: 0 / command: ../../../workspace/target/release/spiral_builder.exe dib --path spiral_builder.dib 00:00:00 debug #1 writeDibCode / output: Spi / path: spiral_builder.dib 00:00:00 debug #2 parseDibCode / output: Spi / file: spiral_builder.dib 00:00:00 verbose #1 async.run_with_timeout_async / { timeout = 180 } 00:00:01 verbose #2 async.run_with_timeout_async / { timeout = 180 } 00:00:01 debug #1 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:01 debug #2 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:01 debug #3 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:01 verbose #4 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # spiral_builder\nopen file_system_operators\nopen rust.rust_operators\n...ain args\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/apps/spiral/builder/spiral_builder.spi"}} / result: 00:00:01 verbose #5 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/apps/spiral/builder/spiral_builder.spi"}} / result: 00:00:02 debug #6 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:02 debug #7 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:02 debug #8 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:02 debug #9 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:03 debug #10 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:03 debug #11 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:03 debug #12 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:03 debug #13 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:04 debug #14 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:04 debug #15 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:04 debug #16 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:04 debug #17 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:05 debug #18 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:05 debug #19 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:05 debug #20 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:05 debug #21 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:06 debug #22 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:06 debug #23 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:06 debug #24 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:06 debug #25 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:07 debug #26 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:07 debug #27 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:07 debug #28 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:07 debug #29 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:08 debug #30 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:08 debug #31 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:08 debug #32 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:08 debug #33 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:09 debug #34 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:09 debug #35 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:09 debug #36 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:09 debug #37 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:10 debug #38 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:10 debug #39 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:10 debug #40 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:10 debug #41 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:11 debug #42 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:11 debug #43 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:11 debug #44 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:11 debug #45 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:12 debug #46 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:12 debug #47 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:12 debug #48 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:12 debug #49 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:13 debug #50 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:13 debug #51 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:13 debug #52 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:13 debug #53 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:14 debug #54 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:14 debug #55 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:14 debug #56 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:14 debug #57 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:15 debug #58 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:15 debug #59 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:15 debug #60 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:15 debug #61 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:15 debug #62 Supervisor.buildFile / AsyncSeq.scan / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("&$0")>] type Ref<'T> = class end #else type Ref<'T> = 'T #endif #if FABLE_COMPILER [<Fable.Co...() () 0 let v0 : (unit -> unit) = closure0() let tests () = v0 () let v1 : ((string []) -> int32) = closure1() let main args = v1 args () / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_builder.spi 00:00:15 debug #63 Supervisor.buildFile / takeWhileInclusive / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("&$0")>] type Ref<'T> = class end #else type Ref<'T> = 'T #endif #if FABLE_COMPILER [<Fable.Co...() () 0 let v0 : (unit -> unit) = closure0() let tests () = v0 () let v1 : ((string []) -> int32) = closure1() let main args = v1 args () / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_builder.spi 00:00:16 debug #64 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:04 debug #1 persistCodeProject / packages: [Fable.Core] / modules: [lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / name: spiral_builder / hash: / code.Length: 6719754 targetDir: C:\home\git\polyglot\target\Builder\spiral_builder Fable 4.21.0: F# to Rust compiler (status: alpha) Thanks to the contributor! @goswinr Stand with Ukraine! https://standwithukraine.com.ua/ Parsing target\Builder\spiral_builder\spiral_builder.fsproj... Retrieving project options from cache, in case of issues run `dotnet fable clean` or try `--noCache` option. Project and references (14 source files) parsed in 319ms Started Fable compilation... Fable compilation finished in 21760ms .\lib\spiral\common.fsx(1458,0): (1458,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\sm.fsx(450,0): (450,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\crypto.fsx(1612,0): (1612,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\date_time.fsx(997,0): (997,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\async_.fsx(76,0): (76,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\threading.fsx(127,0): (127,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\networking.fsx(3719,0): (3719,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\platform.fsx(104,0): (104,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\runtime.fsx(4778,0): (4778,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\file_system.fsx(55820,0): (55820,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\trace.fsx(1490,0): (1490,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! Directory: C:\home\git\polyglot\target\Builder\spiral_builder\target Mode LastWriteTime Length Name ---- ------------- ------ ---- d---- 2024-09-21 8:56 PM rs Compiling spiral_builder v0.0.1 (C:\home\git\polyglot\apps\spiral\builder) Finished `release` profile [optimized] target(s) in 32.88s Running unittests spiral_builder.rs (C:\home\git\polyglot\workspace\target\release\deps\spiral_builder-ea3eb4a16337e451.exe) running 1 test test module_7e2cd9e0::Spiral_builder::verify_app ... ok successes: successes: module_7e2cd9e0::Spiral_builder::verify_app test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Compiling spiral_builder v0.0.1 (C:\home\git\polyglot\apps\spiral\builder) error: failed to remove file `C:\home\git\polyglot\workspace\target\release\spiral_builder.exe` Caused by: Access is denied. (os error 5) # Invoke-Block / $retry: 1/1 / $Location: / Get-Location: C:\home\git\polyglot\apps\spiral\builder / $OnError: Continue / $exitcode: 101 / $EnvVars: { "PATH": "C:\\Users\\i574n\\scoop\\apps\\pwsh\\current;C:\\Program Files\\NVIDIA\\CUDNN\\v9.1\\bin;C:\\ProgramData\\scoop\\shims;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\dotnet\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Program Files\\Perforce;C:\\Program Files\\Wasmtime\\bin;C:\\Program Files\\Perforce\\;C:\\Users\\i574n\\scoop\\apps\\vscode-insiders\\current\\bin;C:\\Users\\i574n\\scoop\\apps\\python\\current\\Scripts;C:\\Users\\i574n\\scoop\\apps\\python\\current\\.;C:\\Users\\i574n\\scoop\\apps\\elixir\\current\\bin;C:\\Users\\i574n\\scoop\\apps\\rustup\\current\\.cargo\\bin;C:\\Users\\i574n\\scoop\\apps\\latex\\current\\texmfs\\install\\miktex\\bin\\x64;C:\\Users\\i574n\\scoop\\apps\\dotnet-sdk-preview\\current;C:\\Users\\i574n\\scoop\\apps\\dotnet-sdk\\current;C:\\Users\\i574n\\scoop\\apps\\gsudo\\current;C:\\Users\\i574n\\scoop\\apps\\python\\current;C:\\Users\\i574n\\scoop\\apps\\nircmd\\current;C:\\Users\\i574n\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\i574n/scoop/buckets/mold/home/windows/path;C:\\Users\\i574n/scoop/persist/rustup/.cargo/bin;C:\\Users\\i574n/scoop/apps/nvm/current/nodejs/nodejs;C:\\Users\\i574n/scoop/apps/cygwin/current/root/bin;C:\\Users\\i574n\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\i574n\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\i574n\\.bun\\bin;C:\\Users\\i574n\\.dotnet\\tools;C:\\Users\\i574n\\scoop\\shims;C:\\Users\\i574n\\.fly\\bin;C:\\Program Files\\Wasmtime\\bin;C:\\Users\\i574n/.cargo/bin;C:\\Users\\i574n/.bun/bin;C:\\Users\\i574n/.cargo/bin;C:\\Users\\i574n/.bun/bin;C:\\Users\\i574n/.cargo/bin;C:\\Users\\i574n/.bun/bin" } / $Error: '' / $ScriptBlock: 'cargo build --release'
In [ ]:
{ pwsh ../apps/spiral/wasm/build.ps1 } | Invoke-Block
00:00:00 verbose #1 async.run_with_timeout_async / { timeout = 180 } 00:00:01 debug #1 runtime.execute_with_options_async / { options = { command = ../../../workspace/target/release/spiral_builder.exe dib --path spiral_wasm.dib; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:01 verbose #2 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "spiral_wasm.dib"])) } 00:00:01 verbose #3 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:00:01 verbose #4 > "repl", 00:00:01 verbose #5 > "--exit-after-run", 00:00:01 verbose #6 > "--run", 00:00:01 verbose #7 > "c:/home/git/polyglot/apps/spiral/wasm/spiral_wasm.dib", 00:00:01 verbose #8 > "--output-path", 00:00:01 verbose #9 > "c:/home/git/polyglot/apps/spiral/wasm/spiral_wasm.dib.ipynb", 00:00:01 verbose #10 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/spiral/wasm/spiral_wasm.dib" --output-path "c:/home/git/polyglot/apps/spiral/wasm/spiral_wasm.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:00:03 verbose #11 > > 00:00:03 verbose #12 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:03 verbose #13 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:03 verbose #14 > > │ # spiral_wasm │ 00:00:03 verbose #15 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:08 verbose #16 > > 00:00:08 verbose #17 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:08 verbose #18 > > open rust.rust_operators 00:00:08 verbose #19 > > open rust 00:00:08 verbose #20 > > open sm'_operators 00:00:10 verbose #21 > > 00:00:10 verbose #22 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:10 verbose #23 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:10 verbose #24 > > │ ## spiral_wasm │ 00:00:10 verbose #25 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:10 verbose #26 > > 00:00:10 verbose #27 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:10 verbose #28 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:10 verbose #29 > > │ ### get_args │ 00:00:10 verbose #30 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:10 verbose #31 > > 00:00:10 verbose #32 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:10 verbose #33 > > inl get_args () = 00:00:10 verbose #34 > > { 00:00:10 verbose #35 > > exception = "exception", 'e' 00:00:10 verbose #36 > > trace_level = "trace_level", 't' 00:00:10 verbose #37 > > wasm = "wasm", 'w' 00:00:10 verbose #38 > > } 00:00:10 verbose #39 > > 00:00:10 verbose #40 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:10 verbose #41 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:10 verbose #42 > > │ ### get_command │ 00:00:10 verbose #43 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:10 verbose #44 > > 00:00:10 verbose #45 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:10 verbose #46 > > let get_command () = 00:00:10 verbose #47 > > ##"command" 00:00:10 verbose #48 > > |> runtime.new_command 00:00:10 verbose #49 > > |> runtime.command_args_override_self true 00:00:10 verbose #50 > > |> runtime.command_init_arg (get_args () .exception) ( 00:00:10 verbose #51 > > runtime.arg_action runtime.SetTrue 00:00:10 verbose #52 > > ) 00:00:10 verbose #53 > > |> runtime.command_init_arg (get_args () .trace_level) ( 00:00:10 verbose #54 > > real runtime.arg_union `trace_level ignore 00:00:10 verbose #55 > > ) 00:00:10 verbose #56 > > |> runtime.command_init_arg (get_args () .wasm) ( 00:00:10 verbose #57 > > runtime.arg_required true 00:00:10 verbose #58 > > ) 00:00:11 verbose #59 > > 00:00:11 verbose #60 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:11 verbose #61 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:11 verbose #62 > > │ ### run │ 00:00:11 verbose #63 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:11 verbose #64 > > 00:00:11 verbose #65 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:11 verbose #66 > > let rec run (matches : runtime.arg_matches) : async.future_pin (resultm.result' 00:00:11 verbose #67 > > u8 resultm.anyhow_error) = 00:00:11 verbose #68 > > fun () => 00:00:11 verbose #69 > > inl wasm_path = 00:00:11 verbose #70 > > matches 00:00:11 verbose #71 > > |> runtime.matches_get_one (get_args () .wasm |> fst) 00:00:11 verbose #72 > > |> optionm'.unbox 00:00:11 verbose #73 > > |> optionm.value 00:00:11 verbose #74 > > |> sm'.from_std_string 00:00:11 verbose #75 > > 00:00:11 verbose #76 > > trace Verbose (fun () => "spiral_wasm.run") fun () => { wasm_path } 00:00:11 verbose #77 > > 00:00:11 verbose #78 > > inl wasm = wasm_path |> file_system.read |> resultm.try' 00:00:11 verbose #79 > > 00:00:11 verbose #80 > > let fn (retry : u8) = 00:00:11 verbose #81 > > fun () => 00:00:11 verbose #82 > > inl worker = near_workspaces.sandbox_worker () |> resultm.try' 00:00:11 verbose #83 > > 00:00:11 verbose #84 > > trace Verbose (fun () => "spiral_wasm.run") fun () => { retry 00:00:11 verbose #85 > > worker } 00:00:11 verbose #86 > > 00:00:11 verbose #87 > > inl contract = worker |> near_workspaces.dev_deploy wasm |> 00:00:11 verbose #88 > > async.await |> resultm.try' 00:00:11 verbose #89 > > 00:00:11 verbose #90 > > trace Verbose (fun () => "spiral_wasm.run") fun () => { retry 00:00:11 verbose #91 > > contract } 00:00:11 verbose #92 > > 00:00:11 verbose #93 > > inl result = 00:00:11 verbose #94 > > contract 00:00:11 verbose #95 > > |> near_workspaces.call "state_main" 00:00:11 verbose #96 > > |> near_workspaces.transact 00:00:11 verbose #97 > > |> async.await 00:00:11 verbose #98 > > |> resultm.try' 00:00:11 verbose #99 > > 00:00:11 verbose #100 > > trace Verbose (fun () => "spiral_wasm.run") fun () => { retry 00:00:11 verbose #101 > > result } 00:00:11 verbose #102 > > 00:00:11 verbose #103 > > result 00:00:11 verbose #104 > > |> near_workspaces.logs 00:00:11 verbose #105 > > |> am'.vec_map sm'.ref_to_std_string 00:00:11 verbose #106 > > |> am'.vec_for_each console.write_line 00:00:11 verbose #107 > > 00:00:11 verbose #108 > > result |> near_workspaces.print_usd retry 00:00:11 verbose #109 > > 00:00:11 verbose #110 > > inl result2 = result |> near_workspaces.into_result 00:00:11 verbose #111 > > 00:00:11 verbose #112 > > trace Verbose (fun () => "spiral_wasm.run") fun () => { result2 00:00:11 verbose #113 > > } 00:00:11 verbose #114 > > 00:00:11 verbose #115 > > inl receipt_failures = result |> 00:00:11 verbose #116 > > near_workspaces.receipt_failures 00:00:11 verbose #117 > > inl receipt_failures_len = receipt_failures |> am'.vec_len |> 00:00:11 verbose #118 > > i32 00:00:11 verbose #119 > > 00:00:11 verbose #120 > > trace Verbose 00:00:11 verbose #121 > > fun () => "spiral_wasm.run" 00:00:11 verbose #122 > > fun () => { receipt_failures_len receipt_failures } 00:00:11 verbose #123 > > 00:00:11 verbose #124 > > inl receipt_outcomes = result |> 00:00:11 verbose #125 > > near_workspaces.receipt_outcomes 00:00:11 verbose #126 > > inl receipt_outcomes_len = receipt_outcomes |> am'.vec_len |> 00:00:11 verbose #127 > > i32 00:00:11 verbose #128 > > 00:00:11 verbose #129 > > trace Verbose 00:00:11 verbose #130 > > fun () => "spiral_wasm.run" 00:00:11 verbose #131 > > fun () => { receipt_outcomes_len receipt_outcomes } 00:00:11 verbose #132 > > 00:00:11 verbose #133 > > inl json = result |> near_workspaces.json 00:00:11 verbose #134 > > 00:00:11 verbose #135 > > trace Verbose (fun () => "spiral_wasm.run") fun () => { json } 00:00:11 verbose #136 > > 00:00:11 verbose #137 > > inl borsh = result |> near_workspaces.borsh 00:00:11 verbose #138 > > 00:00:11 verbose #139 > > trace Verbose (fun () => "spiral_wasm.run") fun () => { borsh } 00:00:11 verbose #140 > > 00:00:11 verbose #141 > > inl error = { receipt_failures receipt_outcomes_len retry } |> 00:00:11 verbose #142 > > sm'.format 00:00:11 verbose #143 > > if receipt_failures_len > 0 00:00:11 verbose #144 > > then (Ok (Some error) : _ _ resultm.anyhow_error) |> resultm.box 00:00:11 verbose #145 > > elif receipt_outcomes_len > 1 00:00:11 verbose #146 > > then (Ok None : _ _ resultm.anyhow_error) |> resultm.box 00:00:11 verbose #147 > > else error |> resultm.anyhow_error |> resultm.err 00:00:11 verbose #148 > > |> async.new_future_move 00:00:11 verbose #149 > > 00:00:11 verbose #150 > > inl rec loop (retry : u8) = 00:00:11 verbose #151 > > inl max = 30 00:00:11 verbose #152 > > inl init () = 00:00:11 verbose #153 > > fun () => 00:00:11 verbose #154 > > retry 00:00:11 verbose #155 > > |> async.new_future_move 00:00:11 verbose #156 > > if retry >= max then 00:00:11 verbose #157 > > fun () => 00:00:11 verbose #158 > > init () 00:00:11 verbose #159 > > |> async.await 00:00:11 verbose #160 > > |> Error 00:00:11 verbose #161 > > |> async.new_future_move 00:00:11 verbose #162 > > else 00:00:11 verbose #163 > > inl result = 00:00:11 verbose #164 > > fn retry 00:00:11 verbose #165 > > |> async.await 00:00:11 verbose #166 > > |> resultm.map_error' sm'.format' 00:00:11 verbose #167 > > |> resultm.unbox 00:00:11 verbose #168 > > match result with 00:00:11 verbose #169 > > | Ok (None) => 00:00:11 verbose #170 > > fun () => 00:00:11 verbose #171 > > init () 00:00:11 verbose #172 > > |> async.await 00:00:11 verbose #173 > > |> Ok 00:00:11 verbose #174 > > |> async.new_future_move 00:00:11 verbose #175 > > | Ok (Some error) => 00:00:11 verbose #176 > > trace Critical (fun () => "spiral_wasm.run / Ok (Some 00:00:11 verbose #177 > > error)") fun () => { retry error } 00:00:11 verbose #178 > > fun () => 00:00:11 verbose #179 > > init () 00:00:11 verbose #180 > > |> async.await 00:00:11 verbose #181 > > |> Error 00:00:11 verbose #182 > > |> async.new_future_move 00:00:11 verbose #183 > > | Error error => 00:00:11 verbose #184 > > trace Warning (fun () => "spiral_wasm.run / Error error") 00:00:11 verbose #185 > > fun () => { retry error } 00:00:11 verbose #186 > > loop (retry + 1) 00:00:11 verbose #187 > > inl retries = 00:00:11 verbose #188 > > loop 1 00:00:11 verbose #189 > > |> async.await 00:00:11 verbose #190 > > 00:00:11 verbose #191 > > trace Verbose (fun () => "spiral_wasm.run") fun () => { retries } 00:00:11 verbose #192 > > 00:00:11 verbose #193 > > match retries with 00:00:11 verbose #194 > > | Ok retries => Ok retries |> resultm.box 00:00:11 verbose #195 > > | Error retries => { retries } |> sm'.format |> resultm.anyhow_error |> 00:00:11 verbose #196 > > resultm.err 00:00:11 verbose #197 > > 00:00:11 verbose #198 > > |> async.new_future_move 00:00:12 verbose #199 > > 00:00:12 verbose #200 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:12 verbose #201 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:12 verbose #202 > > │ ### main │ 00:00:12 verbose #203 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:12 verbose #204 > > 00:00:12 verbose #205 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:12 verbose #206 > > ///! _ 00:00:12 verbose #207 > > 00:00:12 verbose #208 > > inl main (args : array_base string) = 00:00:12 verbose #209 > > inl command = get_command () 00:00:12 verbose #210 > > inl arg_matches = command |> runtime.command_get_matches 00:00:12 verbose #211 > > 00:00:12 verbose #212 > > inl trace_level = 00:00:12 verbose #213 > > arg_matches 00:00:12 verbose #214 > > |> runtime.matches_get_one (get_args () .trace_level |> fst) 00:00:12 verbose #215 > > |> optionm'.unbox 00:00:12 verbose #216 > > |> optionm.map ( 00:00:12 verbose #217 > > sm'.from_std_string 00:00:12 verbose #218 > > >> reflection.union_try_pick 00:00:12 verbose #219 > > ) 00:00:12 verbose #220 > > |> optionm'.flatten 00:00:12 verbose #221 > > |> optionm'.default_value Verbose 00:00:12 verbose #222 > > 00:00:12 verbose #223 > > inl trace_state = get_trace_state_or_init (Some trace_level) 00:00:12 verbose #224 > > 00:00:12 verbose #225 > > trace Verbose 00:00:12 verbose #226 > > fun () => $'$"spiral_wasm.main"' 00:00:12 verbose #227 > > fun () => { args } 00:00:12 verbose #228 > > 00:00:12 verbose #229 > > inl exception : bool = 00:00:12 verbose #230 > > arg_matches 00:00:12 verbose #231 > > |> runtime.matches_get_flag (get_args () .exception |> fst) 00:00:12 verbose #232 > > 00:00:12 verbose #233 > > inl result = 00:00:12 verbose #234 > > arg_matches 00:00:12 verbose #235 > > |> run 00:00:12 verbose #236 > > |> async.block_on 00:00:12 verbose #237 > > |> resultm.map_error' sm'.format' 00:00:12 verbose #238 > > 00:00:12 verbose #239 > > match result |> resultm.ok' |> optionm'.unbox with 00:00:12 verbose #240 > > | Some retries when exception => "spiral_wasm.main / exception=true" |> 00:00:12 verbose #241 > > resultm.err |> resultm.unwrap' 00:00:12 verbose #242 > > | None when exception => () 00:00:12 verbose #243 > > | Some retries => retries |> ignore 00:00:12 verbose #244 > > | None => result |> resultm.unwrap' |> ignore 00:00:12 verbose #245 > > 00:00:12 verbose #246 > > 0i32 00:00:12 verbose #247 > > 00:00:12 verbose #248 > > inl main () = 00:00:12 verbose #249 > > $'let main args = !main args' : () 00:00:15 verbose #250 > 00:00:14 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 8786 } 00:00:15 verbose #251 > 00:00:14 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:00:15 verbose #252 > "nbconvert", 00:00:15 verbose #253 > "c:/home/git/polyglot/apps/spiral/wasm/spiral_wasm.dib.ipynb", 00:00:15 verbose #254 > "--to", 00:00:15 verbose #255 > "html", 00:00:15 verbose #256 > "--HTMLExporter.theme=dark", 00:00:15 verbose #257 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/apps/spiral/wasm/spiral_wasm.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:18 verbose #258 > 00:00:17 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/spiral/wasm/spiral_wasm.dib.ipynb to html 00:00:18 verbose #259 > 00:00:17 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:00:18 verbose #260 > 00:00:17 verbose #7 ! validate(nb) 00:00:20 verbose #261 > 00:00:19 verbose #8 ! [NbConvertApp] Writing 302458 bytes to c:\home\git\polyglot\apps\spiral\wasm\spiral_wasm.dib.html 00:00:20 verbose #262 > 00:00:19 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 665 } 00:00:20 verbose #263 > 00:00:19 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 665 } 00:00:20 verbose #264 > 00:00:19 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:00:20 verbose #265 > "-c", 00:00:20 verbose #266 > "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/wasm/spiral_wasm.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:00:20 verbose #267 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/wasm/spiral_wasm.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:21 verbose #268 > 00:00:20 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:00:21 verbose #269 > 00:00:20 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:00:21 verbose #270 > 00:00:20 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 9510 } 00:00:21 debug #271 runtime.execute_with_options_async / { exit_code = 0; output_length = 12739 } 00:00:21 debug #1 main / executeCommand / exitCode: 0 / command: ../../../workspace/target/release/spiral_builder.exe dib --path spiral_wasm.dib 00:00:00 debug #1 writeDibCode / output: Spi / path: spiral_wasm.dib 00:00:00 debug #2 parseDibCode / output: Spi / file: spiral_wasm.dib 00:00:00 verbose #1 async.run_with_timeout_async / { timeout = 180 } 00:00:01 verbose #2 async.run_with_timeout_async / { timeout = 180 } 00:00:01 debug #1 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_wasm.spi 00:00:01 debug #2 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_wasm.spi 00:00:01 debug #3 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_wasm.spi 00:00:01 verbose #4 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # spiral_wasm\nopen rust.rust_operators\nopen rust\nopen sm\u0027_operat...s = !main args\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/apps/spiral/wasm/spiral_wasm.spi"}} / result: 00:00:01 verbose #5 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/apps/spiral/wasm/spiral_wasm.spi"}} / result: 00:00:02 debug #6 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_wasm.spi 00:00:02 debug #7 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_wasm.spi 00:00:02 debug #8 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_wasm.spi 00:00:02 debug #9 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_wasm.spi 00:00:03 debug #10 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_wasm.spi 00:00:03 debug #11 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_wasm.spi 00:00:03 debug #12 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_wasm.spi 00:00:03 debug #13 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_wasm.spi 00:00:04 debug #14 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_wasm.spi 00:00:04 debug #15 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_wasm.spi 00:00:04 debug #16 Supervisor.buildFile / AsyncSeq.scan / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("&$0")>] type Ref<'T> = class end #else type Ref<'T> = 'T #endif #if FABLE_COMPILER [<Fable.Co... let _v347 = () #endif _v347 () 0 let v0 : ((string []) -> int32) = closure0() let main args = v0 args () / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: spiral_wasm.spi 00:00:04 debug #17 Supervisor.buildFile / takeWhileInclusive / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("&$0")>] type Ref<'T> = class end #else type Ref<'T> = 'T #endif #if FABLE_COMPILER [<Fable.Co... let _v347 = () #endif _v347 () 0 let v0 : ((string []) -> int32) = closure0() let main args = v0 args () / errors: [] / typeErrorCount: 0 / retry: 0 / path: spiral_wasm.spi 00:00:04 debug #18 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:00 debug #1 persistCodeProject / packages: [Fable.Core] / modules: [lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / name: spiral_wasm / hash: / code.Length: 572070 targetDir: C:\home\git\polyglot\target\Builder\spiral_wasm Fable 4.21.0: F# to Rust compiler (status: alpha) Thanks to the contributor! @tomcl Stand with Ukraine! https://standwithukraine.com.ua/ Parsing target\Builder\spiral_wasm\spiral_wasm.fsproj... Retrieving project options from cache, in case of issues run `dotnet fable clean` or try `--noCache` option. Project and references (14 source files) parsed in 320ms Started Fable compilation... Fable compilation finished in 19963ms .\lib\spiral\common.fsx(1458,0): (1458,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\sm.fsx(450,0): (450,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\crypto.fsx(1612,0): (1612,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\date_time.fsx(997,0): (997,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\async_.fsx(76,0): (76,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\threading.fsx(127,0): (127,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\networking.fsx(3719,0): (3719,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\platform.fsx(104,0): (104,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\runtime.fsx(4778,0): (4778,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\file_system.fsx(55820,0): (55820,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\trace.fsx(1490,0): (1490,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! Directory: C:\home\git\polyglot\target\Builder\spiral_wasm\target Mode LastWriteTime Length Name ---- ------------- ------ ---- d---- 2024-09-21 10:02 PM rs Compiling autocfg v1.4.0 Compiling libc v0.2.159 Compiling syn v2.0.79 Compiling winnow v0.6.20 Compiling rustls-pki-types v1.9.0 Compiling flate2 v1.0.34 Compiling lock_api v0.4.12 Compiling slab v0.4.9 Compiling num-traits v0.2.19 Compiling num-bigint v0.3.3 Compiling parking_lot_core v0.9.10 Compiling getrandom v0.2.15 Compiling signal-hook-registry v1.4.2 Compiling jobserver v0.1.32 Compiling parking_lot v0.12.3 Compiling socket2 v0.5.7 Compiling mio v1.0.2 Compiling rand_core v0.6.4 Compiling cc v1.1.22 Compiling toml_edit v0.22.22 Compiling num_cpus v1.16.0 Compiling indexmap v1.9.3 Compiling num-rational v0.3.2 Compiling openssl-src v300.3.2+3.3.2 Compiling num-integer v0.1.46 Compiling darling_core v0.20.10 Compiling serde_derive_internals v0.29.1 Compiling ordered-float v4.3.0 Compiling zstd-sys v2.0.13+zstd.1.5.6 Compiling ring v0.17.8 Compiling proc-macro-crate v3.2.0 Compiling bzip2-sys v0.1.11+1.0.8 Compiling openssl-sys v0.9.103 Compiling secp256k1-sys v0.8.1 Compiling serde_derive v1.0.210 Compiling zerocopy-derive v0.7.35 Compiling tracing-attributes v0.1.27 Compiling tokio-macros v2.4.0 Compiling tokio v1.40.0 Compiling zerocopy v0.7.35 Compiling tracing v0.1.40 Compiling futures-macro v0.3.30 Compiling ahash v0.8.11 Compiling syn_derive v0.1.8 Compiling futures-util v0.3.30 Compiling serde v1.0.210 Compiling borsh-derive v1.5.1 Compiling ppv-lite86 v0.2.20 Compiling hashbrown v0.14.5 Compiling thiserror-impl v1.0.64 Compiling rand_chacha v0.3.1 Compiling serde_json v1.0.128 Compiling rand v0.8.5 Compiling indexmap v2.5.0 Compiling thiserror v1.0.64 Compiling tokio-util v0.7.12 Compiling borsh v1.5.1 Compiling hex v0.4.3 Compiling async-trait v0.1.83 Compiling deranged v0.3.11 Compiling futures-executor v0.3.30 Compiling serde_repr v0.1.19 Compiling pin-project-internal v1.1.5 Compiling time v0.3.36 Compiling h2 v0.3.26 Compiling near-account-id v1.0.0 Compiling tracing-subscriber v0.3.18 Compiling tokio-stream v0.1.16 Compiling pin-project v1.1.5 Compiling derive_arbitrary v1.3.2 Compiling curve25519-dalek-derive v0.1.1 Compiling enum-map-derive v0.17.0 Compiling derive_more v0.99.18 Compiling curve25519-dalek v4.1.3 Compiling arbitrary v1.3.2 Compiling enum-map v2.7.3 Compiling tower v0.4.13 Compiling axum-core v0.3.4 Compiling opentelemetry v0.22.0 Compiling hyper v0.14.30 Compiling tokio-io-timeout v1.2.0 Compiling darling_macro v0.20.10 Compiling prost-derive v0.12.6 Compiling async-stream-impl v0.3.5 Compiling near-primitives-core v0.23.0 Compiling darling v0.20.10 Compiling opentelemetry_sdk v0.22.1 Compiling async-stream v0.3.5 Compiling prost v0.12.6 Compiling ed25519-dalek v2.1.1 Compiling uint v0.9.5 Compiling hyper-timeout v0.4.1 Compiling axum v0.6.20 Compiling openssl-macros v0.1.1 Compiling schemars_derive v0.8.21 Compiling secp256k1 v0.27.0 Compiling primitive-types v0.10.1 Compiling near-config-utils v0.23.0 Compiling actix-rt v2.10.0 Compiling actix_derive v0.6.2 Compiling actix-macros v0.2.4 Compiling near-crypto v0.23.0 Compiling zstd-safe v7.2.1 Compiling actix v0.13.5 Compiling futures v0.3.30 Compiling url v2.5.2 Compiling clap_derive v4.5.18 Compiling tracing-opentelemetry v0.23.0 Compiling serde_with_macros v3.9.0 Compiling tracing-appender v0.2.3 Compiling tonic v0.11.0 Compiling near-time v0.23.0 Compiling near-rpc-error-core v0.23.0 Compiling clap v4.5.18 Compiling h2 v0.4.6 Compiling serde_yaml v0.9.34+deprecated Compiling prometheus v0.13.4 Compiling semver v1.0.23 Compiling chrono v0.4.38 Compiling enumflags2_derive v0.7.10 Compiling dirs-sys-next v0.1.2 Compiling polling v2.8.0 Compiling memoffset v0.7.1 Compiling enumflags2 v0.7.10 Compiling near-parameters v0.23.0 Compiling dirs-next v2.0.0 Compiling near-rpc-error-macro v0.23.0 Compiling hyper v1.4.1 Compiling serde_with v3.9.0 Compiling opentelemetry-proto v0.5.0 Compiling near-performance-metrics v0.23.0 Compiling zstd v0.13.2 Compiling near-fmt v0.23.0 Compiling zstd-safe v5.0.2+zstd.1.5.2 Compiling bytesize v1.3.0 Compiling near-async-derive v0.23.0 Compiling filetime v0.2.25 Compiling io-lifetimes v1.0.11 Compiling async-io v1.13.0 Compiling async-fs v1.6.0 Compiling rustix v0.37.27 Compiling near-primitives v0.23.0 Compiling schemars v0.8.21 Compiling zvariant v3.15.2 Compiling opentelemetry-otlp v0.15.0 Compiling hyper-util v0.1.9 Compiling rustls-webpki v0.102.8 Compiling http-body-util v0.1.2 Compiling rustls v0.23.13 Compiling backtrace v0.3.71 Compiling num-bigint v0.4.6 Compiling socket2 v0.4.10 Compiling portable-atomic v1.9.0 Compiling num-rational v0.4.2 Compiling password-hash v0.4.2 Compiling zbus_names v2.6.1 Compiling nix v0.26.4 Compiling zstd v0.11.2+zstd.1.5.2 Compiling near-o11y v0.23.0 Compiling bzip2 v0.4.4 Compiling signal-hook v0.3.17 Compiling webpki-roots v0.26.6 Compiling tracing-error v0.2.0 Compiling serde_urlencoded v0.7.1 Compiling async-recursion v1.1.1 Compiling num-iter v0.1.45 Compiling num-complex v0.4.6 Compiling mio v0.8.11 Compiling xdg-home v1.3.0 Compiling async-executor v1.13.1 Compiling rustls-pemfile v2.1.3 Compiling zbus v3.15.2 Compiling zip v0.6.6 Compiling dirs-sys v0.4.1 Compiling ureq v2.10.1 Compiling color-spantrace v0.2.1 Compiling signal-hook-mio v0.2.4 Compiling num v0.4.3 Compiling tar v0.4.42 Compiling pbkdf2 v0.11.0 Compiling near-async v0.23.0 Compiling near-abi v0.4.3 Compiling near_schemafy_core v0.7.0 Compiling serde_spanned v0.6.8 Compiling toml_datetime v0.6.8 Compiling scroll_derive v0.11.1 Compiling fs2 v0.4.3 Compiling console v0.15.8 Compiling indicatif v0.17.8 Compiling binary-install v0.2.0 Compiling string_cache v0.8.7 Compiling scroll v0.11.0 Compiling csv v1.3.0 Compiling secret-service v3.1.0 Compiling near-chain-configs v0.23.0 Compiling near_schemafy_lib v0.7.0 Compiling crossterm v0.25.0 Compiling color-eyre v0.6.3 Compiling dirs v5.0.1 Compiling near-token v0.2.1 Compiling term v0.7.0 Compiling is-terminal v0.4.13 Compiling memmap2 v0.5.10 Compiling linux-keyutils v0.2.4 Compiling tempfile v3.13.0 Compiling goblin v0.5.4 Compiling bip39 v2.0.0 Compiling open v5.3.0 Compiling elementtree v0.7.0 Compiling near-sandbox-utils v0.8.0 Compiling prettytable v0.10.0 Compiling inquire v0.7.5 Compiling keyring v2.3.3 Compiling symbolic-common v8.8.0 Compiling shellexpand v3.1.0 Compiling near-abi-client-impl v0.1.1 Compiling toml v0.8.19 Compiling slipped10 v0.4.6 Compiling camino v1.1.9 Compiling tracing-indicatif v0.3.6 Compiling rust_decimal v1.36.0 Compiling near-gas v0.2.5 Compiling wasmparser v0.211.1 Compiling zip v0.5.13 Compiling cargo-platform v0.1.8 Compiling linked-hash-map v0.5.6 Compiling smart-default v0.7.1 Compiling symbolic-debuginfo v8.8.0 Compiling cargo_metadata v0.18.1 Compiling near-abi-client-macros v0.1.1 Compiling near-jsonrpc-primitives v0.23.0 Compiling near-workspaces v0.11.1 Compiling names v0.14.0 Compiling block-buffer v0.11.0-rc.2 Compiling rustc_version v0.4.1 Compiling jsonptr v0.4.7 Compiling strum_macros v0.26.4 Compiling atty v0.2.14 Compiling digest v0.11.0-pre.9 Compiling json-patch v2.0.0 Compiling near-sandbox-utils v0.9.0 Compiling near-abi-client v0.1.1 Compiling near-sdk-macros v5.5.0 Compiling tokio-retry v0.3.0 Compiling near-token v0.3.0 Compiling near-gas v0.3.0 Compiling uuid v1.10.0 Compiling fable_library_rust v0.1.0 (/mnt/c/home/git/polyglot/lib/rust/fable/fable_modules/fable-library-rust) Compiling sha2 v0.11.0-pre.4 Compiling near-sandbox-utils v0.11.0 Compiling near-sdk v5.5.0 Compiling openssl v0.10.66 Compiling native-tls v0.2.12 Compiling crypto-hash v0.3.4 Compiling cargo-util v0.1.2 Compiling tokio-native-tls v0.3.1 Compiling hyper-tls v0.6.0 Compiling reqwest v0.12.7 Compiling near-jsonrpc-client v0.10.1 Compiling near-socialdb-client v0.3.2 Compiling near-cli-rs v0.11.1 Compiling cargo-near v0.6.4 Compiling spiral_wasm v0.0.1 (/mnt/c/home/git/polyglot/apps/spiral/wasm) Finished `release` profile [optimized] target(s) in 28m 11s
In [ ]:
{ pwsh ../lib/math/build.ps1 } | Invoke-Block
00:00:00 verbose #1 async.run_with_timeout_async / { timeout = 180 } 00:00:01 debug #1 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path math.dib --retries 1; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:01 verbose #2 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "math.dib", "--retries", "1"])) } 00:00:01 verbose #3 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:00:01 verbose #4 > "repl", 00:00:01 verbose #5 > "--exit-after-run", 00:00:01 verbose #6 > "--run", 00:00:01 verbose #7 > "c:/home/git/polyglot/lib/math/math.dib", 00:00:01 verbose #8 > "--output-path", 00:00:01 verbose #9 > "c:/home/git/polyglot/lib/math/math.dib.ipynb", 00:00:01 verbose #10 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/math/math.dib" --output-path "c:/home/git/polyglot/lib/math/math.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:00:04 verbose #11 > > 00:00:04 verbose #12 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:04 verbose #13 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:04 verbose #14 > > │ # math │ 00:00:04 verbose #15 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:11 verbose #16 > > 00:00:11 verbose #17 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:11 verbose #18 > > open testing 00:00:11 verbose #19 > > open rust.rust_operators 00:00:11 verbose #20 > > open rust 00:00:15 verbose #21 > > 00:00:15 verbose #22 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:15 verbose #23 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:15 verbose #24 > > │ ## complex │ 00:00:15 verbose #25 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:15 verbose #26 > > 00:00:15 verbose #27 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:15 verbose #28 > > nominal complex t = 00:00:15 verbose #29 > > `( 00:00:15 verbose #30 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:00:15 verbose #31 > > Fable.Core.Emit(\"num_complex::Complex<$0>\")>]]\n#endif\ntype 00:00:15 verbose #32 > > num_complex_Complex<'T> = class end" 00:00:15 verbose #33 > > $'' : $'num_complex_Complex<`t>' 00:00:15 verbose #34 > > ) 00:00:15 verbose #35 > > 00:00:15 verbose #36 > > inl complex forall t. ((re : t), (im : t)) : complex t = 00:00:15 verbose #37 > > !\\((re, im), $'"num_complex::Complex::new($0, $1)"') 00:00:16 verbose #38 > > 00:00:16 verbose #39 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:16 verbose #40 > > //// test 00:00:16 verbose #41 > > ///! rust -d num-complex 00:00:16 verbose #42 > > 00:00:16 verbose #43 > > complex (0f64, 0f64) 00:00:16 verbose #44 > > |> sm'.format' 00:00:16 verbose #45 > > |> sm'.from_std_string 00:00:16 verbose #46 > > |> _assert_eq "0+0i" 00:01:13 verbose #47 > > 00:01:13 verbose #48 > > ╭─[ 57.12s - return value ]────────────────────────────────────────────────────╮ 00:01:13 verbose #49 > > │ __assert_eq / actual: "0+0i" / expected: "0+0i" │ 00:01:13 verbose #50 > > │ │ 00:01:13 verbose #51 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:13 verbose #52 > > 00:01:13 verbose #53 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:13 verbose #54 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:13 verbose #55 > > │ ## re │ 00:01:13 verbose #56 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:13 verbose #57 > > 00:01:13 verbose #58 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:13 verbose #59 > > inl re forall t. (c : complex t) : t = 00:01:13 verbose #60 > > !\\(c, $'"$0.re"') 00:01:13 verbose #61 > > 00:01:13 verbose #62 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:13 verbose #63 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:13 verbose #64 > > │ ## im │ 00:01:13 verbose #65 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:13 verbose #66 > > 00:01:13 verbose #67 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:13 verbose #68 > > inl im forall t. (c : complex t) : t = 00:01:13 verbose #69 > > !\\(c, $'"$0.im"') 00:01:14 verbose #70 > > 00:01:14 verbose #71 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:14 verbose #72 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:14 verbose #73 > > │ ## complex_unbox │ 00:01:14 verbose #74 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:14 verbose #75 > > 00:01:14 verbose #76 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:14 verbose #77 > > inl complex_unbox forall t. (c : complex t) = 00:01:14 verbose #78 > > re c, im c 00:01:14 verbose #79 > > 00:01:14 verbose #80 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:14 verbose #81 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:14 verbose #82 > > │ ## (~.^) │ 00:01:14 verbose #83 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:14 verbose #84 > > 00:01:14 verbose #85 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:14 verbose #86 > > inl (~.^) c = complex c 00:01:15 verbose #87 > > 00:01:15 verbose #88 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:15 verbose #89 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:15 verbose #90 > > │ ## complex_eq │ 00:01:15 verbose #91 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:15 verbose #92 > > 00:01:15 verbose #93 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:15 verbose #94 > > inl complex_eq forall t. (a : complex t) (b : complex t) : bool = 00:01:15 verbose #95 > > !\\((a, b), $'"$0 == $1"') 00:01:15 verbose #96 > > 00:01:15 verbose #97 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:15 verbose #98 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:15 verbose #99 > > │ ## (.=) │ 00:01:15 verbose #100 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:15 verbose #101 > > 00:01:15 verbose #102 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:15 verbose #103 > > inl (.=) a b = complex_eq a b 00:01:16 verbose #104 > > 00:01:16 verbose #105 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:16 verbose #106 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:16 verbose #107 > > │ ## equable complex │ 00:01:16 verbose #108 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:16 verbose #109 > > 00:01:16 verbose #110 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:16 verbose #111 > > instance equable complex t = complex_eq 00:01:16 verbose #112 > > 00:01:16 verbose #113 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:16 verbose #114 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:16 verbose #115 > > │ ## complex_add │ 00:01:16 verbose #116 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:16 verbose #117 > > 00:01:16 verbose #118 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:16 verbose #119 > > inl complex_add forall t. (a : complex t) (b : complex t) : complex t = 00:01:16 verbose #120 > > !\\((a, b), $'"$0 + $1"') 00:01:17 verbose #121 > > 00:01:17 verbose #122 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:17 verbose #123 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:17 verbose #124 > > │ ## (.+) │ 00:01:17 verbose #125 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:17 verbose #126 > > 00:01:17 verbose #127 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:17 verbose #128 > > inl (.+) a b = complex_add a b 00:01:18 verbose #129 > > 00:01:18 verbose #130 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:18 verbose #131 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:18 verbose #132 > > │ ## complex_sub │ 00:01:18 verbose #133 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:18 verbose #134 > > 00:01:18 verbose #135 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:18 verbose #136 > > inl complex_sub forall t. (a : complex t) (b : complex t) : complex t = 00:01:18 verbose #137 > > !\\((a, b), $'"$0 - $1"') 00:01:18 verbose #138 > > 00:01:18 verbose #139 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:18 verbose #140 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:18 verbose #141 > > │ ## (.-) │ 00:01:18 verbose #142 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:18 verbose #143 > > 00:01:18 verbose #144 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:18 verbose #145 > > inl (.-) a b = complex_sub a b 00:01:19 verbose #146 > > 00:01:19 verbose #147 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:19 verbose #148 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:19 verbose #149 > > │ ## complex_mult │ 00:01:19 verbose #150 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:19 verbose #151 > > 00:01:19 verbose #152 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:19 verbose #153 > > inl complex_mult forall t. (a : complex t) (b : complex t) : complex t = 00:01:19 verbose #154 > > !\\((a, b), $'"$0 * $1"') 00:01:19 verbose #155 > > 00:01:19 verbose #156 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:19 verbose #157 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:19 verbose #158 > > │ ## (.*) │ 00:01:19 verbose #159 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:19 verbose #160 > > 00:01:19 verbose #161 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:19 verbose #162 > > inl (.*) a b = complex_mult a b 00:01:20 verbose #163 > > 00:01:20 verbose #164 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:20 verbose #165 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:20 verbose #166 > > │ ## complex_div │ 00:01:20 verbose #167 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:20 verbose #168 > > 00:01:20 verbose #169 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:20 verbose #170 > > inl complex_div forall t. (a : complex t) (b : complex t) : complex t = 00:01:20 verbose #171 > > !\\((a, b), $'"$0 / $1"') 00:01:20 verbose #172 > > 00:01:20 verbose #173 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:20 verbose #174 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:20 verbose #175 > > │ ## (./) │ 00:01:20 verbose #176 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:20 verbose #177 > > 00:01:20 verbose #178 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:20 verbose #179 > > inl (./) a b = complex_div a b 00:01:21 verbose #180 > > 00:01:21 verbose #181 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:21 verbose #182 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:21 verbose #183 > > │ ## powc │ 00:01:21 verbose #184 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:21 verbose #185 > > 00:01:21 verbose #186 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:21 verbose #187 > > inl powc forall t. (s : complex t) (c : complex t) : complex t = 00:01:21 verbose #188 > > !\\((c, s), $'"num_complex::Complex::powc($0, $1)"') 00:01:21 verbose #189 > > 00:01:21 verbose #190 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:21 verbose #191 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:21 verbose #192 > > │ ## (.**) │ 00:01:21 verbose #193 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:21 verbose #194 > > 00:01:21 verbose #195 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:21 verbose #196 > > inl (.**) a b = powc b a 00:01:22 verbose #197 > > 00:01:22 verbose #198 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:22 verbose #199 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:22 verbose #200 > > │ ## complex_sin │ 00:01:22 verbose #201 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:22 verbose #202 > > 00:01:22 verbose #203 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:22 verbose #204 > > inl complex_sin forall t. (c : complex t) : complex t = 00:01:22 verbose #205 > > !\\(c, $'"$0.sin()"') 00:01:22 verbose #206 > > 00:01:22 verbose #207 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:22 verbose #208 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:22 verbose #209 > > │ ## conj │ 00:01:22 verbose #210 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:22 verbose #211 > > 00:01:22 verbose #212 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:22 verbose #213 > > inl conj forall t. (c : complex t) : complex t = 00:01:22 verbose #214 > > !\\(c, $'"$0.conj()"') 00:01:23 verbose #215 > > 00:01:23 verbose #216 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:23 verbose #217 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:23 verbose #218 > > │ ## zeta │ 00:01:23 verbose #219 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:23 verbose #220 > > 00:01:23 verbose #221 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:23 verbose #222 > > inl zeta log (gamma : complex f64 -> complex f64) (s : complex f64) : complex 00:01:23 verbose #223 > > f64 = 00:01:23 verbose #224 > > inl rec zeta count gamma s = 00:01:23 verbose #225 > > if log then 00:01:23 verbose #226 > > !\\((count, s), $'"println\!(\\\"zeta / count: {:?} / s: {:?}\\\", 00:01:23 verbose #227 > > $0, $1)"') 00:01:23 verbose #228 > > if re s > 1 then 00:01:23 verbose #229 > > (.^(0, 0), (am.init 10000i32 id : a i32 _)) 00:01:23 verbose #230 > > ||> am.fold fun acc n => 00:01:23 verbose #231 > > acc .+ (.^(1, 0) ./ (.^(f64 n, 0) .** s)) 00:01:23 verbose #232 > > else 00:01:23 verbose #233 > > inl gamma_term = gamma (.^(1, 0) .- s) 00:01:23 verbose #234 > > inl sin_term = .^(pi, 0) .* s ./ .^(2, 0) |> complex_sin 00:01:23 verbose #235 > > inl one_minus_s = .^(1 - re s, -(im s)) 00:01:23 verbose #236 > > inl mirror_term = 00:01:23 verbose #237 > > if re one_minus_s <= 1 00:01:23 verbose #238 > > then .^(0, 0) 00:01:23 verbose #239 > > else 00:01:23 verbose #240 > > if count <= 3 00:01:23 verbose #241 > > then zeta (count + 1) gamma one_minus_s 00:01:23 verbose #242 > > else one_minus_s 00:01:23 verbose #243 > > inl reflection_formula = 00:01:23 verbose #244 > > .^(2, 0) .* (.^(pi, 0) .** s) .* sin_term .* gamma_term .* 00:01:23 verbose #245 > > mirror_term 00:01:23 verbose #246 > > reflection_formula 00:01:23 verbose #247 > > join zeta 0i32 gamma s 00:01:23 verbose #248 > > 00:01:23 verbose #249 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:23 verbose #250 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:23 verbose #251 > > │ ## bound │ 00:01:23 verbose #252 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:23 verbose #253 > > 00:01:23 verbose #254 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:23 verbose #255 > > nominal bound t = 00:01:23 verbose #256 > > `( 00:01:23 verbose #257 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:01:23 verbose #258 > > Fable.Core.Emit(\"pyo3::Bound<$0>\")>]]\n#endif\ntype pyo3_Bound<'T> = class 00:01:23 verbose #259 > > end" 00:01:23 verbose #260 > > $'' : $'pyo3_Bound<`t>' 00:01:23 verbose #261 > > ) 00:01:24 verbose #262 > > 00:01:24 verbose #263 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:24 verbose #264 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:24 verbose #265 > > │ ## python │ 00:01:24 verbose #266 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:24 verbose #267 > > 00:01:24 verbose #268 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:24 verbose #269 > > nominal python = 00:01:24 verbose #270 > > `( 00:01:24 verbose #271 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:01:24 verbose #272 > > Fable.Core.Emit(\"pyo3::Python\")>]]\n#endif\ntype pyo3_Python = class end" 00:01:24 verbose #273 > > $'' : $'pyo3_Python' 00:01:24 verbose #274 > > ) 00:01:24 verbose #275 > > 00:01:24 verbose #276 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:24 verbose #277 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:24 verbose #278 > > │ ## pymodule │ 00:01:24 verbose #279 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:24 verbose #280 > > 00:01:24 verbose #281 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:24 verbose #282 > > nominal pymodule = 00:01:24 verbose #283 > > `( 00:01:24 verbose #284 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:01:24 verbose #285 > > Fable.Core.Emit(\"pyo3::types::PyModule\")>]]\n#endif\ntype pyo3_types_PyModule 00:01:24 verbose #286 > > = class end" 00:01:24 verbose #287 > > $'' : $'pyo3_types_PyModule' 00:01:24 verbose #288 > > ) 00:01:25 verbose #289 > > 00:01:25 verbose #290 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:25 verbose #291 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:25 verbose #292 > > │ ## pyany │ 00:01:25 verbose #293 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:25 verbose #294 > > 00:01:25 verbose #295 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:25 verbose #296 > > nominal pyany = 00:01:25 verbose #297 > > `( 00:01:25 verbose #298 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:01:25 verbose #299 > > Fable.Core.Emit(\"pyo3::PyAny\")>]]\n#endif\ntype pyo3_PyAny = class end" 00:01:25 verbose #300 > > $'' : $'pyo3_PyAny' 00:01:25 verbose #301 > > ) 00:01:25 verbose #302 > > 00:01:25 verbose #303 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:25 verbose #304 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:25 verbose #305 > > │ ## pyerr │ 00:01:25 verbose #306 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:25 verbose #307 > > 00:01:25 verbose #308 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:25 verbose #309 > > nominal pyerr = 00:01:25 verbose #310 > > `( 00:01:25 verbose #311 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:01:25 verbose #312 > > Fable.Core.Emit(\"pyo3::PyErr\")>]]\n#endif\ntype pyo3_PyErr = class end" 00:01:25 verbose #313 > > $'' : $'pyo3_PyErr' 00:01:25 verbose #314 > > ) 00:01:26 verbose #315 > > 00:01:26 verbose #316 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:26 verbose #317 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:26 verbose #318 > > │ ## eval │ 00:01:26 verbose #319 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:26 verbose #320 > > 00:01:26 verbose #321 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:26 verbose #322 > > inl module_from_code (py : python) (code : string) : _ (bound pymodule) _ = 00:01:26 verbose #323 > > inl py = join py 00:01:26 verbose #324 > > inl code = code |> sm'.as_str 00:01:26 verbose #325 > > !\\(code, $'"pyo3::types::PyModule::from_code_bound(!py, $0, \\"\\", 00:01:26 verbose #326 > > \\"\\")"') 00:01:26 verbose #327 > > |> resultm.map_error'' fun (x : pyerr) => x |> sm'.format' 00:01:26 verbose #328 > > 00:01:26 verbose #329 > > inl use_pyanymethods () = 00:01:26 verbose #330 > > global "Fable.Core.RustInterop.emitRustExpr () \");\nuse 00:01:26 verbose #331 > > pyo3::prelude::PyAnyMethods;\n//\"" 00:01:26 verbose #332 > > 00:01:26 verbose #333 > > inl getattr (attr : string) (module : bound pymodule) : _ (bound pyany) _ = 00:01:26 verbose #334 > > inl attr = join attr 00:01:26 verbose #335 > > inl attr = attr |> sm'.as_str 00:01:26 verbose #336 > > inl module = join module 00:01:26 verbose #337 > > use_pyanymethods () 00:01:26 verbose #338 > > !\\(attr, $'"!module.getattr($0)"') 00:01:26 verbose #339 > > |> resultm.map_error'' fun (x : pyerr) => x |> sm'.format' 00:01:26 verbose #340 > > 00:01:26 verbose #341 > > inl call forall t. (args : t) (module : bound pyany) : _ (bound pyany) _ = 00:01:26 verbose #342 > > inl args = join args 00:01:26 verbose #343 > > inl module = join module 00:01:26 verbose #344 > > !\($'"pyo3::prelude::PyAnyMethods::call(&!module, ((*!args).0, *(*!args).1), 00:01:26 verbose #345 > > None)"') 00:01:26 verbose #346 > > |> resultm.map_error'' fun (x : pyerr) => x |> sm'.format' 00:01:26 verbose #347 > > 00:01:26 verbose #348 > > inl extract forall t. (result : bound pyany) : _ t _ = 00:01:26 verbose #349 > > inl result = join result 00:01:26 verbose #350 > > use_pyanymethods () 00:01:26 verbose #351 > > !\($'"!result.extract()"') 00:01:26 verbose #352 > > |> resultm.map_error'' fun (x : pyerr) => x |> sm'.format' 00:01:26 verbose #353 > > 00:01:26 verbose #354 > > inl eval py code (args : pair bool (pair f64 f64)) : _ (_ f64) sm'.std_string = 00:01:26 verbose #355 > > inl code = 00:01:26 verbose #356 > > code 00:01:26 verbose #357 > > |> module_from_code py 00:01:26 verbose #358 > > |> resultm.unwrap' 00:01:26 verbose #359 > > inl fn = 00:01:26 verbose #360 > > code 00:01:26 verbose #361 > > |> getattr "fn" 00:01:26 verbose #362 > > |> resultm.unwrap' 00:01:26 verbose #363 > > 00:01:26 verbose #364 > > fn 00:01:26 verbose #365 > > |> call args 00:01:26 verbose #366 > > |> resultm.try' 00:01:26 verbose #367 > > |> extract 00:01:26 verbose #368 > > |> resultm.try' 00:01:26 verbose #369 > > |> complex 00:01:26 verbose #370 > > |> Ok 00:01:26 verbose #371 > > |> resultm.box 00:01:26 verbose #372 > > 00:01:26 verbose #373 > > inl call1_ log py s code = 00:01:26 verbose #374 > > inl code = join (a code : _ i32 _) |> sm'.concat_array_trailing "\n" 00:01:26 verbose #375 > > 00:01:26 verbose #376 > > inl s = new_pair (re s) (im s) 00:01:26 verbose #377 > > inl args = new_pair log s 00:01:26 verbose #378 > > 00:01:26 verbose #379 > > eval py code args 00:01:26 verbose #380 > > 00:01:26 verbose #381 > > inl call1_ log name py s line = 00:01:26 verbose #382 > > inl s = join s 00:01:26 verbose #383 > > join 00:01:26 verbose #384 > > ;[[ 00:01:26 verbose #385 > > $'$"import sys"' 00:01:26 verbose #386 > > $'$"import traceback"' 00:01:26 verbose #387 > > $'$"import re"' 00:01:26 verbose #388 > > $'$"count = 0"' 00:01:26 verbose #389 > > $'$"memory_address_pattern = re.compile(r\' at 0x[[0-9a-fA-F]]+\')"' 00:01:26 verbose #390 > > $'$"def trace_calls(frame, event, arg):"' 00:01:26 verbose #391 > > $'$" global count"' 00:01:26 verbose #392 > > $'$" count += 1"' 00:01:26 verbose #393 > > $'$" if count < 200:"' 00:01:26 verbose #394 > > $'$" try:"' 00:01:26 verbose #395 > > $'$" args = {{ k: v for k, v in frame.f_locals.items() if 00:01:26 verbose #396 > > frame.f_code.co_name \!= \'make_mpc\' and k not in [[\'ctx\']] and not 00:01:26 verbose #397 > > callable(v) }}"' 00:01:26 verbose #398 > > $'$" args_str = \', \'.join([[ 00:01:26 verbose #399 > > f\\\"{{k}}={{re.sub(memory_address_pattern, \' at 0x<?>\', repr(v))}}\\\" for k, 00:01:26 verbose #400 > > v in args.items() ]])"' 00:01:26 verbose #401 > > $'$" print(f\\\"{{event}}({!name}) / f_code.co_name: 00:01:26 verbose #402 > > {{frame.f_code.co_name}} / f_locals: {{args_str}} / f_lineno: {{frame.f_lineno}} 00:01:26 verbose #403 > > / f_code.co_filename: 00:01:26 verbose #404 > > {{frame.f_code.co_filename.split(\'site-packages\')[[-1]]}} / f_back.f_lineno: 00:01:26 verbose #405 > > {{ \'\' if frame.f_back is None else frame.f_back.f_lineno }} 00:01:26 verbose #406 > > f_back.f_code.co_filename: {{ \'\' if frame.f_back is None else 00:01:26 verbose #407 > > frame.f_back.f_code.co_filename.split(\'site-packages\')[[-1]] }} / arg: 00:01:26 verbose #408 > > {{re.sub(memory_address_pattern, \' at 0x<?>\', repr(arg))}}\\\", flush=True)"' 00:01:26 verbose #409 > > $'$" except ValueError as e:"' 00:01:26 verbose #410 > > $'$" print(f\'{!name} / e: {{e}}\', flush=True)"' 00:01:26 verbose #411 > > $'$" return trace_calls"' 00:01:26 verbose #412 > > $'$"import mpmath"' 00:01:26 verbose #413 > > $'$"def fn(log, s):"' 00:01:26 verbose #414 > > $'$" global count"' 00:01:26 verbose #415 > > $'$" if log:"' 00:01:26 verbose #416 > > $'$" print(f\'{!name} / s: {{s}} / count: {{count}}\', 00:01:26 verbose #417 > > flush=True)"' 00:01:26 verbose #418 > > $'$" s = complex(*s)"' 00:01:26 verbose #419 > > $'$" try:"' 00:01:26 verbose #420 > > $'$" if log: sys.settrace(trace_calls)"' 00:01:26 verbose #421 > > line 00:01:26 verbose #422 > > $'$" if log:"' 00:01:26 verbose #423 > > $'$" sys.settrace(None)"' 00:01:26 verbose #424 > > $'$" print(f\'{!name} / result: {{s}} / count: 00:01:26 verbose #425 > > {{count}}\', flush=True)"' 00:01:26 verbose #426 > > $'$" except ValueError as e:"' 00:01:26 verbose #427 > > $'$" if s.real == 1:"' 00:01:26 verbose #428 > > $'$" s = complex(float(\'inf\'), 0)"' 00:01:26 verbose #429 > > $'$" return (s.real, s.imag)"' 00:01:26 verbose #430 > > ]] 00:01:26 verbose #431 > > |> call1_ log py s 00:01:26 verbose #432 > > 00:01:26 verbose #433 > > inl gamma_ log py s = 00:01:26 verbose #434 > > call1_ log "gamma_" py s $'$" s = mpmath.gamma(s)"' 00:01:26 verbose #435 > > 00:01:26 verbose #436 > > inl zeta_ log py s = 00:01:26 verbose #437 > > call1_ log "zeta_" py s $'$" s = mpmath.zeta(s)"' 00:01:26 verbose #438 > > 00:01:26 verbose #439 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:26 verbose #440 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:26 verbose #441 > > │ ## run_test │ 00:01:26 verbose #442 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:26 verbose #443 > > 00:01:26 verbose #444 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:26 verbose #445 > > inl run_test log (fn : (complex f64 -> complex f64) * (complex f64 -> complex 00:01:26 verbose #446 > > f64) -> ()) = 00:01:26 verbose #447 > > inl fn_ (py : python) : resultm.result' () pyerr = 00:01:26 verbose #448 > > inl nan () = 00:01:26 verbose #449 > > !\($'"f64::NAN"') 00:01:26 verbose #450 > > inl gamma__ = fun (s : complex f64) => 00:01:26 verbose #451 > > inl result = gamma_ log py s 00:01:26 verbose #452 > > if log then 00:01:26 verbose #453 > > inl s = join s 00:01:26 verbose #454 > > !\($'"println\!(\\\"gamma__ / s: {:?} / result: {:?}\\\", !s, 00:01:26 verbose #455 > > !result)"') 00:01:26 verbose #456 > > result |> resultm.ok' |> optionm'.unbox |> optionm'.default_value 00:01:26 verbose #457 > > .^(nan (), nan ()) 00:01:26 verbose #458 > > inl zeta__ = fun (s : complex f64) => 00:01:26 verbose #459 > > inl result = zeta_ log py s 00:01:26 verbose #460 > > 00:01:26 verbose #461 > > inl z = zeta true gamma__ s 00:01:26 verbose #462 > > 00:01:26 verbose #463 > > if log then 00:01:26 verbose #464 > > inl s = join s 00:01:26 verbose #465 > > !\($'"println\!(\\\"zeta__ / s: {:?} / result: {:?} / z: 00:01:26 verbose #466 > > {:?}\\\", !s, !result, !z)"') 00:01:26 verbose #467 > > 00:01:26 verbose #468 > > // re result - re x |> abs 00:01:26 verbose #469 > > // |> _assert_lt 0.001 00:01:26 verbose #470 > > 00:01:26 verbose #471 > > // im result - im x |> abs 00:01:26 verbose #472 > > // |> _assert_lt 0.001 00:01:26 verbose #473 > > 00:01:26 verbose #474 > > result |> resultm.ok' |> optionm'.unbox |> optionm'.default_value 00:01:26 verbose #475 > > .^(nan (), nan ()) 00:01:26 verbose #476 > > join fn (zeta__, gamma__) 00:01:26 verbose #477 > > 00:01:26 verbose #478 > > Ok () 00:01:26 verbose #479 > > |> resultm.box 00:01:26 verbose #480 > > 00:01:26 verbose #481 > > join 00:01:26 verbose #482 > > !\($'"pyo3::prepare_freethreaded_python()"') : () 00:01:26 verbose #483 > > 00:01:26 verbose #484 > > !\($'"let __run_test = pyo3::Python::with_gil(|py| -> pyo3::PyResult<()> 00:01:26 verbose #485 > > { //"') 00:01:26 verbose #486 > > 00:01:26 verbose #487 > > let x' = fn_ (!\($'"py"') : python) 00:01:26 verbose #488 > > inl x' = join x' 00:01:26 verbose #489 > > 00:01:26 verbose #490 > > inl closure_fix = 2u8, 1u8 00:01:26 verbose #491 > > x' |> rust.fix_closure closure_fix 00:01:26 verbose #492 > > 00:01:26 verbose #493 > > (!\($'"__run_test"') : _ () pyerr) 00:01:26 verbose #494 > > |> resultm.unwrap' 00:01:27 verbose #495 > > 00:01:27 verbose #496 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:27 verbose #497 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:27 verbose #498 > > │ ## test_zeta_at_known_values_ │ 00:01:27 verbose #499 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:27 verbose #500 > > 00:01:27 verbose #501 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:27 verbose #502 > > inl test_zeta_at_known_values_ log = run_test log fun zeta, gamma => 00:01:27 verbose #503 > > ;[[ 00:01:27 verbose #504 > > .^(2, 0), pi ** 2 / 6 00:01:27 verbose #505 > > .^(-1, 0), -1 / 12 00:01:27 verbose #506 > > ]] 00:01:27 verbose #507 > > |> fun x => a x : _ i32 _ 00:01:27 verbose #508 > > |> am.iter fun s, e => 00:01:27 verbose #509 > > inl result = zeta s 00:01:27 verbose #510 > > 00:01:27 verbose #511 > > result |> im |> _assert_eq 0 00:01:27 verbose #512 > > re result - e |> abs |> _assert_lt 0.0001 00:01:27 verbose #513 > > 00:01:27 verbose #514 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:27 verbose #515 > > //// test 00:01:27 verbose #516 > > ///! rust -d num-complex pyo3 00:01:27 verbose #517 > > 00:01:27 verbose #518 > > test_zeta_at_known_values_ true 00:01:56 verbose #519 > > 00:01:56 verbose #520 > > ╭─[ 28.66s - return value ]────────────────────────────────────────────────────╮ 00:01:56 verbose #521 > > │ zeta_ / s: (2.0, 0.0) / count: 0 │ 00:01:56 verbose #522 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │ 00:01:56 verbose #523 > > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │ 00:01:56 verbose #524 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:01:56 verbose #525 > > │ / arg: None │ 00:01:56 verbose #526 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │ 00:01:56 verbose #527 > > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │ 00:01:56 verbose #528 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:01:56 verbose #529 > > │ / arg: None │ 00:01:56 verbose #530 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │ 00:01:56 verbose #531 > > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │ 00:01:56 verbose #532 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:01:56 verbose #533 > > │ / arg: None │ 00:01:56 verbose #534 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │ 00:01:56 verbose #535 > > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │ 00:01:56 verbose #536 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:01:56 verbose #537 > > │ / arg: None │ 00:01:56 verbose #538 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │ 00:01:56 verbose #539 > > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │ 00:01:56 verbose #540 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:01:56 verbose #541 > > │ / arg: None │ 00:01:56 verbose #542 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=(2+0j), kwargs={}, name='zeta' │ 00:01:56 verbose #543 > > │ / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py / │ 00:01:56 verbose #544 > > │ f_back.f_lineno: 535 / f_back.f_code.co_filename: \mpmath\functions\zeta.py │ 00:01:56 verbose #545 > > │ / arg: None │ 00:01:56 verbose #546 > > │ line(zeta_) / f_code.co_name: f / f_locals: x=(2+0j), kwargs={}, name='zeta' │ 00:01:56 verbose #547 > > │ / f_line...me: make_mpc / f_locals: / f_lineno: 768 / f_code.co_filename: │ 00:01:56 verbose #548 > > │ \mpmath\ctx_mp_python.py / f_back.f_lineno: 1131 / │ 00:01:56 verbose #549 > > │ f_back.f_code.co_filename: \mpmath\ctx_mp_python.py / arg: None │ 00:01:56 verbose #550 > > │ line(gamma_) / f_code.co_name: make_mpc / f_locals: / f_lineno: 769 / │ 00:01:56 verbose #551 > > │ f_code.co_filename: \mpmath\ctx_mp_python.py / f_back.f_lineno: 1131 / │ 00:01:56 verbose #552 > > │ f_back.f_code.co_filename: \mpmath\ctx_mp_python.py / arg: None │ 00:01:56 verbose #553 > > │ line(gamma_) / f_code.co_name: make_mpc / f_locals: / f_lineno: 770 / │ 00:01:56 verbose #554 > > │ f_code.co_filename: \mpmath\ctx_mp_python.py / f_back.f_lineno: 1131 / │ 00:01:56 verbose #555 > > │ f_back.f_code.co_filename: \mpmath\ctx_mp_python.py / arg: None │ 00:01:56 verbose #556 > > │ return(gamma_) / f_code.co_name: make_mpc / f_locals: / f_lineno: 770 / │ 00:01:56 verbose #557 > > │ f_code.co_filename: \mpmath\ctx_mp_python.py / f_back.f_lineno: 1131 / │ 00:01:56 verbose #558 > > │ f_back.f_code.co_filename: \mpmath\ctx_mp_python.py / arg: mpc(real='1.0', │ 00:01:56 verbose #559 > > │ imag='0.0') │ 00:01:56 verbose #560 > > │ return(gamma_) / f_code.co_name: f / f_locals: x=mpc(real='2.0', │ 00:01:56 verbose #561 > > │ imag='0.0'), kwargs={}, name='gamma', prec=53, rounding='n' / f_lineno: 1131 │ 00:01:56 verbose #562 > > │ / f_code.co_filename: \mpmath\ctx_mp_python.py / f_back.f_lineno: 25 / │ 00:01:56 verbose #563 > > │ f_back.f_code.co_filename: / arg: mpc(real='1.0', imag='0.0') │ 00:01:56 verbose #564 > > │ gamma_ / result: (1.0 + 0.0j) / count: 161 │ 00:01:56 verbose #565 > > │ gamma__ / s: Complex { re: 2.0, im: 0.0 } / result: Ok(Complex { re: 1.0, │ 00:01:56 verbose #566 > > │ im: 0.0 }) │ 00:01:56 verbose #567 > > │ zeta / count: 1 / s: Complex { re: 2.0, im: -0.0 } │ 00:01:56 verbose #568 > > │ zeta__ / s: Complex { re: -1.0, im: 0.0 } / result: Ok(Complex { re: │ 00:01:56 verbose #569 > > │ -0.08333333333333333, im: 0.0 }) / z: Complex { re: NaN, im: NaN } │ 00:01:56 verbose #570 > > │ __assert_eq / actual: 0.0 / expected: 0.0 │ 00:01:56 verbose #571 > > │ __assert_lt / actual: 0.0 / expected: 0.0001 │ 00:01:56 verbose #572 > > │ │ 00:01:56 verbose #573 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:56 verbose #574 > > 00:01:56 verbose #575 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:56 verbose #576 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:56 verbose #577 > > │ ## test_zeta_at_2_minus2 │ 00:01:56 verbose #578 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:56 verbose #579 > > 00:01:56 verbose #580 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:56 verbose #581 > > inl test_zeta_at_2_minus2 log = run_test log fun zeta, gamma => 00:01:56 verbose #582 > > inl s = .^(2, -2) 00:01:56 verbose #583 > > inl result = zeta s 00:01:56 verbose #584 > > 00:01:56 verbose #585 > > (re result - 0.8673) |> abs |> _assert_lt 0.001 00:01:56 verbose #586 > > (im result - 0.2750) |> abs |> _assert_lt 0.001 00:01:56 verbose #587 > > 00:01:56 verbose #588 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:56 verbose #589 > > //// test 00:01:56 verbose #590 > > ///! rust -d num-complex pyo3 00:01:56 verbose #591 > > 00:01:56 verbose #592 > > test_zeta_at_2_minus2 true 00:02:17 verbose #593 > > 00:02:17 verbose #594 > > ╭─[ 20.38s - return value ]────────────────────────────────────────────────────╮ 00:02:17 verbose #595 > > │ zeta_ / s: (2.0, -2.0) / count: 0 │ 00:02:17 verbose #596 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(2-2j), a=1, derivative=0, │ 00:02:17 verbose #597 > > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │ 00:02:17 verbose #598 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:02:17 verbose #599 > > │ / arg: None │ 00:02:17 verbose #600 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2-2j), a=1, derivative=0, │ 00:02:17 verbose #601 > > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │ 00:02:17 verbose #602 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:02:17 verbose #603 > > │ / arg: None │ 00:02:17 verbose #604 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2-2j), a=1, derivative=0, │ 00:02:17 verbose #605 > > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │ 00:02:17 verbose #606 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:02:17 verbose #607 > > │ / arg: None │ 00:02:17 verbose #608 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2-2j), a=1, derivative=0, │ 00:02:17 verbose #609 > > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │ 00:02:17 verbose #610 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:02:17 verbose #611 > > │ / arg: None │ 00:02:17 verbose #612 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2-2j), a=1, derivative=0, │ 00:02:17 verbose #613 > > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │ 00:02:17 verbose #614 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:02:17 verbose #615 > > │ / arg: None │ 00:02:17 verbose #616 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=(2-2j), kwargs={}, name='zeta' │ 00:02:17 verbose #617 > > │ / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py / │ 00:02:17 verbose #618 > > │ f_back.f_lineno: 535 / f_back.f_code.co_filename: \mpmath\functions\zeta.py │ 00:02:17 verbose #619 > > │ / arg: None │ 00:02:17 verbose #620 > > │ line(zeta_) / f_code.co_name: f / f_locals: x=(2-2j), kwargs={}, name='zeta' │ 00:02:17 verbose #621 > > │ / f_lin... 2, 1), prec=14, rnd='d', _sub=0, ssign=0, sman=1, sexp=2, sbc=1, │ 00:02:17 verbose #622 > > │ tsign=0, tman=1, texp=2, tbc=1, offset=0, man=2 / f_lineno: 665 / │ 00:02:17 verbose #623 > > │ f_code.co_filename: \mpmath\libmp\libmpf.py / f_back.f_lineno: 1322 / │ 00:02:17 verbose #624 > > │ f_back.f_code.co_filename: \mpmath\libmp\libmpf.py / arg: None │ 00:02:17 verbose #625 > > │ line(zeta_) / f_code.co_name: mpf_add / f_locals: s=(0, 1, 2, 1), t=(0, 1, │ 00:02:17 verbose #626 > > │ 2, 1), prec=14, rnd='d', _sub=0, ssign=0, sman=1, sexp=2, sbc=1, tsign=0, │ 00:02:17 verbose #627 > > │ tman=1, texp=2, tbc=1, offset=0, man=2, bc=2 / f_lineno: 666 / │ 00:02:17 verbose #628 > > │ f_code.co_filename: \mpmath\libmp\libmpf.py / f_back.f_lineno: 1322 / │ 00:02:17 verbose #629 > > │ f_back.f_code.co_filename: \mpmath\libmp\libmpf.py / arg: None │ 00:02:17 verbose #630 > > │ call(zeta_) / f_code.co_name: normalize / f_locals: sign=0, man=2, exp=2, │ 00:02:17 verbose #631 > > │ bc=2, prec=14, rnd='d' / f_lineno: 185 / f_code.co_filename: │ 00:02:17 verbose #632 > > │ \mpmath\libmp\libmpf.py / f_back.f_lineno: 666 / f_back.f_code.co_filename: │ 00:02:17 verbose #633 > > │ \mpmath\libmp\libmpf.py / arg: None │ 00:02:17 verbose #634 > > │ line(zeta_) / f_code.co_name: normalize / f_locals: sign=0, man=2, exp=2, │ 00:02:17 verbose #635 > > │ bc=2, prec=14, rnd='d' / f_lineno: 186 / f_code.co_filename: │ 00:02:17 verbose #636 > > │ \mpmath\libmp\libmpf.py / f_back.f_lineno: 666 / f_back.f_code.co_filename: │ 00:02:17 verbose #637 > > │ \mpmath\libmp\libmpf.py / arg: None │ 00:02:17 verbose #638 > > │ zeta_ / result: (0.867351829635993 + 0.275127238807858j) / count: 1553 │ 00:02:17 verbose #639 > > │ zeta / count: 0 / s: Complex { re: 2.0, im: -2.0 } │ 00:02:17 verbose #640 > > │ zeta__ / s: Complex { re: 2.0, im: -2.0 } / result: Ok(Complex { re: │ 00:02:17 verbose #641 > > │ 0.8673518296359931, im: 0.27512723880785767 }) / z: Complex { re: NaN, im: │ 00:02:17 verbose #642 > > │ NaN } │ 00:02:17 verbose #643 > > │ __assert_lt / actual: 5.182963599315027e-5 / expected: 0.001 │ 00:02:17 verbose #644 > > │ __assert_lt / actual: 0.00012723880785764363 / expected: 0.001 │ 00:02:17 verbose #645 > > │ │ 00:02:17 verbose #646 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:17 verbose #647 > > 00:02:17 verbose #648 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:17 verbose #649 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:17 verbose #650 > > │ ## test_trivial_zero_at_negative_even___ │ 00:02:17 verbose #651 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:17 verbose #652 > > 00:02:17 verbose #653 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:17 verbose #654 > > inl test_trivial_zero_at_negative_even___ log = run_test log fun zeta, gamma => 00:02:17 verbose #655 > > (join listm'.init_series -2f64 -40 -2) 00:02:17 verbose #656 > > |> listm.iter fun n => 00:02:17 verbose #657 > > inl s = .^(n, 0) 00:02:17 verbose #658 > > inl result = zeta s 00:02:17 verbose #659 > > 00:02:17 verbose #660 > > result |> re |> _assert_eq 0 00:02:17 verbose #661 > > result |> im |> _assert_eq 0 00:02:17 verbose #662 > > 00:02:17 verbose #663 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:17 verbose #664 > > //// test 00:02:17 verbose #665 > > ///! rust -d num-complex pyo3 00:02:17 verbose #666 > > 00:02:17 verbose #667 > > test_trivial_zero_at_negative_even___ true 00:02:37 verbose #668 > > 00:02:37 verbose #669 > > ╭─[ 20.34s - return value ]────────────────────────────────────────────────────╮ 00:02:37 verbose #670 > > │ zeta_ / s: (-2.0, 0.0) / count: 0 │ 00:02:37 verbose #671 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(-2+0j), a=1, derivative=0, │ 00:02:37 verbose #672 > > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │ 00:02:37 verbose #673 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:02:37 verbose #674 > > │ / arg: None │ 00:02:37 verbose #675 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(-2+0j), a=1, derivative=0, │ 00:02:37 verbose #676 > > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │ 00:02:37 verbose #677 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:02:37 verbose #678 > > │ / arg: None │ 00:02:37 verbose #679 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(-2+0j), a=1, derivative=0, │ 00:02:37 verbose #680 > > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │ 00:02:37 verbose #681 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:02:37 verbose #682 > > │ / arg: None │ 00:02:37 verbose #683 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(-2+0j), a=1, derivative=0, │ 00:02:37 verbose #684 > > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │ 00:02:37 verbose #685 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:02:37 verbose #686 > > │ / arg: None │ 00:02:37 verbose #687 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(-2+0j), a=1, derivative=0, │ 00:02:37 verbose #688 > > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │ 00:02:37 verbose #689 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:02:37 verbose #690 > > │ / arg: None │ 00:02:37 verbose #691 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=(-2+0j), kwargs={}, │ 00:02:37 verbose #692 > > │ name='zeta' / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py │ 00:02:37 verbose #693 > > │ / f_back.f_lineno: 535 / f_back.f_code.co_filename: │ 00:02:37 verbose #694 > > │ \mpmath\functions\zeta.py / arg: None │ 00:02:37 verbose #695 > > │ line(zeta_) / f_code.co_name: f / f_locals: x=(-2+0j), kwargs={}, │ 00:02:37 verbose #696 > > │ name='zeta' ...lename: \mpmath\ctx_mp_python.py / f_back.f_lineno: 1131 / │ 00:02:37 verbose #697 > > │ f_back.f_code.co_filename: \mpmath\ctx_mp_python.py / arg: None │ 00:02:37 verbose #698 > > │ line(gamma_) / f_code.co_name: make_mpc / f_locals: / f_lineno: 769 / │ 00:02:37 verbose #699 > > │ f_code.co_filename: \mpmath\ctx_mp_python.py / f_back.f_lineno: 1131 / │ 00:02:37 verbose #700 > > │ f_back.f_code.co_filename: \mpmath\ctx_mp_python.py / arg: None │ 00:02:37 verbose #701 > > │ line(gamma_) / f_code.co_name: make_mpc / f_locals: / f_lineno: 770 / │ 00:02:37 verbose #702 > > │ f_code.co_filename: \mpmath\ctx_mp_python.py / f_back.f_lineno: 1131 / │ 00:02:37 verbose #703 > > │ f_back.f_code.co_filename: \mpmath\ctx_mp_python.py / arg: None │ 00:02:37 verbose #704 > > │ return(gamma_) / f_code.co_name: make_mpc / f_locals: / f_lineno: 770 / │ 00:02:37 verbose #705 > > │ f_code.co_filename: \mpmath\ctx_mp_python.py / f_back.f_lineno: 1131 / │ 00:02:37 verbose #706 > > │ f_back.f_code.co_filename: \mpmath\ctx_mp_python.py / arg: │ 00:02:37 verbose #707 > > │ mpc(real='8.1591528324789768e+47', imag='0.0') │ 00:02:37 verbose #708 > > │ return(gamma_) / f_code.co_name: f / f_locals: x=mpc(real='41.0', │ 00:02:37 verbose #709 > > │ imag='0.0'), kwargs={}, name='gamma', prec=53, rounding='n' / f_lineno: 1131 │ 00:02:37 verbose #710 > > │ / f_code.co_filename: \mpmath\ctx_mp_python.py / f_back.f_lineno: 25 / │ 00:02:37 verbose #711 > > │ f_back.f_code.co_filename: / arg: mpc(real='8.1591528324789768e+47', │ 00:02:37 verbose #712 > > │ imag='0.0') │ 00:02:37 verbose #713 > > │ gamma_ / result: (8.15915283247898e+47 + 0.0j) / count: 166 │ 00:02:37 verbose #714 > > │ gamma__ / s: Complex { re: 41.0, im: 0.0 } / result: Ok(Complex { re: │ 00:02:37 verbose #715 > > │ 8.159152832478977e47, im: 0.0 }) │ 00:02:37 verbose #716 > > │ zeta / count: 1 / s: Complex { re: 41.0, im: -0.0 } │ 00:02:37 verbose #717 > > │ zeta__ / s: Complex { re: -40.0, im: 0.0 } / result: Ok(Complex { re: 0.0, │ 00:02:37 verbose #718 > > │ im: 0.0 }) / z: Complex { re: NaN, im: NaN } │ 00:02:37 verbose #719 > > │ __assert_eq / actual: 0.0 / expected: 0.0 │ 00:02:37 verbose #720 > > │ __assert_eq / actual: 0.0 / expected: 0.0 │ 00:02:37 verbose #721 > > │ │ 00:02:37 verbose #722 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:37 verbose #723 > > 00:02:37 verbose #724 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:37 verbose #725 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:37 verbose #726 > > │ ## test_non_trivial_zero___ │ 00:02:37 verbose #727 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:37 verbose #728 > > 00:02:37 verbose #729 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:37 verbose #730 > > inl test_non_trivial_zero___ log = run_test log fun zeta, gamma => 00:02:37 verbose #731 > > ;[[ 00:02:37 verbose #732 > > .^(0.5, 14.134725) 00:02:37 verbose #733 > > .^(0.5, 21.022040) 00:02:37 verbose #734 > > .^(0.5, 25.010857) 00:02:37 verbose #735 > > .^(0.5, 30.424876) 00:02:37 verbose #736 > > .^(0.5, 32.935062) 00:02:37 verbose #737 > > .^(0.5, 37.586178) 00:02:37 verbose #738 > > ]] 00:02:37 verbose #739 > > |> fun x => a x : _ i32 _ 00:02:37 verbose #740 > > |> am.iter fun x => 00:02:37 verbose #741 > > inl result = zeta x 00:02:37 verbose #742 > > result |> re |> abs |> _assert_lt 0.0001 00:02:37 verbose #743 > > result |> im |> abs |> _assert_lt 0.0001 00:02:38 verbose #744 > > 00:02:38 verbose #745 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:38 verbose #746 > > //// test 00:02:38 verbose #747 > > ///! rust -d num-complex pyo3 00:02:38 verbose #748 > > 00:02:38 verbose #749 > > test_non_trivial_zero___ true 00:02:56 verbose #750 > > 00:02:56 verbose #751 > > ╭─[ 18.35s - return value ]────────────────────────────────────────────────────╮ 00:02:56 verbose #752 > > │ zeta_ / s: (0.5, 14.134725) / count: 0 │ 00:02:56 verbose #753 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │ 00:02:56 verbose #754 > > │ derivative=0, method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │ 00:02:56 verbose #755 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:02:56 verbose #756 > > │ / arg: None │ 00:02:56 verbose #757 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │ 00:02:56 verbose #758 > > │ derivative=0, method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │ 00:02:56 verbose #759 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:02:56 verbose #760 > > │ / arg: None │ 00:02:56 verbose #761 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │ 00:02:56 verbose #762 > > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 533 / │ 00:02:56 verbose #763 > > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │ 00:02:56 verbose #764 > > │ f_back.f_code.co_filename: / arg: None │ 00:02:56 verbose #765 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │ 00:02:56 verbose #766 > > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 534 / │ 00:02:56 verbose #767 > > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │ 00:02:56 verbose #768 > > │ f_back.f_code.co_filename: / arg: None │ 00:02:56 verbose #769 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │ 00:02:56 verbose #770 > > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 535 / │ 00:02:56 verbose #771 > > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │ 00:02:56 verbose #772 > > │ f_back.f_code.co_filename: / arg: None │ 00:02:56 verbose #773 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=(0.5+14.134725j), kwargs={}, │ 00:02:56 verbose #774 > > │ name='zeta' / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py │ 00:02:56 verbose #775 > > │ / f_back.f_lineno: 535 / f_back.f_code.co_filename: │ 00:02:56 verbose #776 > > │ \mpmath\functions\zeta.py / arg: None │ 00:02:56 verbose #777 > > │ line(zeta_) / f_cod...y / arg: None │ 00:02:56 verbose #778 > > │ line(gamma_) / f_code.co_name: complex_stirling_series / f_locals: │ 00:02:56 verbose #779 > > │ x=1208925819614629174706176, y=-90877802089662679288381440, prec=81, │ 00:02:56 verbose #780 > > │ _m=3416353708500640443578529333, tre=-1816151534455075068, │ 00:02:56 verbose #781 > > │ tim=-45486653225747820096, ure=-1710577520534459139249, │ 00:02:56 verbose #782 > > │ uim=45518868236127668552, sre=1013002518538853602038572, │ 00:02:56 verbose #783 > > │ sim=90883161825546323029600502 / f_lineno: 1629 / f_code.co_filename: │ 00:02:56 verbose #784 > > │ \mpmath\libmp\gammazeta.py / f_back.f_lineno: 2041 / │ 00:02:56 verbose #785 > > │ f_back.f_code.co_filename: \mpmath\libmp\gammazeta.py / arg: None │ 00:02:56 verbose #786 > > │ line(gamma_) / f_code.co_name: complex_stirling_series / f_locals: │ 00:02:56 verbose #787 > > │ x=1208925819614629174706176, y=-90877802089662679288381440, prec=81, │ 00:02:56 verbose #788 > > │ _m=3416353708500640443578529333, tre=-1816151534455075068, │ 00:02:56 verbose #789 > > │ tim=-45486653225747820096, ure=-1710577520534459139249, │ 00:02:56 verbose #790 > > │ uim=45518868236127668552, sre=1013002523583718975524892, │ 00:02:56 verbose #791 > > │ sim=90883161951898137545566669 / f_lineno: 1630 / f_code.co_filename: │ 00:02:56 verbose #792 > > │ \mpmath\libmp\gammazeta.py / f_back.f_lineno: 2041 / │ 00:02:56 verbose #793 > > │ f_back.f_code.co_filename: \mpmath\libmp\gammazeta.py / arg: None │ 00:02:56 verbose #794 > > │ gamma_ / result: (-1.32798420042152e-26 + 5.5751975252688e-26j) / count: 301 │ 00:02:56 verbose #795 > > │ gamma__ / s: Complex { re: 0.5, im: -37.586178 } / result: Ok(Complex { re: │ 00:02:56 verbose #796 > > │ -1.3279842004215153e-26, im: 5.575197525268802e-26 }) │ 00:02:56 verbose #797 > > │ zeta__ / s: Complex { re: 0.5, im: 37.586178 } / result: Ok(Complex { re: │ 00:02:56 verbose #798 > > │ -8.910186507947958e-8, im: -2.943780446402868e-7 }) / z: Complex { re: -0.0, │ 00:02:56 verbose #799 > > │ im: 0.0 } │ 00:02:56 verbose #800 > > │ __assert_lt / actual: 8.910186507947958e-8 / expected: 0.0001 │ 00:02:56 verbose #801 > > │ __assert_lt / actual: 2.943780446402868e-7 / expected: 0.0001 │ 00:02:56 verbose #802 > > │ │ 00:02:56 verbose #803 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:56 verbose #804 > > 00:02:56 verbose #805 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:56 verbose #806 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:56 verbose #807 > > │ ## test_real_part_greater_than_one___ │ 00:02:56 verbose #808 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:56 verbose #809 > > 00:02:56 verbose #810 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:56 verbose #811 > > inl test_real_part_greater_than_one___ log = run_test log fun zeta, gamma => 00:02:56 verbose #812 > > inl points = ;[[ 2; 3; 4; 5; 10; 20; 50 ]] 00:02:56 verbose #813 > > (a points : _ i32 _) 00:02:56 verbose #814 > > |> am.iter fun point => 00:02:56 verbose #815 > > inl s = .^(point, 0) 00:02:56 verbose #816 > > inl result = zeta s 00:02:56 verbose #817 > > result |> re |> _assert_gt 0 00:02:56 verbose #818 > > result |> im |> _assert_eq 0 00:02:57 verbose #819 > > 00:02:57 verbose #820 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:57 verbose #821 > > //// test 00:02:57 verbose #822 > > ///! rust -d num-complex pyo3 00:02:57 verbose #823 > > 00:02:57 verbose #824 > > test_real_part_greater_than_one___ true 00:03:15 verbose #825 > > 00:03:15 verbose #826 > > ╭─[ 18.84s - return value ]────────────────────────────────────────────────────╮ 00:03:15 verbose #827 > > │ zeta_ / s: (2.0, 0.0) / count: 0 │ 00:03:15 verbose #828 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │ 00:03:15 verbose #829 > > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │ 00:03:15 verbose #830 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:03:15 verbose #831 > > │ / arg: None │ 00:03:15 verbose #832 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │ 00:03:15 verbose #833 > > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │ 00:03:15 verbose #834 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:03:15 verbose #835 > > │ / arg: None │ 00:03:15 verbose #836 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │ 00:03:15 verbose #837 > > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │ 00:03:15 verbose #838 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:03:15 verbose #839 > > │ / arg: None │ 00:03:15 verbose #840 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │ 00:03:15 verbose #841 > > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │ 00:03:15 verbose #842 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:03:15 verbose #843 > > │ / arg: None │ 00:03:15 verbose #844 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │ 00:03:15 verbose #845 > > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │ 00:03:15 verbose #846 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:03:15 verbose #847 > > │ / arg: None │ 00:03:15 verbose #848 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=(2+0j), kwargs={}, name='zeta' │ 00:03:15 verbose #849 > > │ / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py / │ 00:03:15 verbose #850 > > │ f_back.f_lineno: 535 / f_back.f_code.co_filename: \mpmath\functions\zeta.py │ 00:03:15 verbose #851 > > │ / arg: None │ 00:03:15 verbose #852 > > │ line(zeta_) / f_code.co_name: f / f_locals: x=(2+0j), kwargs={}, name='zeta' │ 00:03:15 verbose #853 > > │ / f_line...f_code.co_filename: \mpmath\ctx_mp_python.py / f_back.f_lineno: │ 00:03:15 verbose #854 > > │ 1131 / f_back.f_code.co_filename: \mpmath\ctx_mp_python.py / arg: None │ 00:03:15 verbose #855 > > │ line(zeta_) / f_code.co_name: make_mpc / f_locals: / f_lineno: 770 / │ 00:03:15 verbose #856 > > │ f_code.co_filename: \mpmath\ctx_mp_python.py / f_back.f_lineno: 1131 / │ 00:03:15 verbose #857 > > │ f_back.f_code.co_filename: \mpmath\ctx_mp_python.py / arg: None │ 00:03:15 verbose #858 > > │ return(zeta_) / f_code.co_name: make_mpc / f_locals: / f_lineno: 770 / │ 00:03:15 verbose #859 > > │ f_code.co_filename: \mpmath\ctx_mp_python.py / f_back.f_lineno: 1131 / │ 00:03:15 verbose #860 > > │ f_back.f_code.co_filename: \mpmath\ctx_mp_python.py / arg: │ 00:03:15 verbose #861 > > │ mpc(real='1.0000000000000009', imag='0.0') │ 00:03:15 verbose #862 > > │ return(zeta_) / f_code.co_name: f / f_locals: x=mpc(real='50.0', │ 00:03:15 verbose #863 > > │ imag='0.0'), kwargs={}, name='zeta', prec=53, rounding='n' / f_lineno: 1131 │ 00:03:15 verbose #864 > > │ / f_code.co_filename: \mpmath\ctx_mp_python.py / f_back.f_lineno: 535 / │ 00:03:15 verbose #865 > > │ f_back.f_code.co_filename: \mpmath\functions\zeta.py / arg: │ 00:03:15 verbose #866 > > │ mpc(real='1.0000000000000009', imag='0.0') │ 00:03:15 verbose #867 > > │ return(zeta_) / f_code.co_name: zeta / f_locals: s=(50+0j), a=1, │ 00:03:15 verbose #868 > > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 535 / │ 00:03:15 verbose #869 > > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │ 00:03:15 verbose #870 > > │ f_back.f_code.co_filename: / arg: mpc(real='1.0000000000000009', │ 00:03:15 verbose #871 > > │ imag='0.0') │ 00:03:15 verbose #872 > > │ zeta_ / result: (1.0 + 0.0j) / count: 193 │ 00:03:15 verbose #873 > > │ zeta / count: 0 / s: Complex { re: 50.0, im: 0.0 } │ 00:03:15 verbose #874 > > │ zeta__ / s: Complex { re: 50.0, im: 0.0 } / result: Ok(Complex { re: │ 00:03:15 verbose #875 > > │ 1.0000000000000009, im: 0.0 }) / z: Complex { re: NaN, im: NaN } │ 00:03:15 verbose #876 > > │ __assert_gt / actual: 1.0000000000000009 / expected: 0.0 │ 00:03:15 verbose #877 > > │ __assert_eq / actual: 0.0 / expected: 0.0 │ 00:03:15 verbose #878 > > │ │ 00:03:15 verbose #879 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:15 verbose #880 > > 00:03:15 verbose #881 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:15 verbose #882 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:15 verbose #883 > > │ ## test_zeta_at_1___ │ 00:03:15 verbose #884 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:15 verbose #885 > > 00:03:15 verbose #886 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:15 verbose #887 > > inl test_zeta_at_1___ log = run_test log fun zeta, gamma => 00:03:15 verbose #888 > > inl s = .^(1, 0) 00:03:15 verbose #889 > > inl result = zeta s 00:03:15 verbose #890 > > result |> re |> _assert_eq limit.max 00:03:15 verbose #891 > > result |> im |> _assert_eq 0 00:03:16 verbose #892 > > 00:03:16 verbose #893 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:16 verbose #894 > > //// test 00:03:16 verbose #895 > > ///! rust -d num-complex pyo3 00:03:16 verbose #896 > > 00:03:16 verbose #897 > > test_zeta_at_1___ true 00:03:34 verbose #898 > > 00:03:34 verbose #899 > > ╭─[ 18.40s - return value ]────────────────────────────────────────────────────╮ 00:03:34 verbose #900 > > │ zeta_ / s: (1.0, 0.0) / count: 0 │ 00:03:34 verbose #901 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(1+0j), a=1, derivative=0, │ 00:03:34 verbose #902 > > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │ 00:03:34 verbose #903 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:03:34 verbose #904 > > │ / arg: None │ 00:03:34 verbose #905 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(1+0j), a=1, derivative=0, │ 00:03:34 verbose #906 > > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │ 00:03:34 verbose #907 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:03:34 verbose #908 > > │ / arg: None │ 00:03:34 verbose #909 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(1+0j), a=1, derivative=0, │ 00:03:34 verbose #910 > > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │ 00:03:34 verbose #911 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:03:34 verbose #912 > > │ / arg: None │ 00:03:34 verbose #913 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(1+0j), a=1, derivative=0, │ 00:03:34 verbose #914 > > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │ 00:03:34 verbose #915 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:03:34 verbose #916 > > │ / arg: None │ 00:03:34 verbose #917 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(1+0j), a=1, derivative=0, │ 00:03:34 verbose #918 > > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │ 00:03:34 verbose #919 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:03:34 verbose #920 > > │ / arg: None │ 00:03:34 verbose #921 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=(1+0j), kwargs={}, name='zeta' │ 00:03:34 verbose #922 > > │ / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py / │ 00:03:34 verbose #923 > > │ f_back.f_lineno: 535 / f_back.f_code.co_filename: \mpmath\functions\zeta.py │ 00:03:34 verbose #924 > > │ / arg: None │ 00:03:34 verbose #925 > > │ line(zeta_) / f_code.co_name: f / f_locals: x=(1+0j), kwargs={}, name='zeta' │ 00:03:34 verbose #926 > > │ / f_line...back object at 0x<?>>) │ 00:03:34 verbose #927 > > │ return(gamma_) / f_code.co_name: f / f_locals: x=mpc(real='0.0', │ 00:03:34 verbose #928 > > │ imag='0.0'), kwargs={}, name='gamma', prec=53, rounding='n' / f_lineno: 1131 │ 00:03:34 verbose #929 > > │ / f_code.co_filename: \mpmath\ctx_mp_python.py / f_back.f_lineno: 25 / │ 00:03:34 verbose #930 > > │ f_back.f_code.co_filename: / arg: None │ 00:03:34 verbose #931 > > │ exception(gamma_) / f_code.co_name: fn / f_locals: log=True, s=0j / │ 00:03:34 verbose #932 > > │ f_lineno: 25 / f_code.co_filename: / f_back.f_lineno: / │ 00:03:34 verbose #933 > > │ f_back.f_code.co_filename: / arg: (<class 'ValueError'>, ValueError('gamma │ 00:03:34 verbose #934 > > │ function pole'), <traceback object at 0x<?>>) │ 00:03:34 verbose #935 > > │ line(gamma_) / f_code.co_name: fn / f_locals: log=True, s=0j / f_lineno: 29 │ 00:03:34 verbose #936 > > │ / f_code.co_filename: / f_back.f_lineno: / f_back.f_code.co_filename: / │ 00:03:34 verbose #937 > > │ arg: None │ 00:03:34 verbose #938 > > │ line(gamma_) / f_code.co_name: fn / f_locals: log=True, s=0j, │ 00:03:34 verbose #939 > > │ e=ValueError('gamma function pole') / f_lineno: 30 / f_code.co_filename: / │ 00:03:34 verbose #940 > > │ f_back.f_lineno: / f_back.f_code.co_filename: / arg: None │ 00:03:34 verbose #941 > > │ line(gamma_) / f_code.co_name: fn / f_locals: log=True, s=0j / f_lineno: 32 │ 00:03:34 verbose #942 > > │ / f_code.co_filename: / f_back.f_lineno: / f_back.f_code.co_filename: / │ 00:03:34 verbose #943 > > │ arg: None │ 00:03:34 verbose #944 > > │ return(gamma_) / f_code.co_name: fn / f_locals: log=True, s=0j / f_lineno: │ 00:03:34 verbose #945 > > │ 32 / f_code.co_filename: / f_back.f_lineno: / f_back.f_code.co_filename: │ 00:03:34 verbose #946 > > │ / arg: (0.0, 0.0) │ 00:03:34 verbose #947 > > │ gamma__ / s: Complex { re: 0.0, im: 0.0 } / result: Ok(Complex { re: 0.0, │ 00:03:34 verbose #948 > > │ im: 0.0 }) │ 00:03:34 verbose #949 > > │ zeta__ / s: Complex { re: 1.0, im: 0.0 } / result: Ok(Complex { re: inf, im: │ 00:03:34 verbose #950 > > │ 0.0 }) / z: Complex { re: 0.0, im: 0.0 } │ 00:03:34 verbose #951 > > │ __assert_eq / actual: inf / expected: inf │ 00:03:34 verbose #952 > > │ __assert_eq / actual: 0.0 / expected: 0.0 │ 00:03:34 verbose #953 > > │ │ 00:03:34 verbose #954 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:34 verbose #955 > > 00:03:34 verbose #956 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:34 verbose #957 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:34 verbose #958 > > │ ## test_symmetry_across_real_axis___ │ 00:03:34 verbose #959 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:34 verbose #960 > > 00:03:34 verbose #961 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:34 verbose #962 > > inl test_symmetry_across_real_axis___ log = run_test log fun zeta, gamma => 00:03:34 verbose #963 > > inl s = .^(2, 10) 00:03:34 verbose #964 > > inl result_positive_im = zeta s 00:03:34 verbose #965 > > inl result_negative_im = zeta .^(re s, -(im s)) 00:03:34 verbose #966 > > inl conj = result_negative_im |> conj 00:03:34 verbose #967 > > result_positive_im |> re |> _assert_eq (conj |> re) 00:03:34 verbose #968 > > result_positive_im |> im |> _assert_eq (conj |> im) 00:03:35 verbose #969 > > 00:03:35 verbose #970 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:35 verbose #971 > > //// test 00:03:35 verbose #972 > > ///! rust -d num-complex pyo3 00:03:35 verbose #973 > > 00:03:35 verbose #974 > > test_symmetry_across_real_axis___ true 00:03:53 verbose #975 > > 00:03:53 verbose #976 > > ╭─[ 18.67s - return value ]────────────────────────────────────────────────────╮ 00:03:53 verbose #977 > > │ zeta_ / s: (2.0, 10.0) / count: 0 │ 00:03:53 verbose #978 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(2+10j), a=1, derivative=0, │ 00:03:53 verbose #979 > > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │ 00:03:53 verbose #980 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:03:53 verbose #981 > > │ / arg: None │ 00:03:53 verbose #982 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+10j), a=1, derivative=0, │ 00:03:53 verbose #983 > > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │ 00:03:53 verbose #984 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:03:53 verbose #985 > > │ / arg: None │ 00:03:53 verbose #986 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+10j), a=1, derivative=0, │ 00:03:53 verbose #987 > > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │ 00:03:53 verbose #988 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:03:53 verbose #989 > > │ / arg: None │ 00:03:53 verbose #990 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+10j), a=1, derivative=0, │ 00:03:53 verbose #991 > > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │ 00:03:53 verbose #992 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:03:53 verbose #993 > > │ / arg: None │ 00:03:53 verbose #994 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+10j), a=1, derivative=0, │ 00:03:53 verbose #995 > > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │ 00:03:53 verbose #996 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:03:53 verbose #997 > > │ / arg: None │ 00:03:53 verbose #998 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=(2+10j), kwargs={}, │ 00:03:53 verbose #999 > > │ name='zeta' / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py │ 00:03:53 verbose #1000 > > │ / f_back.f_lineno: 535 / f_back.f_code.co_filename: │ 00:03:53 verbose #1001 > > │ \mpmath\functions\zeta.py / arg: None │ 00:03:53 verbose #1002 > > │ line(zeta_) / f_code.co_name: f / f_locals: x=(2+10j), kwargs={}, │ 00:03:53 verbose #1003 > > │ name='zeta' ...f_code.co_name: mpf_add / f_locals: s=(0, 1, 2, 1), t=(0, 25, │ 00:03:53 verbose #1004 > > │ 2, 5), prec=14, rnd='d', _sub=0, ssign=0, sman=1, sexp=2, sbc=1, tsign=0, │ 00:03:53 verbose #1005 > > │ tman=25, texp=2, tbc=5, offset=0, man=26, bc=5 / f_lineno: 666 / │ 00:03:53 verbose #1006 > > │ f_code.co_filename: \mpmath\libmp\libmpf.py / f_back.f_lineno: 1322 / │ 00:03:53 verbose #1007 > > │ f_back.f_code.co_filename: \mpmath\libmp\libmpf.py / arg: None │ 00:03:53 verbose #1008 > > │ call(zeta_) / f_code.co_name: normalize / f_locals: sign=0, man=26, exp=2, │ 00:03:53 verbose #1009 > > │ bc=5, prec=14, rnd='d' / f_lineno: 185 / f_code.co_filename: │ 00:03:53 verbose #1010 > > │ \mpmath\libmp\libmpf.py / f_back.f_lineno: 666 / f_back.f_code.co_filename: │ 00:03:53 verbose #1011 > > │ \mpmath\libmp\libmpf.py / arg: None │ 00:03:53 verbose #1012 > > │ line(zeta_) / f_code.co_name: normalize / f_locals: sign=0, man=26, exp=2, │ 00:03:53 verbose #1013 > > │ bc=5, prec=14, rnd='d' / f_lineno: 186 / f_code.co_filename: │ 00:03:53 verbose #1014 > > │ \mpmath\libmp\libmpf.py / f_back.f_lineno: 666 / f_back.f_code.co_filename: │ 00:03:53 verbose #1015 > > │ \mpmath\libmp\libmpf.py / arg: None │ 00:03:53 verbose #1016 > > │ line(zeta_) / f_code.co_name: normalize / f_locals: sign=0, man=26, exp=2, │ 00:03:53 verbose #1017 > > │ bc=5, prec=14, rnd='d' / f_lineno: 187 / f_code.co_filename: │ 00:03:53 verbose #1018 > > │ \mpmath\libmp\libmpf.py / f_back.f_lineno: 666 / f_back.f_code.co_filename: │ 00:03:53 verbose #1019 > > │ \mpmath\libmp\libmpf.py / arg: None │ 00:03:53 verbose #1020 > > │ zeta_ / result: (1.19798250067418 + 0.0791704917205257j) / count: 1031 │ 00:03:53 verbose #1021 > > │ zeta / count: 0 / s: Complex { re: 2.0, im: -10.0 } │ 00:03:53 verbose #1022 > > │ zeta__ / s: Complex { re: 2.0, im: -10.0 } / result: Ok(Complex { re: │ 00:03:53 verbose #1023 > > │ 1.1979825006741847, im: 0.07917049172052575 }) / z: Complex { re: NaN, im: │ 00:03:53 verbose #1024 > > │ NaN } │ 00:03:53 verbose #1025 > > │ __assert_eq / actual: 1.1979825006741847 / expected: 1.1979825006741847 │ 00:03:53 verbose #1026 > > │ __assert_eq / actual: -0.07917049172052575 / expected: -0.07917049172052575 │ 00:03:53 verbose #1027 > > │ │ 00:03:53 verbose #1028 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:53 verbose #1029 > > 00:03:53 verbose #1030 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:53 verbose #1031 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:53 verbose #1032 > > │ ## test_behavior_near_origin___ │ 00:03:53 verbose #1033 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:53 verbose #1034 > > 00:03:53 verbose #1035 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:53 verbose #1036 > > inl test_behavior_near_origin___ log = run_test log fun zeta, gamma => 00:03:53 verbose #1037 > > inl s = .^(0.01, 0.01) 00:03:53 verbose #1038 > > inl result = zeta s 00:03:53 verbose #1039 > > result |> re |> _assert_lt limit.max 00:03:53 verbose #1040 > > result |> im |> _assert_lt limit.max 00:03:54 verbose #1041 > > 00:03:54 verbose #1042 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:54 verbose #1043 > > //// test 00:03:54 verbose #1044 > > ///! rust -d num-complex pyo3 00:03:54 verbose #1045 > > 00:03:54 verbose #1046 > > test_behavior_near_origin___ true 00:04:12 verbose #1047 > > 00:04:12 verbose #1048 > > ╭─[ 18.09s - return value ]────────────────────────────────────────────────────╮ 00:04:12 verbose #1049 > > │ zeta_ / s: (0.01, 0.01) / count: 0 │ 00:04:12 verbose #1050 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(0.01+0.01j), a=1, │ 00:04:12 verbose #1051 > > │ derivative=0, method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │ 00:04:12 verbose #1052 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:04:12 verbose #1053 > > │ / arg: None │ 00:04:12 verbose #1054 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.01+0.01j), a=1, │ 00:04:12 verbose #1055 > > │ derivative=0, method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │ 00:04:12 verbose #1056 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:04:12 verbose #1057 > > │ / arg: None │ 00:04:12 verbose #1058 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.01+0.01j), a=1, │ 00:04:12 verbose #1059 > > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 533 / │ 00:04:12 verbose #1060 > > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │ 00:04:12 verbose #1061 > > │ f_back.f_code.co_filename: / arg: None │ 00:04:12 verbose #1062 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.01+0.01j), a=1, │ 00:04:12 verbose #1063 > > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 534 / │ 00:04:12 verbose #1064 > > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │ 00:04:12 verbose #1065 > > │ f_back.f_code.co_filename: / arg: None │ 00:04:12 verbose #1066 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.01+0.01j), a=1, │ 00:04:12 verbose #1067 > > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 535 / │ 00:04:12 verbose #1068 > > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │ 00:04:12 verbose #1069 > > │ f_back.f_code.co_filename: / arg: None │ 00:04:12 verbose #1070 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=(0.01+0.01j), kwargs={}, │ 00:04:12 verbose #1071 > > │ name='zeta' / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py │ 00:04:12 verbose #1072 > > │ / f_back.f_lineno: 535 / f_back.f_code.co_filename: │ 00:04:12 verbose #1073 > > │ \mpmath\functions\zeta.py / arg: None │ 00:04:12 verbose #1074 > > │ line(zeta_) / f_code.co_name: f / f_locals: x=(...py / f_back.f_lineno: 1131 │ 00:04:12 verbose #1075 > > │ / f_back.f_code.co_filename: \mpmath\ctx_mp_python.py / arg: None │ 00:04:12 verbose #1076 > > │ line(gamma_) / f_code.co_name: mpc_gamma / f_locals: z=((0, │ 00:04:12 verbose #1077 > > │ 4458563631096791, -52, 52), (1, 5764607523034235, -59, 53)), prec=53, │ 00:04:12 verbose #1078 > > │ rnd='n', type=0, a=(0, 4458563631096791, -52, 52), b=(1, 5764607523034235, │ 00:04:12 verbose #1079 > > │ -59, 53), asign=0, aman=4458563631096791, aexp=-52, abc=52, bsign=1, │ 00:04:12 verbose #1080 > > │ bman=5764607523034235, bexp=-59, bbc=53, wp=73, amag=0, bmag=-6, mag=0, │ 00:04:12 verbose #1081 > > │ an=0, bn=0, absn=0j, gamma_size=0, need_reflection=0, zorig=((0, │ 00:04:12 verbose #1082 > > │ 4458563631096791, -52, 52), (1, 5764607523034235, -59, 53)), yfinal=0, │ 00:04:12 verbose #1083 > > │ balance_prec=0, n_for_stirling=14, need_reduction=True, │ 00:04:12 verbose #1084 > > │ afix=132131814190692672995328, bfix=-94447329657392906240, r=0, zprered=((0, │ 00:04:12 verbose #1085 > > │ 4458563631096791, -52, 52), (1, 5764607523034235, -59, 53)), d=14, │ 00:04:12 verbose #1086 > > │ rre=56942610883563778729574216337150, one=9444732965739290427392, │ 00:04:12 verbose #1087 > > │ rim=-1820461636508155576115177658065, k=13 / f_lineno: 2035 / │ 00:04:12 verbose #1088 > > │ f_code.co_filename: \mpmath\libmp\gammazeta.py / f_back.f_lineno: 1131 / │ 00:04:12 verbose #1089 > > │ f_back.f_code.co_filename: \mpmath\ctx_mp_python.py / arg: None │ 00:04:12 verbose #1090 > > │ gamma_ / result: (1.00577030202902 + 0.0059717824054102j) / count: 357 │ 00:04:12 verbose #1091 > > │ gamma__ / s: Complex { re: 0.99, im: -0.01 } / result: Ok(Complex { re: │ 00:04:12 verbose #1092 > > │ 1.005770302029023, im: 0.005971782405410201 }) │ 00:04:12 verbose #1093 > > │ zeta__ / s: Complex { re: 0.01, im: 0.01 } / result: Ok(Complex { re: │ 00:04:12 verbose #1094 > > │ -0.5091873433665667, im: -0.00939202213994577 }) / z: Complex { re: 0.0, im: │ 00:04:12 verbose #1095 > > │ 0.0 } │ 00:04:12 verbose #1096 > > │ __assert_lt / actual: -0.5091873433665667 / expected: inf │ 00:04:12 verbose #1097 > > │ __assert_lt / actual: -0.00939202213994577 / expected: inf │ 00:04:12 verbose #1098 > > │ │ 00:04:12 verbose #1099 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:12 verbose #1100 > > 00:04:12 verbose #1101 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:12 verbose #1102 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:12 verbose #1103 > > │ ## test_imaginary_axis │ 00:04:12 verbose #1104 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:12 verbose #1105 > > 00:04:12 verbose #1106 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:12 verbose #1107 > > inl test_imaginary_axis log = run_test log fun zeta, gamma => 00:04:12 verbose #1108 > > (join [[ 10; 20; 30; 40; 50; 60; 70; 80; 90; 100 ]]) 00:04:12 verbose #1109 > > |> listm.iter fun s => 00:04:12 verbose #1110 > > inl s = .^(0, s) 00:04:12 verbose #1111 > > inl result = zeta s 00:04:12 verbose #1112 > > result |> re |> _assert_ne 0 00:04:12 verbose #1113 > > result |> im |> _assert_ne 0 00:04:12 verbose #1114 > > 00:04:12 verbose #1115 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:12 verbose #1116 > > //// test 00:04:12 verbose #1117 > > ///! rust -d num-complex pyo3 00:04:12 verbose #1118 > > 00:04:12 verbose #1119 > > test_imaginary_axis true 00:04:37 verbose #1120 > > 00:04:37 verbose #1121 > > ╭─[ 24.20s - return value ]────────────────────────────────────────────────────╮ 00:04:37 verbose #1122 > > │ zeta_ / s: (0.0, 10.0) / count: 0 │ 00:04:37 verbose #1123 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=10j, a=1, derivative=0, │ 00:04:37 verbose #1124 > > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │ 00:04:37 verbose #1125 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:04:37 verbose #1126 > > │ / arg: None │ 00:04:37 verbose #1127 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=10j, a=1, derivative=0, │ 00:04:37 verbose #1128 > > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │ 00:04:37 verbose #1129 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:04:37 verbose #1130 > > │ / arg: None │ 00:04:37 verbose #1131 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=10j, a=1, derivative=0, │ 00:04:37 verbose #1132 > > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │ 00:04:37 verbose #1133 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:04:37 verbose #1134 > > │ / arg: None │ 00:04:37 verbose #1135 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=10j, a=1, derivative=0, │ 00:04:37 verbose #1136 > > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │ 00:04:37 verbose #1137 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:04:37 verbose #1138 > > │ / arg: None │ 00:04:37 verbose #1139 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=10j, a=1, derivative=0, │ 00:04:37 verbose #1140 > > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │ 00:04:37 verbose #1141 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:04:37 verbose #1142 > > │ / arg: None │ 00:04:37 verbose #1143 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=10j, kwargs={}, name='zeta' / │ 00:04:37 verbose #1144 > > │ f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py / │ 00:04:37 verbose #1145 > > │ f_back.f_lineno: 535 / f_back.f_code.co_filename: \mpmath\functions\zeta.py │ 00:04:37 verbose #1146 > > │ / arg: None │ 00:04:37 verbose #1147 > > │ line(zeta_) / f_code.co_name: f / f_locals: x=10j, kwargs={}, name='zeta' / │ 00:04:37 verbose #1148 > > │ f_lineno: 1114 / f_code.co...(0, 1, 0, 1), prec=83, sign=0, man=1, exp=0, │ 00:04:37 verbose #1149 > > │ bc=1 / f_lineno: 409 / f_code.co_filename: \mpmath\libmp\libmpf.py / │ 00:04:37 verbose #1150 > > │ f_back.f_lineno: 2022 / f_back.f_code.co_filename: │ 00:04:37 verbose #1151 > > │ \mpmath\libmp\gammazeta.py / arg: None │ 00:04:37 verbose #1152 > > │ line(gamma_) / f_code.co_name: to_fixed / f_locals: s=(0, 1, 0, 1), prec=83, │ 00:04:37 verbose #1153 > > │ sign=0, man=1, exp=0, bc=1, offset=83 / f_lineno: 410 / f_code.co_filename: │ 00:04:37 verbose #1154 > > │ \mpmath\libmp\libmpf.py / f_back.f_lineno: 2022 / f_back.f_code.co_filename: │ 00:04:37 verbose #1155 > > │ \mpmath\libmp\gammazeta.py / arg: None │ 00:04:37 verbose #1156 > > │ line(gamma_) / f_code.co_name: to_fixed / f_locals: s=(0, 1, 0, 1), prec=83, │ 00:04:37 verbose #1157 > > │ sign=0, man=1, exp=0, bc=1, offset=83 / f_lineno: 414 / f_code.co_filename: │ 00:04:37 verbose #1158 > > │ \mpmath\libmp\libmpf.py / f_back.f_lineno: 2022 / f_back.f_code.co_filename: │ 00:04:37 verbose #1159 > > │ \mpmath\libmp\gammazeta.py / arg: None │ 00:04:37 verbose #1160 > > │ return(gamma_) / f_code.co_name: to_fixed / f_locals: s=(0, 1, 0, 1), │ 00:04:37 verbose #1161 > > │ prec=83, sign=0, man=1, exp=0, bc=1, offset=83 / f_lineno: 414 / │ 00:04:37 verbose #1162 > > │ f_code.co_filename: \mpmath\libmp\libmpf.py / f_back.f_lineno: 2022 / │ 00:04:37 verbose #1163 > > │ f_back.f_code.co_filename: \mpmath\libmp\gammazeta.py / arg: │ 00:04:37 verbose #1164 > > │ 9671406556917033397649408 │ 00:04:37 verbose #1165 > > │ gamma_ / result: (-1.51425318049776e-67 + 2.79082155561748e-69j) / count: │ 00:04:37 verbose #1166 > > │ 289 │ 00:04:37 verbose #1167 > > │ gamma__ / s: Complex { re: 1.0, im: -100.0 } / result: Ok(Complex { re: │ 00:04:37 verbose #1168 > > │ -1.514253180497756e-67, im: 2.7908215556174775e-69 }) │ 00:04:37 verbose #1169 > > │ zeta__ / s: Complex { re: 0.0, im: 100.0 } / result: Ok(Complex { re: │ 00:04:37 verbose #1170 > > │ 6.51721042625301, im: 0.18128842533791736 }) / z: Complex { re: 0.0, im: 0.0 │ 00:04:37 verbose #1171 > > │ } │ 00:04:37 verbose #1172 > > │ __assert_ne / actual: 6.51721042625301 / expected: 0.0 │ 00:04:37 verbose #1173 > > │ __assert_ne / actual: 0.18128842533791736 / expected: 0.0 │ 00:04:37 verbose #1174 > > │ │ 00:04:37 verbose #1175 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:37 verbose #1176 > > 00:04:37 verbose #1177 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:37 verbose #1178 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:37 verbose #1179 > > │ ## test_critical_strip │ 00:04:37 verbose #1180 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:37 verbose #1181 > > 00:04:37 verbose #1182 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:37 verbose #1183 > > inl test_critical_strip log = run_test log fun zeta, gamma => 00:04:37 verbose #1184 > > (join [[ 00:04:37 verbose #1185 > > .^(0.5, 14.134725) 00:04:37 verbose #1186 > > .^(0.75, 20.5) 00:04:37 verbose #1187 > > .^(1.25, 30.1) 00:04:37 verbose #1188 > > .^(0.25, 40.0) 00:04:37 verbose #1189 > > .^(1.0, 50.0) 00:04:37 verbose #1190 > > ]]) 00:04:37 verbose #1191 > > |> listm.iter fun s => 00:04:37 verbose #1192 > > inl result = zeta s 00:04:37 verbose #1193 > > result |> re |> _assert_ne 0 00:04:37 verbose #1194 > > result |> im |> _assert_ne 0 00:04:37 verbose #1195 > > 00:04:37 verbose #1196 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:37 verbose #1197 > > //// test 00:04:37 verbose #1198 > > ///! rust -d num-complex pyo3 00:04:37 verbose #1199 > > 00:04:37 verbose #1200 > > test_critical_strip true 00:04:55 verbose #1201 > > 00:04:55 verbose #1202 > > ╭─[ 18.23s - return value ]────────────────────────────────────────────────────╮ 00:04:55 verbose #1203 > > │ zeta_ / s: (0.5, 14.134725) / count: 0 │ 00:04:55 verbose #1204 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │ 00:04:55 verbose #1205 > > │ derivative=0, method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │ 00:04:55 verbose #1206 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:04:55 verbose #1207 > > │ / arg: None │ 00:04:55 verbose #1208 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │ 00:04:55 verbose #1209 > > │ derivative=0, method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │ 00:04:55 verbose #1210 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:04:55 verbose #1211 > > │ / arg: None │ 00:04:55 verbose #1212 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │ 00:04:55 verbose #1213 > > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 533 / │ 00:04:55 verbose #1214 > > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │ 00:04:55 verbose #1215 > > │ f_back.f_code.co_filename: / arg: None │ 00:04:55 verbose #1216 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │ 00:04:55 verbose #1217 > > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 534 / │ 00:04:55 verbose #1218 > > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │ 00:04:55 verbose #1219 > > │ f_back.f_code.co_filename: / arg: None │ 00:04:55 verbose #1220 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │ 00:04:55 verbose #1221 > > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 535 / │ 00:04:55 verbose #1222 > > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │ 00:04:55 verbose #1223 > > │ f_back.f_code.co_filename: / arg: None │ 00:04:55 verbose #1224 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=(0.5+14.134725j), kwargs={}, │ 00:04:55 verbose #1225 > > │ name='zeta' / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py │ 00:04:55 verbose #1226 > > │ / f_back.f_lineno: 535 / f_back.f_code.co_filename: │ 00:04:55 verbose #1227 > > │ \mpmath\functions\zeta.py / arg: None │ 00:04:55 verbose #1228 > > │ line(zeta_) / f_cod...3223535862290159229021 / f_lineno: 1635 / │ 00:04:55 verbose #1229 > > │ f_code.co_filename: \mpmath\libmp\gammazeta.py / f_back.f_lineno: 2041 / │ 00:04:55 verbose #1230 > > │ f_back.f_code.co_filename: \mpmath\libmp\gammazeta.py / arg: None │ 00:04:55 verbose #1231 > > │ line(gamma_) / f_code.co_name: complex_stirling_series / f_locals: x=0, │ 00:04:55 verbose #1232 > > │ y=-241785163922925834941235200, prec=82, _m=12089258196146291747061760000, │ 00:04:55 verbose #1233 > > │ tre=0, tim=2475880078, ure=-1934281311383406679530, uim=0, │ 00:04:55 verbose #1234 > > │ sre=4443714077719696485012210, sim=241793223535862290159229021 / f_lineno: │ 00:04:55 verbose #1235 > > │ 1636 / f_code.co_filename: \mpmath\libmp\gammazeta.py / f_back.f_lineno: │ 00:04:55 verbose #1236 > > │ 2041 / f_back.f_code.co_filename: \mpmath\libmp\gammazeta.py / arg: None │ 00:04:55 verbose #1237 > > │ line(gamma_) / f_code.co_name: complex_stirling_series / f_locals: x=0, │ 00:04:55 verbose #1238 > > │ y=-241785163922925834941235200, prec=82, _m=12089258196146291747061760000, │ 00:04:55 verbose #1239 > > │ tre=0, tim=2475880078, ure=-1934281311383406679530, uim=0, │ 00:04:55 verbose #1240 > > │ sre=4443714077719696485012210, sim=241793223535862290161313095 / f_lineno: │ 00:04:55 verbose #1241 > > │ 1637 / f_code.co_filename: \mpmath\libmp\gammazeta.py / f_back.f_lineno: │ 00:04:55 verbose #1242 > > │ 2041 / f_back.f_code.co_filename: \mpmath\libmp\gammazeta.py / arg: None │ 00:04:55 verbose #1243 > > │ gamma_ / result: (2.63173210619768e-35 - 8.16464935465334e-36j) / count: 266 │ 00:04:55 verbose #1244 > > │ gamma__ / s: Complex { re: 0.0, im: -50.0 } / result: Ok(Complex { re: │ 00:04:55 verbose #1245 > > │ 2.6317321061976804e-35, im: -8.164649354653339e-36 }) │ 00:04:55 verbose #1246 > > │ zeta__ / s: Complex { re: 1.0, im: 50.0 } / result: Ok(Complex { re: │ 00:04:55 verbose #1247 > > │ 0.44103873082309397, im: 0.281582455029683 }) / z: Complex { re: 0.0, im: │ 00:04:55 verbose #1248 > > │ 0.0 } │ 00:04:55 verbose #1249 > > │ __assert_ne / actual: 0.44103873082309397 / expected: 0.0 │ 00:04:55 verbose #1250 > > │ __assert_ne / actual: 0.281582455029683 / expected: 0.0 │ 00:04:55 verbose #1251 > > │ │ 00:04:55 verbose #1252 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:55 verbose #1253 > > 00:04:55 verbose #1254 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:55 verbose #1255 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:55 verbose #1256 > > │ ## test_reflection_formula_for_specific_value │ 00:04:55 verbose #1257 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:55 verbose #1258 > > 00:04:55 verbose #1259 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:55 verbose #1260 > > inl test_reflection_formula_for_specific_value log = run_test log fun zeta, 00:04:55 verbose #1261 > > gamma => 00:04:55 verbose #1262 > > (join [[ 00:04:55 verbose #1263 > > .^(3, 4) 00:04:55 verbose #1264 > > .^(2.5, -3.5) 00:04:55 verbose #1265 > > .^(1.5, 2.5) 00:04:55 verbose #1266 > > .^(0.5, 14.134725) 00:04:55 verbose #1267 > > ]]) 00:04:55 verbose #1268 > > |> listm.iter fun s => 00:04:55 verbose #1269 > > inl lhs = zeta s 00:04:55 verbose #1270 > > inl reflection_coefficient = 00:04:55 verbose #1271 > > (.^(2, 0) .** s) 00:04:55 verbose #1272 > > .* (.^(pi, 0) .** (s .- .^(1, 0))) 00:04:55 verbose #1273 > > .* (.^(pi, 0) .* s ./ .^(2, 0) |> complex_sin) 00:04:55 verbose #1274 > > .* gamma (.^(1, 0) .- s) 00:04:55 verbose #1275 > > 00:04:55 verbose #1276 > > inl one_minus_s = .^(1 - re s, -(im s)) 00:04:55 verbose #1277 > > inl rhs = reflection_coefficient .* zeta one_minus_s 00:04:55 verbose #1278 > > 00:04:55 verbose #1279 > > re lhs - re rhs |> abs |> _assert_lt 0.0001 00:04:55 verbose #1280 > > im lhs - im rhs |> abs |> _assert_lt 0.0001 00:04:56 verbose #1281 > > 00:04:56 verbose #1282 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:56 verbose #1283 > > //// test 00:04:56 verbose #1284 > > ///! rust -d num-complex pyo3 00:04:56 verbose #1285 > > 00:04:56 verbose #1286 > > test_reflection_formula_for_specific_value true 00:05:15 verbose #1287 > > 00:05:15 verbose #1288 > > ╭─[ 18.75s - return value ]────────────────────────────────────────────────────╮ 00:05:15 verbose #1289 > > │ zeta_ / s: (3.0, 4.0) / count: 0 │ 00:05:15 verbose #1290 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(3+4j), a=1, derivative=0, │ 00:05:15 verbose #1291 > > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │ 00:05:15 verbose #1292 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:05:15 verbose #1293 > > │ / arg: None │ 00:05:15 verbose #1294 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(3+4j), a=1, derivative=0, │ 00:05:15 verbose #1295 > > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │ 00:05:15 verbose #1296 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:05:15 verbose #1297 > > │ / arg: None │ 00:05:15 verbose #1298 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(3+4j), a=1, derivative=0, │ 00:05:15 verbose #1299 > > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │ 00:05:15 verbose #1300 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:05:15 verbose #1301 > > │ / arg: None │ 00:05:15 verbose #1302 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(3+4j), a=1, derivative=0, │ 00:05:15 verbose #1303 > > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │ 00:05:15 verbose #1304 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:05:15 verbose #1305 > > │ / arg: None │ 00:05:15 verbose #1306 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(3+4j), a=1, derivative=0, │ 00:05:15 verbose #1307 > > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │ 00:05:15 verbose #1308 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:05:15 verbose #1309 > > │ / arg: None │ 00:05:15 verbose #1310 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=(3+4j), kwargs={}, name='zeta' │ 00:05:15 verbose #1311 > > │ / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py / │ 00:05:15 verbose #1312 > > │ f_back.f_lineno: 535 / f_back.f_code.co_filename: \mpmath\functions\zeta.py │ 00:05:15 verbose #1313 > > │ / arg: None │ 00:05:15 verbose #1314 > > │ line(zeta_) / f_code.co_name: f / f_locals: x=(3+4j), kwargs={}, name='zeta' │ 00:05:15 verbose #1315 > > │ / f_line...034 / f_code.co_filename: \mpmath\libmp\gammazeta.py / │ 00:05:15 verbose #1316 > > │ f_back.f_lineno: 1131 / f_back.f_code.co_filename: \mpmath\ctx_mp_python.py │ 00:05:15 verbose #1317 > > │ / arg: None │ 00:05:15 verbose #1318 > > │ line(gamma_) / f_code.co_name: mpc_gamma / f_locals: z=((0, 1, -1, 1), (0, │ 00:05:15 verbose #1319 > > │ 3978571390186527, -48, 52)), prec=53, rnd='n', type=0, a=(0, 1, -1, 1), │ 00:05:15 verbose #1320 > > │ b=(0, 3978571390186527, -48, 52), asign=0, aman=1, aexp=-1, abc=1, bsign=0, │ 00:05:15 verbose #1321 > > │ bman=3978571390186527, bexp=-48, bbc=52, wp=79, amag=0, bmag=4, mag=4, an=0, │ 00:05:15 verbose #1322 > > │ bn=14, absn=14j, gamma_size=56, need_reflection=0, zorig=((0, 1, -1, 1), (0, │ 00:05:15 verbose #1323 > > │ 3978571390186527, -48, 52)), yfinal=0, balance_prec=0, n_for_stirling=15, │ 00:05:15 verbose #1324 > > │ need_reduction=True, afix=2115620184325601055735808, │ 00:05:15 verbose #1325 > > │ bfix=8543917002826194402410496, r=0, zprered=((0, 1, -1, 1), (0, │ 00:05:15 verbose #1326 > > │ 3978571390186527, -48, 52)), d=5, rre=-542313259704087430481959845, │ 00:05:15 verbose #1327 > > │ one=604462909807314587353088, rim=-1657865507045117397880679064, k=3 / │ 00:05:15 verbose #1328 > > │ f_lineno: 2035 / f_code.co_filename: \mpmath\libmp\gammazeta.py / │ 00:05:15 verbose #1329 > > │ f_back.f_lineno: 1131 / f_back.f_code.co_filename: \mpmath\ctx_mp_python.py │ 00:05:15 verbose #1330 > > │ / arg: None │ 00:05:15 verbose #1331 > > │ gamma_ / result: (-1.4455538437607e-10 - 5.52278876877407e-10j) / count: 314 │ 00:05:15 verbose #1332 > > │ gamma__ / s: Complex { re: 0.5, im: 14.134725 } / result: Ok(Complex { re: │ 00:05:15 verbose #1333 > > │ -1.4455538437606964e-10, im: -5.522788768774066e-10 }) │ 00:05:15 verbose #1334 > > │ zeta__ / s: Complex { re: 0.5, im: -14.134725 } / result: Ok(Complex { re: │ 00:05:15 verbose #1335 > > │ 1.7674298413849186e-8, im: 1.1102028930923156e-7 }) / z: Complex { re: 0.0, │ 00:05:15 verbose #1336 > > │ im: 0.0 } │ 00:05:15 verbose #1337 > > │ __assert_lt / actual: 4.499862532288471e-22 / expected: 0.0001 │ 00:05:15 verbose #1338 > > │ __assert_lt / actual: 1.4558378780933287e-22 / expected: 0.0001 │ 00:05:15 verbose #1339 > > │ │ 00:05:15 verbose #1340 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:15 verbose #1341 > > 00:05:15 verbose #1342 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:15 verbose #1343 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:15 verbose #1344 > > │ ## test_euler_product_formula │ 00:05:15 verbose #1345 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:15 verbose #1346 > > 00:05:15 verbose #1347 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:15 verbose #1348 > > inl test_euler_product_formula log = run_test log fun zeta, gamma => 00:05:15 verbose #1349 > > inl s_values = join [[ 2; 2.5; 3; 3.5; 4; 4.5; 5 ]] 00:05:15 verbose #1350 > > inl primes = join [[ 2; 3; 5; 7; 11; 13; 17; 19; 23; 29; 31; 37; 41; 43; 47; 00:05:15 verbose #1351 > > 53; 59; 61; 67; 71 ]] 00:05:15 verbose #1352 > > s_values 00:05:15 verbose #1353 > > |> listm.iter fun s_re => 00:05:15 verbose #1354 > > inl s = .^(s_re, 0) 00:05:15 verbose #1355 > > inl product = 00:05:15 verbose #1356 > > (1, primes) 00:05:15 verbose #1357 > > ||> listm.fold fun acc x => 00:05:15 verbose #1358 > > acc * 1 / (1 - x ** -s_re) 00:05:15 verbose #1359 > > 00:05:15 verbose #1360 > > inl result = zeta s 00:05:15 verbose #1361 > > re result - product |> abs |> _assert_lt 0.01 00:05:15 verbose #1362 > > result |> im |> _assert_lt 0.01 00:05:15 verbose #1363 > > 00:05:15 verbose #1364 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:15 verbose #1365 > > //// test 00:05:15 verbose #1366 > > ///! rust -d num-complex pyo3 00:05:15 verbose #1367 > > 00:05:15 verbose #1368 > > test_euler_product_formula true 00:05:35 verbose #1369 > > 00:05:35 verbose #1370 > > ╭─[ 19.51s - return value ]────────────────────────────────────────────────────╮ 00:05:35 verbose #1371 > > │ zeta_ / s: (2.0, 0.0) / count: 0 │ 00:05:35 verbose #1372 > > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │ 00:05:35 verbose #1373 > > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │ 00:05:35 verbose #1374 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:05:35 verbose #1375 > > │ / arg: None │ 00:05:35 verbose #1376 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │ 00:05:35 verbose #1377 > > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │ 00:05:35 verbose #1378 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:05:35 verbose #1379 > > │ / arg: None │ 00:05:35 verbose #1380 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │ 00:05:35 verbose #1381 > > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │ 00:05:35 verbose #1382 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:05:35 verbose #1383 > > │ / arg: None │ 00:05:35 verbose #1384 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │ 00:05:35 verbose #1385 > > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │ 00:05:35 verbose #1386 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:05:35 verbose #1387 > > │ / arg: None │ 00:05:35 verbose #1388 > > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │ 00:05:35 verbose #1389 > > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │ 00:05:35 verbose #1390 > > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │ 00:05:35 verbose #1391 > > │ / arg: None │ 00:05:35 verbose #1392 > > │ call(zeta_) / f_code.co_name: f / f_locals: x=(2+0j), kwargs={}, name='zeta' │ 00:05:35 verbose #1393 > > │ / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py / │ 00:05:35 verbose #1394 > > │ f_back.f_lineno: 535 / f_back.f_code.co_filename: \mpmath\functions\zeta.py │ 00:05:35 verbose #1395 > > │ / arg: None │ 00:05:35 verbose #1396 > > │ line(zeta_) / f_code.co_name: f / f_locals: x=(2+0j), kwargs={}, name='zeta' │ 00:05:35 verbose #1397 > > │ / f_line...k.f_lineno: 976 / f_back.f_code.co_filename: │ 00:05:35 verbose #1398 > > │ \mpmath\libmp\gammazeta.py / arg: None │ 00:05:35 verbose #1399 > > │ line(zeta_) / f_code.co_name: mpf_zeta_int / f_locals: s=5, prec=53, │ 00:05:35 verbose #1400 > > │ rnd='n', wp=73, m=19.25, needed_terms=623488, n=33, d=[1, 2179, 792067, │ 00:05:35 verbose #1401 > > │ 115062531, 8930212611, 429314925315, 13983537177347, 327666966438659, │ 00:05:35 verbose #1402 > > │ 5764846406968067, 78615943485956867, 851604426176701187, │ 00:05:35 verbose #1403 > > │ 7470527451121689347, 53898915046387983107, 323897845985013506819, │ 00:05:35 verbose #1404 > > │ 1638178356374090130179, 7034281785235908174595, 25833609859980306522883, │ 00:05:35 verbose #1405 > > │ 81661917475887913739011, 223448095548034217779971, 532029677981012660429571, │ 00:05:35 verbose #1406 > > │ 1108048631855905753375491, 2029946562680066824315651, │ 00:05:35 verbose #1407 > > │ 3292927237466655352791811, 4769455369342763680768771, │ 00:05:35 verbose #1408 > > │ 6235511670496346417767171, 7463408621503347142796035, │ 00:05:35 verbose #1409 > > │ 8322751284048216428487427, 8818779962777819524211459, │ 00:05:35 verbose #1410 > > │ 9050689474911140452082435, 9136270117622166323831555, │ 00:05:35 verbose #1411 > > │ 9160252037839493347779331, 9165045885455648617505539, │ 00:05:35 verbose #1412 > > │ 9165654628010081032708867, 9165691521498228451812099], │ 00:05:35 verbose #1413 > > │ t=-84153981556310142931811887755527036638996681066, k=21 / f_lineno: 944 / │ 00:05:35 verbose #1414 > > │ f_code.co_filename: \mpmath\libmp\gammazeta.py / f_back.f_lineno: 976 / │ 00:05:35 verbose #1415 > > │ f_back.f_code.co_filename: \mpmath\libmp\gammazeta.py / arg: None │ 00:05:35 verbose #1416 > > │ zeta_ / result: (1.03692775514337 + 0.0j) / count: 236 │ 00:05:35 verbose #1417 > > │ zeta / count: 0 / s: Complex { re: 5.0, im: 0.0 } │ 00:05:35 verbose #1418 > > │ zeta__ / s: Complex { re: 5.0, im: 0.0 } / result: Ok(Complex { re: │ 00:05:35 verbose #1419 > > │ 1.03692775514337, im: 0.0 }) / z: Complex { re: NaN, im: NaN } │ 00:05:35 verbose #1420 > > │ __assert_lt / actual: 2.0033654735129858e-9 / expected: 0.01 │ 00:05:35 verbose #1421 > > │ __assert_lt / actual: 0.0 / expected: 0.01 │ 00:05:35 verbose #1422 > > │ │ 00:05:35 verbose #1423 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:35 verbose #1424 > > 00:05:35 verbose #1425 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:35 verbose #1426 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:35 verbose #1427 > > │ ## graph │ 00:05:35 verbose #1428 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:35 verbose #1429 > > 00:05:35 verbose #1430 > > ── mermaid ───────────────────────────────────────────────────────────────────── 00:05:35 verbose #1431 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:35 verbose #1432 > > │ <div class="mermaidMarkdownContainer" style="background-color:white"> │ 00:05:35 verbose #1433 > > │ <link rel="stylesheet" │ 00:05:35 verbose #1434 > > │ href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min. │ 00:05:35 verbose #1435 > > │ css"> │ 00:05:35 verbose #1436 > > │ <div id="13ce276627b14840b9c5f1f1009f5b30"></div> │ 00:05:35 verbose #1437 > > │ <script type="module"> │ 00:05:35 verbose #1438 > > │ │ 00:05:35 verbose #1439 > > │ import mermaid from │ 00:05:35 verbose #1440 > > │ 'https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.esm.min.mjs'; │ 00:05:35 verbose #1441 > > │ let renderTarget = │ 00:05:35 verbose #1442 > > │ document.getElementById('13ce276627b14840b9c5f1f1009f5b30'); │ 00:05:35 verbose #1443 > > │ try { │ 00:05:35 verbose #1444 > > │ const {svg, bindFunctions} = await │ 00:05:35 verbose #1445 > > │ mermaid.mermaidAPI.render( │ 00:05:35 verbose #1446 > > │ 'mermaid_13ce276627b14840b9c5f1f1009f5b30', │ 00:05:35 verbose #1447 > > │ `graph TD │ 00:05:35 verbose #1448 > > │ zeta("zeta()") --> convert │ 00:05:35 verbose #1449 > > │ zeta --> f["f()"] │ 00:05:35 verbose #1450 > > │ f --> mpc_f["mpc_zeta()"] │ 00:05:35 verbose #1451 > > │ f --> mpf_f["mpf_zeta()"] │ 00:05:35 verbose #1452 > > │ convert --> from_float │ 00:05:35 verbose #1453 > > │ from_float --> from_man_exp │ 00:05:35 verbose #1454 > > │ from_man_exp --> python_bitcount │ 00:05:35 verbose #1455 > > │ python_bitcount --> _normalize │ 00:05:35 verbose #1456 > > │ _normalize --> make_mpc │ 00:05:35 verbose #1457 > > │ make_mpc --> mpc_zeta["mpc_zeta()"] │ 00:05:35 verbose #1458 > > │ mpc_zeta --> mpf_zeta["mpf_zeta()"] │ 00:05:35 verbose #1459 > > │ mpf_zeta --> to_int │ 00:05:35 verbose #1460 > > │ to_int --> mpf_zeta_int["mpf_zeta_int()"] │ 00:05:35 verbose #1461 > > │ mpf_zeta_int --> borwein_coefficients │ 00:05:35 verbose #1462 > > │ borwein_coefficients --> from_man_exp_2("from_man_exp()") │ 00:05:35 verbose #1463 > > │ from_man_exp_2 --> python_bitcount_2("python_bitcount()") │ 00:05:35 verbose #1464 > > │ python_bitcount_2 --> _normalize_2("_normalize()") │ 00:05:35 verbose #1465 > > │ _normalize_2 --> make_mpc_2("make_mpc()") │ 00:05:35 verbose #1466 > > │ make_mpc_2 --> stop_trace │ 00:05:35 verbose #1467 > > │ mpf_zeta_int --> mpf_bernoulli │ 00:05:35 verbose #1468 > > │ mpf_bernoulli --> bernoulli_size │ 00:05:35 verbose #1469 > > │ bernoulli_size --> mpf_rdiv_int │ 00:05:35 verbose #1470 > > │ mpf_rdiv_int --> python_bitcount_3("python_bitcount()") │ 00:05:35 verbose #1471 > > │ python_bitcount_3 --> _normalize1 │ 00:05:35 verbose #1472 > > │ _normalize1 --> from_man_exp_3("from_man_exp()") │ 00:05:35 verbose #1473 > > │ from_man_exp_3 --> _normalize_3("_normalize()") │ 00:05:35 verbose #1474 > > │ _normalize_3 --> mpf_sub │ 00:05:35 verbose #1475 > > │ mpf_sub --> mpf_add │ 00:05:35 verbose #1476 > > │ mpf_add --> mpf_neg │ 00:05:35 verbose #1477 > > │ mpf_neg --> _normalize1_2("_normalize1()") │ 00:05:35 verbose #1478 > > │ _normalize1_2 --> from_int │ 00:05:35 verbose #1479 > > │ from_int --> mpf_div │ 00:05:35 verbose #1480 > > │ mpf_div --> python_bitcount_4("python_bitcount()") │ 00:05:35 verbose #1481 > > │ python_bitcount_4 --> _normalize1_3("_normalize1()") │ 00:05:35 verbose #1482 > > │ _normalize1_3 --> make_mpc_3("make_mpc()") │ 00:05:35 verbose #1483 > > │ make_mpc_3 --> final_stop["stop_trace()"]`); │ 00:05:35 verbose #1484 > > │ renderTarget.innerHTML = svg; │ 00:05:35 verbose #1485 > > │ bindFunctions?.(renderTarget); │ 00:05:35 verbose #1486 > > │ } │ 00:05:35 verbose #1487 > > │ catch (error) { │ 00:05:35 verbose #1488 > > │ console.log(error); │ 00:05:35 verbose #1489 > > │ } │ 00:05:35 verbose #1490 > > │ </script> │ 00:05:35 verbose #1491 > > │ </div> │ 00:05:35 verbose #1492 > > │ │ 00:05:35 verbose #1493 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:35 verbose #1494 > > 00:05:35 verbose #1495 > > ── mermaid ───────────────────────────────────────────────────────────────────── 00:05:35 verbose #1496 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:35 verbose #1497 > > │ <div class="mermaidMarkdownContainer" style="background-color:white"> │ 00:05:35 verbose #1498 > > │ <link rel="stylesheet" │ 00:05:35 verbose #1499 > > │ href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min. │ 00:05:35 verbose #1500 > > │ css"> │ 00:05:35 verbose #1501 > > │ <div id="275f86b6afae43c9a06265d64b090c73"></div> │ 00:05:35 verbose #1502 > > │ <script type="module"> │ 00:05:35 verbose #1503 > > │ │ 00:05:35 verbose #1504 > > │ import mermaid from │ 00:05:35 verbose #1505 > > │ 'https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.esm.min.mjs'; │ 00:05:35 verbose #1506 > > │ let renderTarget = │ 00:05:35 verbose #1507 > > │ document.getElementById('275f86b6afae43c9a06265d64b090c73'); │ 00:05:35 verbose #1508 > > │ try { │ 00:05:35 verbose #1509 > > │ const {svg, bindFunctions} = await │ 00:05:35 verbose #1510 > > │ mermaid.mermaidAPI.render( │ 00:05:35 verbose #1511 > > │ 'mermaid_275f86b6afae43c9a06265d64b090c73', │ 00:05:35 verbose #1512 > > │ `graph TD │ 00:05:35 verbose #1513 > > │ zeta_rust("zeta() - Rust") --> num_traits("num-traits") │ 00:05:35 verbose #1514 > > │ zeta_rust --> num_bigint("num-bigint") │ 00:05:35 verbose #1515 > > │ zeta_rust --> rust_decimal("rust_decimal for precision") │ 00:05:35 verbose #1516 > > │ zeta_rust --> error_handling("Rust Error Handling") │ 00:05:35 verbose #1517 > > │ │ 00:05:35 verbose #1518 > > │ num_traits --> num_traits_usage("Use for common traits") │ 00:05:35 verbose #1519 > > │ num_bigint --> bigint_operations("Arbitrary-precision arithmetic │ 00:05:35 verbose #1520 > > │ operations") │ 00:05:35 verbose #1521 > > │ rust_decimal --> decimal_operations("High-precision decimal operations") │ 00:05:35 verbose #1522 > > │ error_handling --> result_type("Use Result<T, E> for error handling") │ 00:05:35 verbose #1523 > > │ │ 00:05:35 verbose #1524 > > │ bigint_operations --> convert_rust("convert() - Rust") │ 00:05:35 verbose #1525 > > │ bigint_operations --> normalize_rust("_normalize() - Rust") │ 00:05:35 verbose #1526 > > │ │ 00:05:35 verbose #1527 > > │ convert_rust --> from_float_rust("from_float() - Rust") │ 00:05:35 verbose #1528 > > │ from_float_rust --> from_man_exp_rust("from_man_exp() - Rust") │ 00:05:35 verbose #1529 > > │ from_man_exp_rust --> bitcount_rust("bitcount() - Rust") │ 00:05:35 verbose #1530 > > │ bitcount_rust --> normalize_rust │ 00:05:35 verbose #1531 > > │ normalize_rust --> mpc_zeta_rust("mpc_zeta() - Rust") │ 00:05:35 verbose #1532 > > │ mpc_zeta_rust --> mpf_zeta_rust("mpf_zeta() - Rust") │ 00:05:35 verbose #1533 > > │ mpf_zeta_rust --> to_int_rust("to_int() - Rust") │ 00:05:35 verbose #1534 > > │ to_int_rust --> mpf_zeta_int_rust("mpf_zeta_int() - Rust") │ 00:05:35 verbose #1535 > > │ │ 00:05:35 verbose #1536 > > │ mpf_zeta_int_rust --> borwein_coefficients_rust("borwein_coefficients() │ 00:05:35 verbose #1537 > > │ - Rust") │ 00:05:35 verbose #1538 > > │ borwein_coefficients_rust --> from_man_exp_rust_2("from_man_exp() - │ 00:05:35 verbose #1539 > > │ Rust") │ 00:05:35 verbose #1540 > > │ from_man_exp_rust_2 --> bitcount_rust_2("bitcount() - Rust") │ 00:05:35 verbose #1541 > > │ bitcount_rust_2 --> normalize_rust_2("_normalize() - Rust") │ 00:05:35 verbose #1542 > > │ normalize_rust_2 --> make_mpc_rust("make_mpc() - Rust") │ 00:05:35 verbose #1543 > > │ │ 00:05:35 verbose #1544 > > │ mpf_zeta_int_rust --> mpf_bernoulli_rust("mpf_bernoulli() - Rust") │ 00:05:35 verbose #1545 > > │ mpf_bernoulli_rust --> bernoulli_size_rust("bernoulli_size() - Rust") │ 00:05:35 verbose #1546 > > │ bernoulli_size_rust --> mpf_rdiv_int_rust("mpf_rdiv_int() - Rust") │ 00:05:35 verbose #1547 > > │ mpf_rdiv_int_rust --> bitcount_rust_3("bitcount() - Rust") │ 00:05:35 verbose #1548 > > │ bitcount_rust_3 --> normalize1_rust("_normalize1() - Rust") │ 00:05:35 verbose #1549 > > │ normalize1_rust --> from_man_exp_rust_3("from_man_exp() - Rust") │ 00:05:35 verbose #1550 > > │ from_man_exp_rust_3 --> normalize_rust_3("_normalize() - Rust") │ 00:05:35 verbose #1551 > > │ normalize_rust_3 --> mpf_sub_rust("mpf_sub() - Rust") │ 00:05:35 verbose #1552 > > │ mpf_sub_rust --> mpf_add_rust("mpf_add() - Rust") │ 00:05:35 verbose #1553 > > │ mpf_add_rust --> mpf_neg_rust("mpf_neg() - Rust") │ 00:05:35 verbose #1554 > > │ mpf_neg_rust --> normalize1_rust_2("_normalize1() - Rust") │ 00:05:35 verbose #1555 > > │ normalize1_rust_2 --> from_int_rust("from_int() - Rust") │ 00:05:35 verbose #1556 > > │ from_int_rust --> mpf_div_rust("mpf_div() - Rust") │ 00:05:35 verbose #1557 > > │ mpf_div_rust --> bitcount_rust_4("bitcount() - Rust") │ 00:05:35 verbose #1558 > > │ bitcount_rust_4 --> normalize1_rust_3("_normalize1() - Rust") │ 00:05:35 verbose #1559 > > │ │ 00:05:35 verbose #1560 > > │ style zeta_rust fill:#f9f,stroke:#333,stroke-width:4px │ 00:05:35 verbose #1561 > > │ style num_traits fill:#bbf,stroke:#333,stroke-width:2px │ 00:05:35 verbose #1562 > > │ style num_bigint fill:#bbf,stroke:#333,stroke-width:2px │ 00:05:35 verbose #1563 > > │ style rust_decimal fill:#bbf,stroke:#333,stroke-width:2px │ 00:05:35 verbose #1564 > > │ style error_handling fill:#bbf,stroke:#333,stroke-width:2px │ 00:05:35 verbose #1565 > > │ style bigint_operations fill:#bfb,stroke:#333,stroke-width:2px │ 00:05:35 verbose #1566 > > │ style decimal_operations fill:#bfb,stroke:#333,stroke-width:2px │ 00:05:35 verbose #1567 > > │ style result_type fill:#bfb,stroke:#333,stroke-width:2px`); │ 00:05:35 verbose #1568 > > │ renderTarget.innerHTML = svg; │ 00:05:35 verbose #1569 > > │ bindFunctions?.(renderTarget); │ 00:05:35 verbose #1570 > > │ } │ 00:05:35 verbose #1571 > > │ catch (error) { │ 00:05:35 verbose #1572 > > │ console.log(error); │ 00:05:35 verbose #1573 > > │ } │ 00:05:35 verbose #1574 > > │ </script> │ 00:05:35 verbose #1575 > > │ </div> │ 00:05:35 verbose #1576 > > │ │ 00:05:35 verbose #1577 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:35 verbose #1578 > > 00:05:35 verbose #1579 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:35 verbose #1580 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:35 verbose #1581 > > │ ## tests │ 00:05:35 verbose #1582 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:35 verbose #1583 > > 00:05:35 verbose #1584 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:35 verbose #1585 > > inl tests () = 00:05:35 verbose #1586 > > testing.run_tests_log { 00:05:35 verbose #1587 > > test_zeta_at_known_values_ 00:05:35 verbose #1588 > > test_zeta_at_2_minus2 00:05:35 verbose #1589 > > test_trivial_zero_at_negative_even___ 00:05:35 verbose #1590 > > test_non_trivial_zero___ 00:05:35 verbose #1591 > > test_real_part_greater_than_one___ 00:05:35 verbose #1592 > > test_zeta_at_1___ 00:05:35 verbose #1593 > > test_symmetry_across_real_axis___ 00:05:35 verbose #1594 > > test_behavior_near_origin___ 00:05:35 verbose #1595 > > test_imaginary_axis 00:05:35 verbose #1596 > > test_critical_strip 00:05:35 verbose #1597 > > test_reflection_formula_for_specific_value 00:05:35 verbose #1598 > > test_euler_product_formula 00:05:35 verbose #1599 > > } 00:05:35 verbose #1600 > > 00:05:35 verbose #1601 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:35 verbose #1602 > > ///! _ 00:05:35 verbose #1603 > > 00:05:35 verbose #1604 > > inl main (_args : array_base string) = 00:05:35 verbose #1605 > > inl value = 1i32 00:05:35 verbose #1606 > > console.write_line ($'$"value: {!value}"' : string) 00:05:35 verbose #1607 > > 0i32 00:05:35 verbose #1608 > > 00:05:35 verbose #1609 > > inl main () = 00:05:35 verbose #1610 > > $'let tests () = !tests ()' : () 00:05:35 verbose #1611 > > $'let main args = !main args' : () 00:05:37 verbose #1612 > 00:05:35 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 97983 } 00:05:37 verbose #1613 > 00:05:35 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:05:37 verbose #1614 > "nbconvert", 00:05:37 verbose #1615 > "c:/home/git/polyglot/lib/math/math.dib.ipynb", 00:05:37 verbose #1616 > "--to", 00:05:37 verbose #1617 > "html", 00:05:37 verbose #1618 > "--HTMLExporter.theme=dark", 00:05:37 verbose #1619 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/math/math.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:05:39 verbose #1620 > 00:05:38 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/math/math.dib.ipynb to html 00:05:39 verbose #1621 > 00:05:38 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:05:39 verbose #1622 > 00:05:38 verbose #7 ! validate(nb) 00:05:43 verbose #1623 > 00:05:42 verbose #8 ! [NbConvertApp] Writing 7295335 bytes to c:\home\git\polyglot\lib\math\math.dib.html 00:05:43 verbose #1624 > 00:05:42 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 636 } 00:05:43 verbose #1625 > 00:05:42 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 636 } 00:05:43 verbose #1626 > 00:05:42 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:05:43 verbose #1627 > "-c", 00:05:43 verbose #1628 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/math/math.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:05:43 verbose #1629 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/math/math.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:05:44 verbose #1630 > 00:05:42 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:05:44 verbose #1631 > 00:05:42 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:05:44 verbose #1632 > 00:05:42 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 98678 } 00:05:44 debug #1633 runtime.execute_with_options_async / { exit_code = 0; output_length = 104524 } 00:05:44 debug #1 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path math.dib --retries 1 00:00:00 debug #1 writeDibCode / output: Spi / path: math.dib 00:00:00 debug #2 parseDibCode / output: Spi / file: math.dib 00:00:00 verbose #1 async.run_with_timeout_async / { timeout = 180 } 00:00:01 verbose #2 async.run_with_timeout_async / { timeout = 180 } 00:00:01 debug #1 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: math.spi 00:00:01 debug #2 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: math.spi 00:00:01 debug #3 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: math.spi 00:00:01 verbose #4 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # math\nopen testing\nopen rust.rust_operators\nopen rust\n\n/// ## comp...027let main args = !main args\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/math/math.spi"}} / result: 00:00:01 verbose #5 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/math/math.spi"}} / result: 00:00:01 debug #6 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: math.spi 00:00:01 debug #7 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: math.spi 00:00:02 debug #8 Supervisor.buildFile / AsyncSeq.scan / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("pyo3::Python")>] #endif type pyo3_Python = class end #if FABLE_COMPILER [<Fable.Core.Erase; Fa...v3 (); v2) () 0 let v0 : (unit -> unit) = closure0() let tests () = v0 () let v1 : ((string []) -> int32) = closure3() let main args = v1 args () / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: math.spi 00:00:02 debug #9 Supervisor.buildFile / takeWhileInclusive / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("pyo3::Python")>] #endif type pyo3_Python = class end #if FABLE_COMPILER [<Fable.Core.Erase; Fa...v3 (); v2) () 0 let v0 : (unit -> unit) = closure0() let tests () = v0 () let v1 : ((string []) -> int32) = closure3() let main args = v1 args () / errors: [] / typeErrorCount: 0 / retry: 0 / path: math.spi 00:00:02 debug #10 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:00 debug #1 persistCodeProject / packages: [Fable.Core] / modules: [lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / name: math / hash: / code.Length: 177217 00:00:00 debug #2 buildProject / fullPath: C:\home\git\polyglot\target\Builder\math\math.fsproj 00:00:00 debug #1 runtime.execute_with_options_async / { options = { command = dotnet publish "C:\home\git\polyglot\target/Builder\math\math.fsproj" --configuration Release --output "C:\home\git\polyglot\lib\math\dist" --runtime linux-x64; cancellation_token = None; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = Some "C:\home\git\polyglot\target\Builder\math" } } 00:00:00 verbose #2 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET 00:00:01 verbose #3 > Determining projects to restore... 00:00:02 verbose #4 > Restored C:\home\git\polyglot\target\Builder\math\math.fsproj (in 497 ms). 00:00:02 verbose #5 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\Builder\math\math.fsproj] 00:00:17 verbose #6 > math -> C:\home\git\polyglot\target\Builder\math\bin\Release\net9.0\linux-x64\math.dll 00:00:18 verbose #7 > math -> C:\home\git\polyglot\lib\math\dist\ 00:00:18 debug #8 runtime.execute_with_options_async / { exit_code = 0; output_length = 637 } 00:00:18 debug #9 runtime.execute_with_options_async / { options = { command = dotnet publish "C:\home\git\polyglot\target/Builder\math\math.fsproj" --configuration Release --output "C:\home\git\polyglot\lib\math\dist" --runtime win-x64; cancellation_token = None; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = Some "C:\home\git\polyglot\target\Builder\math" } } 00:00:18 verbose #10 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET 00:00:19 verbose #11 > Determining projects to restore... 00:00:20 verbose #12 > Restored C:\home\git\polyglot\target\Builder\math\math.fsproj (in 431 ms). 00:00:20 verbose #13 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\Builder\math\math.fsproj] 00:00:33 verbose #14 > math -> C:\home\git\polyglot\target\Builder\math\bin\Release\net9.0\win-x64\math.dll 00:00:35 verbose #15 > math -> C:\home\git\polyglot\lib\math\dist\ 00:00:35 debug #16 runtime.execute_with_options_async / { exit_code = 0; output_length = 635 } targetDir: C:\home\git\polyglot\target\Builder\math Fable 4.21.0: F# to Rust compiler (status: alpha) Thanks to the contributor! @ctaggart Stand with Ukraine! https://standwithukraine.com.ua/ Parsing target\Builder\math\math.fsproj... Retrieving project options from cache, in case of issues run `dotnet fable clean` or try `--noCache` option. Project and references (14 source files) parsed in 267ms Started Fable compilation... Fable compilation finished in 11763ms .\lib\spiral\common.fsx(1458,0): (1458,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\sm.fsx(450,0): (450,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\crypto.fsx(1612,0): (1612,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\date_time.fsx(997,0): (997,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\async_.fsx(76,0): (76,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\threading.fsx(127,0): (127,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\networking.fsx(3719,0): (3719,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\platform.fsx(104,0): (104,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\runtime.fsx(4778,0): (4778,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\file_system.fsx(55820,0): (55820,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\trace.fsx(1490,0): (1490,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\target\Builder\math\math.fs(42,0): (44,3) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! Directory: C:\home\git\polyglot\target\Builder\math\target Mode LastWriteTime Length Name ---- ------------- ------ ---- d---- 2024-09-23 1:47 PM rs Compiling num-traits v0.2.19 Compiling syn v2.0.79 Compiling pyo3-build-config v0.22.3 Compiling matrixmultiply v0.3.9 Compiling libc v0.2.159 Compiling memoffset v0.9.1 Compiling pyo3-ffi v0.22.3 Compiling pyo3-macros-backend v0.22.3 Compiling pyo3 v0.22.3 Compiling approx v0.5.1 Compiling num-integer v0.1.46 Compiling num-complex v0.4.6 Compiling chrono v0.4.38 Compiling float-cmp v0.10.0 Compiling num-rational v0.4.2 Compiling simba v0.8.1 Compiling zerocopy-derive v0.7.35 Compiling futures-macro v0.3.30 Compiling nalgebra-macros v0.2.2 Compiling zerocopy v0.7.35 Compiling futures-util v0.3.30 Compiling ppv-lite86 v0.2.20 Compiling rand_chacha v0.3.1 Compiling rand v0.8.5 Compiling pyo3-macros v0.22.3 Compiling rand_distr v0.4.3 Compiling futures-executor v0.3.30 Compiling futures v0.3.30 Compiling fable_library_rust v0.1.0 (C:\home\git\polyglot\lib\rust\fable\fable_modules\fable-library-rust) Compiling nalgebra v0.32.6 Compiling statrs v0.17.1 Compiling math v0.0.1 (C:\home\git\polyglot\lib\math) Finished `release` profile [optimized] target(s) in 1m 05s Running unittests math.rs (C:\home\git\polyglot\workspace\target\release\deps\math-e66bc5e42510dd1d.exe) running 12 tests test module_b7a9935b::Math::test_behavior_near_origin___ ... ok test module_b7a9935b::Math::test_euler_product_formula ... ok test module_b7a9935b::Math::test_zeta_at_1___ ... ok test module_b7a9935b::Math::test_zeta_at_2_minus2 ... ok test module_b7a9935b::Math::test_imaginary_axis ... ok test module_b7a9935b::Math::test_zeta_at_known_values_ ... ok test module_b7a9935b::Math::test_trivial_zero_at_negative_even___ ... ok test module_b7a9935b::Math::test_reflection_formula_for_specific_value ... ok test module_b7a9935b::Math::test_non_trivial_zero___ ... ok test module_b7a9935b::Math::test_symmetry_across_real_axis___ ... ok test module_b7a9935b::Math::test_critical_strip ... ok test module_b7a9935b::Math::test_real_part_greater_than_one___ ... ok test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.57s
In [ ]:
{ pwsh ../apps/plot/build.ps1 } | Invoke-Block
Compiling num-traits v0.2.19 Compiling futures-util v0.3.30 Compiling chrono v0.4.38 Compiling plotters v0.3.7 Compiling futures-executor v0.3.30 Compiling futures v0.3.30 Compiling fable_library_rust v0.1.0 (C:\home\git\polyglot\lib\rust\fable\fable_modules\fable-library-rust) Compiling plot v0.0.1 (C:\home\git\polyglot\apps\plot) Finished `release` profile [optimized] target(s) in 31.17s
In [ ]:
{ pwsh ../apps/perf/build.ps1 } | Invoke-Block
00:00:00 verbose #1 async.run_with_timeout_async / { timeout = 180 } 00:00:00 debug #1 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path Perf.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:01 verbose #2 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "Perf.dib", "--retries", "3"])) } 00:00:01 verbose #3 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:00:01 verbose #4 > "repl", 00:00:01 verbose #5 > "--exit-after-run", 00:00:01 verbose #6 > "--run", 00:00:01 verbose #7 > "c:/home/git/polyglot/apps/perf/Perf.dib", 00:00:01 verbose #8 > "--output-path", 00:00:01 verbose #9 > "c:/home/git/polyglot/apps/perf/Perf.dib.ipynb", 00:00:01 verbose #10 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/perf/Perf.dib" --output-path "c:/home/git/polyglot/apps/perf/Perf.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:00:03 verbose #11 > > 00:00:03 verbose #12 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:03 verbose #13 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:03 verbose #14 > > │ # Perf (Polyglot) │ 00:00:03 verbose #15 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:27 verbose #16 > > 00:00:27 verbose #17 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:27 verbose #18 > > //// test 00:00:27 verbose #19 > > 00:00:27 verbose #20 > > open testing 00:00:27 verbose #21 > > open benchmark 00:00:28 verbose #22 > > 00:00:28 verbose #23 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:28 verbose #24 > > #if !INTERACTIVE 00:00:28 verbose #25 > > open Lib 00:00:28 verbose #26 > > #endif 00:00:28 verbose #27 > > 00:00:28 verbose #28 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:28 verbose #29 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:28 verbose #30 > > │ ## TestCaseResult │ 00:00:28 verbose #31 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:28 verbose #32 > > 00:00:28 verbose #33 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:28 verbose #34 > > type TestCaseResult = 00:00:28 verbose #35 > > { 00:00:28 verbose #36 > > Input: string 00:00:28 verbose #37 > > Expected: string 00:00:28 verbose #38 > > Result: string 00:00:28 verbose #39 > > TimeList: int64 list 00:00:28 verbose #40 > > } 00:00:28 verbose #41 > > 00:00:28 verbose #42 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:28 verbose #43 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:28 verbose #44 > > │ ## run │ 00:00:28 verbose #45 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:28 verbose #46 > > 00:00:28 verbose #47 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:28 verbose #48 > > let run count (solutions: (string * ('TInput -> 'TExpected)) list) (input, 00:00:28 verbose #49 > > expected) = 00:00:28 verbose #50 > > let inputStr = 00:00:28 verbose #51 > > match box input with 00:00:28 verbose #52 > > | :? System.Collections.ICollection as input -> 00:00:28 verbose #53 > > System.Linq.Enumerable.Cast<obj> input 00:00:28 verbose #54 > > |> Seq.map string 00:00:28 verbose #55 > > |> SpiralSm.concat "," 00:00:28 verbose #56 > > | _ -> input.ToString () 00:00:28 verbose #57 > > 00:00:28 verbose #58 > > printfn "" 00:00:28 verbose #59 > > printfn $"Solution: {inputStr} " 00:00:28 verbose #60 > > 00:00:28 verbose #61 > > let performanceInvoke (fn: unit -> 'T) = 00:00:28 verbose #62 > > GC.Collect () 00:00:28 verbose #63 > > let stopwatch = System.Diagnostics.Stopwatch () 00:00:28 verbose #64 > > stopwatch.Start () 00:00:28 verbose #65 > > let time1 = stopwatch.ElapsedMilliseconds 00:00:28 verbose #66 > > 00:00:28 verbose #67 > > let result = 00:00:28 verbose #68 > > [[| 0 .. count |]] 00:00:28 verbose #69 > > |> Array.Parallel.map (fun _ -> 00:00:28 verbose #70 > > fn () 00:00:28 verbose #71 > > ) 00:00:28 verbose #72 > > |> Array.last 00:00:28 verbose #73 > > 00:00:28 verbose #74 > > let time2 = stopwatch.ElapsedMilliseconds - time1 00:00:28 verbose #75 > > 00:00:28 verbose #76 > > result, time2 00:00:28 verbose #77 > > 00:00:28 verbose #78 > > let resultsWithTime = 00:00:28 verbose #79 > > solutions 00:00:28 verbose #80 > > |> List.mapi (fun i (testName, solution) -> 00:00:28 verbose #81 > > let result, time = performanceInvoke (fun () -> solution input) 00:00:28 verbose #82 > > printfn $"Test case %d{i + 1}. %s{testName}. Time: %A{time} " 00:00:28 verbose #83 > > result, time 00:00:28 verbose #84 > > ) 00:00:28 verbose #85 > > 00:00:28 verbose #86 > > 00:00:28 verbose #87 > > match resultsWithTime |> List.map fst with 00:00:28 verbose #88 > > | ([[]] | [[ _ ]]) -> () 00:00:28 verbose #89 > > | (head :: tail) when tail |> List.forall ((=) head) -> () 00:00:28 verbose #90 > > | results -> failwithf $"Challenge error: %A{results}" 00:00:28 verbose #91 > > 00:00:28 verbose #92 > > { 00:00:28 verbose #93 > > Input = inputStr 00:00:28 verbose #94 > > Expected = expected.ToString () 00:00:28 verbose #95 > > Result = resultsWithTime |> Seq.map fst |> Seq.head |> _.ToString() 00:00:28 verbose #96 > > TimeList = resultsWithTime |> List.map snd 00:00:28 verbose #97 > > } 00:00:28 verbose #98 > > 00:00:28 verbose #99 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:28 verbose #100 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:28 verbose #101 > > │ ## runAll │ 00:00:28 verbose #102 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:28 verbose #103 > > 00:00:28 verbose #104 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:28 verbose #105 > > let runAll testName count (solutions: (string * ('TInput -> 'TExpected)) list) 00:00:28 verbose #106 > > testCases = 00:00:28 verbose #107 > > printfn "" 00:00:28 verbose #108 > > printfn "" 00:00:28 verbose #109 > > printfn $"Test: {testName}" 00:00:28 verbose #110 > > testCases 00:00:28 verbose #111 > > |> Seq.map (run count solutions) 00:00:28 verbose #112 > > |> Seq.toList 00:00:28 verbose #113 > > 00:00:28 verbose #114 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:28 verbose #115 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:28 verbose #116 > > │ ## sortResultList │ 00:00:28 verbose #117 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:28 verbose #118 > > 00:00:28 verbose #119 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:28 verbose #120 > > let sortResultList resultList = 00:00:28 verbose #121 > > let table = 00:00:28 verbose #122 > > let rows = 00:00:28 verbose #123 > > resultList 00:00:28 verbose #124 > > |> List.map (fun result -> 00:00:28 verbose #125 > > let best = 00:00:28 verbose #126 > > result.TimeList 00:00:28 verbose #127 > > |> List.mapi (fun i time -> 00:00:28 verbose #128 > > i + 1, time 00:00:28 verbose #129 > > ) 00:00:28 verbose #130 > > |> List.sortBy snd 00:00:28 verbose #131 > > |> List.head 00:00:28 verbose #132 > > |> _.ToString() 00:00:28 verbose #133 > > let row = 00:00:28 verbose #134 > > [[ 00:00:28 verbose #135 > > result.Input 00:00:28 verbose #136 > > result.Expected 00:00:28 verbose #137 > > result.Result 00:00:28 verbose #138 > > best 00:00:28 verbose #139 > > ]] 00:00:28 verbose #140 > > let color = 00:00:28 verbose #141 > > match result.Expected = result.Result with 00:00:28 verbose #142 > > | true -> Some ConsoleColor.DarkGreen 00:00:28 verbose #143 > > | false -> Some ConsoleColor.DarkRed 00:00:28 verbose #144 > > row, color 00:00:28 verbose #145 > > ) 00:00:28 verbose #146 > > let header = 00:00:28 verbose #147 > > [[ 00:00:28 verbose #148 > > [[ 00:00:28 verbose #149 > > "Input" 00:00:28 verbose #150 > > "Expected" 00:00:28 verbose #151 > > "Result" 00:00:28 verbose #152 > > "Best" 00:00:28 verbose #153 > > ]] 00:00:28 verbose #154 > > [[ 00:00:28 verbose #155 > > "---" 00:00:28 verbose #156 > > "---" 00:00:28 verbose #157 > > "---" 00:00:28 verbose #158 > > "---" 00:00:28 verbose #159 > > ]] 00:00:28 verbose #160 > > ]] 00:00:28 verbose #161 > > |> List.map (fun row -> row, None) 00:00:28 verbose #162 > > header @ rows 00:00:28 verbose #163 > > 00:00:28 verbose #164 > > let formattedTable = 00:00:28 verbose #165 > > let lengthMap = 00:00:28 verbose #166 > > table 00:00:28 verbose #167 > > |> List.map fst 00:00:28 verbose #168 > > |> List.transpose 00:00:28 verbose #169 > > |> List.map (fun column -> 00:00:28 verbose #170 > > column 00:00:28 verbose #171 > > |> List.map String.length 00:00:28 verbose #172 > > |> List.sortDescending 00:00:28 verbose #173 > > |> List.tryHead 00:00:28 verbose #174 > > |> Option.defaultValue 0 00:00:28 verbose #175 > > ) 00:00:28 verbose #176 > > |> List.indexed 00:00:28 verbose #177 > > |> Map.ofList 00:00:28 verbose #178 > > table 00:00:28 verbose #179 > > |> List.map (fun (row, color) -> 00:00:28 verbose #180 > > let newRow = 00:00:28 verbose #181 > > row 00:00:28 verbose #182 > > |> List.mapi (fun i cell -> 00:00:28 verbose #183 > > cell.PadRight lengthMap.[[i]] 00:00:28 verbose #184 > > ) 00:00:28 verbose #185 > > newRow, color 00:00:28 verbose #186 > > ) 00:00:28 verbose #187 > > 00:00:28 verbose #188 > > printfn "" 00:00:28 verbose #189 > > formattedTable 00:00:28 verbose #190 > > |> List.iter (fun (row, color) -> 00:00:28 verbose #191 > > match color with 00:00:28 verbose #192 > > | Some color -> Console.ForegroundColor <- color 00:00:28 verbose #193 > > | None -> Console.ResetColor () 00:00:28 verbose #194 > > 00:00:28 verbose #195 > > printfn "%s" (String.Join ("\t| ", row)) 00:00:28 verbose #196 > > 00:00:28 verbose #197 > > Console.ResetColor () 00:00:28 verbose #198 > > ) 00:00:28 verbose #199 > > 00:00:28 verbose #200 > > let averages = 00:00:28 verbose #201 > > resultList 00:00:28 verbose #202 > > |> List.map (fun result -> result.TimeList |> List.map float) 00:00:28 verbose #203 > > |> List.transpose 00:00:28 verbose #204 > > |> List.map List.average 00:00:28 verbose #205 > > |> List.map int64 00:00:28 verbose #206 > > |> List.indexed 00:00:28 verbose #207 > > 00:00:28 verbose #208 > > printfn "" 00:00:28 verbose #209 > > printfn "Average Ranking " 00:00:28 verbose #210 > > averages 00:00:28 verbose #211 > > |> List.sortBy snd 00:00:28 verbose #212 > > |> List.iter (fun (i, avg) -> 00:00:28 verbose #213 > > printfn $"Test case %d{i + 1}. Average Time: %A{avg} " 00:00:28 verbose #214 > > ) 00:00:28 verbose #215 > > 00:00:28 verbose #216 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:28 verbose #217 > > let mutable _count = 00:00:28 verbose #218 > > if ("CI" |> System.Environment.GetEnvironmentVariable |> fun x -> $"%A{x}") 00:00:28 verbose #219 > > <> "<null>" 00:00:28 verbose #220 > > then 2000000 00:00:28 verbose #221 > > else 2000 00:00:28 verbose #222 > > 00:00:28 verbose #223 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:28 verbose #224 > > inl is_fast () = 00:00:28 verbose #225 > > false 00:00:29 verbose #226 > > 00:00:29 verbose #227 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:29 verbose #228 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:29 verbose #229 > > │ ## empty3Tests │ 00:00:29 verbose #230 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:29 verbose #231 > > 00:00:29 verbose #232 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:29 verbose #233 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:29 verbose #234 > > │ Test: Empty3 │ 00:00:29 verbose #235 > > │ │ 00:00:29 verbose #236 > > │ Solution: (a, a) │ 00:00:29 verbose #237 > > │ Test case 1. A. Time: 91L │ 00:00:29 verbose #238 > > │ │ 00:00:29 verbose #239 > > │ Solution: (a, a) │ 00:00:29 verbose #240 > > │ Test case 1. A. Time: 56L │ 00:00:29 verbose #241 > > │ │ 00:00:29 verbose #242 > > │ Input | Expected | Result | Best │ 00:00:29 verbose #243 > > │ --- | --- | --- | --- │ 00:00:29 verbose #244 > > │ (a, a) | a | a | (1, 91) │ 00:00:29 verbose #245 > > │ (a, a) | a | a | (1, 56) │ 00:00:29 verbose #246 > > │ │ 00:00:29 verbose #247 > > │ Averages │ 00:00:29 verbose #248 > > │ Test case 1. Average Time: 73L │ 00:00:29 verbose #249 > > │ │ 00:00:29 verbose #250 > > │ Ranking │ 00:00:29 verbose #251 > > │ Test case 1. Average Time: 73L │ 00:00:29 verbose #252 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:29 verbose #253 > > 00:00:29 verbose #254 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:29 verbose #255 > > //// test 00:00:29 verbose #256 > > 00:00:29 verbose #257 > > let solutions = [[ 00:00:29 verbose #258 > > "A", 00:00:29 verbose #259 > > fun (a, _b) -> 00:00:29 verbose #260 > > a 00:00:29 verbose #261 > > ]] 00:00:29 verbose #262 > > let testCases = seq { 00:00:29 verbose #263 > > ("a", "a"), "a" 00:00:29 verbose #264 > > ("a", "a"), "a" 00:00:29 verbose #265 > > } 00:00:29 verbose #266 > > let rec empty3Tests = runAll (nameof empty3Tests) _count solutions testCases 00:00:29 verbose #267 > > empty3Tests 00:00:29 verbose #268 > > |> sortResultList 00:00:29 verbose #269 > > 00:00:29 verbose #270 > > ╭─[ 669.89ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:29 verbose #271 > > │ │ 00:00:29 verbose #272 > > │ │ 00:00:29 verbose #273 > > │ Test: empty3Tests │ 00:00:29 verbose #274 > > │ │ 00:00:29 verbose #275 > > │ Solution: (a, a) │ 00:00:29 verbose #276 > > │ Test case 1. A. Time: 2L │ 00:00:29 verbose #277 > > │ │ 00:00:29 verbose #278 > > │ Solution: (a, a) │ 00:00:29 verbose #279 > > │ Test case 1. A. Time: 0L │ 00:00:29 verbose #280 > > │ │ 00:00:29 verbose #281 > > │ Input | Expected | Result | Best │ 00:00:29 verbose #282 > > │ --- | --- | --- | --- │ 00:00:29 verbose #283 > > │ (a, a) | a | a | (1, 2) │ 00:00:29 verbose #284 > > │ (a, a) | a | a | (1, 0) │ 00:00:29 verbose #285 > > │ │ 00:00:29 verbose #286 > > │ Average Ranking │ 00:00:29 verbose #287 > > │ Test case 1. Average Time: 1L │ 00:00:29 verbose #288 > > │ │ 00:00:29 verbose #289 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:29 verbose #290 > > 00:00:29 verbose #291 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:29 verbose #292 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:29 verbose #293 > > │ ## empty2Tests │ 00:00:29 verbose #294 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:29 verbose #295 > > 00:00:29 verbose #296 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:29 verbose #297 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:29 verbose #298 > > │ Test: Empty2 │ 00:00:29 verbose #299 > > │ │ 00:00:29 verbose #300 > > │ Solution: (a, a) │ 00:00:29 verbose #301 > > │ Test case 1. A. Time: 59L │ 00:00:29 verbose #302 > > │ │ 00:00:29 verbose #303 > > │ Solution: (a, a) │ 00:00:29 verbose #304 > > │ Test case 1. A. Time: 53L │ 00:00:29 verbose #305 > > │ │ 00:00:29 verbose #306 > > │ Input | Expected | Result | Best │ 00:00:29 verbose #307 > > │ --- | --- | --- | --- │ 00:00:29 verbose #308 > > │ (a, a) | a | a | (1, 59) │ 00:00:29 verbose #309 > > │ (a, a) | a | a | (1, 53) │ 00:00:29 verbose #310 > > │ │ 00:00:29 verbose #311 > > │ Averages │ 00:00:29 verbose #312 > > │ Test case 1. Average Time: 56L │ 00:00:29 verbose #313 > > │ │ 00:00:29 verbose #314 > > │ Ranking │ 00:00:29 verbose #315 > > │ Test case 1. Average Time: 56L │ 00:00:29 verbose #316 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:29 verbose #317 > > 00:00:29 verbose #318 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:29 verbose #319 > > //// test 00:00:29 verbose #320 > > 00:00:29 verbose #321 > > let solutions = [[ 00:00:29 verbose #322 > > "A", 00:00:29 verbose #323 > > fun (a, _b) -> 00:00:29 verbose #324 > > a 00:00:29 verbose #325 > > ]] 00:00:29 verbose #326 > > let testCases = seq { 00:00:29 verbose #327 > > ("a", "a"), "a" 00:00:29 verbose #328 > > ("a", "a"), "a" 00:00:29 verbose #329 > > } 00:00:29 verbose #330 > > let rec empty2Tests = runAll (nameof empty2Tests) _count solutions testCases 00:00:29 verbose #331 > > empty2Tests 00:00:29 verbose #332 > > |> sortResultList 00:00:30 verbose #333 > > 00:00:30 verbose #334 > > ╭─[ 615.97ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:30 verbose #335 > > │ │ 00:00:30 verbose #336 > > │ │ 00:00:30 verbose #337 > > │ Test: empty2Tests │ 00:00:30 verbose #338 > > │ │ 00:00:30 verbose #339 > > │ Solution: (a, a) │ 00:00:30 verbose #340 > > │ Test case 1. A. Time: 1L │ 00:00:30 verbose #341 > > │ │ 00:00:30 verbose #342 > > │ Solution: (a, a) │ 00:00:30 verbose #343 > > │ Test case 1. A. Time: 0L │ 00:00:30 verbose #344 > > │ │ 00:00:30 verbose #345 > > │ Input | Expected | Result | Best │ 00:00:30 verbose #346 > > │ --- | --- | --- | --- │ 00:00:30 verbose #347 > > │ (a, a) | a | a | (1, 1) │ 00:00:30 verbose #348 > > │ (a, a) | a | a | (1, 0) │ 00:00:30 verbose #349 > > │ │ 00:00:30 verbose #350 > > │ Average Ranking │ 00:00:30 verbose #351 > > │ Test case 1. Average Time: 0L │ 00:00:30 verbose #352 > > │ │ 00:00:30 verbose #353 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:30 verbose #354 > > 00:00:30 verbose #355 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:30 verbose #356 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:30 verbose #357 > > │ ## emptyTests │ 00:00:30 verbose #358 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:30 verbose #359 > > 00:00:30 verbose #360 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:30 verbose #361 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:30 verbose #362 > > │ Test: Empty │ 00:00:30 verbose #363 > > │ │ 00:00:30 verbose #364 > > │ Solution: 0 │ 00:00:30 verbose #365 > > │ Test case 1. A. Time: 61L │ 00:00:30 verbose #366 > > │ │ 00:00:30 verbose #367 > > │ Solution: 2 │ 00:00:30 verbose #368 > > │ Test case 1. A. Time: 62L │ 00:00:30 verbose #369 > > │ │ 00:00:30 verbose #370 > > │ Solution: 5 │ 00:00:30 verbose #371 > > │ Test case 1. A. Time: 70L │ 00:00:30 verbose #372 > > │ │ 00:00:30 verbose #373 > > │ Input | Expected | Result | Best │ 00:00:30 verbose #374 > > │ --- | --- | --- | --- │ 00:00:30 verbose #375 > > │ 0 | 0 | 0 | (1, 61) │ 00:00:30 verbose #376 > > │ 2 | 2 | 2 | (1, 62) │ 00:00:30 verbose #377 > > │ 5 | 5 | 5 | (1, 70) │ 00:00:30 verbose #378 > > │ │ 00:00:30 verbose #379 > > │ Averages │ 00:00:30 verbose #380 > > │ Test case 1. Average Time: 64L │ 00:00:30 verbose #381 > > │ │ 00:00:30 verbose #382 > > │ Ranking │ 00:00:30 verbose #383 > > │ Test case 1. Average Time: 64L │ 00:00:30 verbose #384 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:30 verbose #385 > > 00:00:30 verbose #386 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:30 verbose #387 > > //// test 00:00:30 verbose #388 > > 00:00:30 verbose #389 > > let solutions = [[ 00:00:30 verbose #390 > > "A", 00:00:30 verbose #391 > > fun n -> 00:00:30 verbose #392 > > n + 0 00:00:30 verbose #393 > > ]] 00:00:30 verbose #394 > > let testCases = seq { 00:00:30 verbose #395 > > 0, 0 00:00:30 verbose #396 > > 2, 2 00:00:30 verbose #397 > > 5, 5 00:00:30 verbose #398 > > } 00:00:30 verbose #399 > > let rec emptyTests = runAll (nameof emptyTests) _count solutions testCases 00:00:30 verbose #400 > > emptyTests 00:00:30 verbose #401 > > |> sortResultList 00:00:31 verbose #402 > > 00:00:31 verbose #403 > > ╭─[ 737.09ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:31 verbose #404 > > │ │ 00:00:31 verbose #405 > > │ │ 00:00:31 verbose #406 > > │ Test: emptyTests │ 00:00:31 verbose #407 > > │ │ 00:00:31 verbose #408 > > │ Solution: 0 │ 00:00:31 verbose #409 > > │ Test case 1. A. Time: 3L │ 00:00:31 verbose #410 > > │ │ 00:00:31 verbose #411 > > │ Solution: 2 │ 00:00:31 verbose #412 > > │ Test case 1. A. Time: 0L │ 00:00:31 verbose #413 > > │ │ 00:00:31 verbose #414 > > │ Solution: 5 │ 00:00:31 verbose #415 > > │ Test case 1. A. Time: 0L │ 00:00:31 verbose #416 > > │ │ 00:00:31 verbose #417 > > │ Input | Expected | Result | Best │ 00:00:31 verbose #418 > > │ --- | --- | --- | --- │ 00:00:31 verbose #419 > > │ 0 | 0 | 0 | (1, 3) │ 00:00:31 verbose #420 > > │ 2 | 2 | 2 | (1, 0) │ 00:00:31 verbose #421 > > │ 5 | 5 | 5 | (1, 0) │ 00:00:31 verbose #422 > > │ │ 00:00:31 verbose #423 > > │ Average Ranking │ 00:00:31 verbose #424 > > │ Test case 1. Average Time: 1L │ 00:00:31 verbose #425 > > │ │ 00:00:31 verbose #426 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:31 verbose #427 > > 00:00:31 verbose #428 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:31 verbose #429 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:31 verbose #430 > > │ ## uniqueLettersTests │ 00:00:31 verbose #431 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:31 verbose #432 > > 00:00:31 verbose #433 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:31 verbose #434 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:31 verbose #435 > > │ Test: UniqueLetters │ 00:00:31 verbose #436 > > │ │ 00:00:31 verbose #437 > > │ Solution: abc │ 00:00:31 verbose #438 > > │ Test case 1. A. Time: 1512L │ 00:00:31 verbose #439 > > │ Test case 2. B. Time: 1947L │ 00:00:31 verbose #440 > > │ Test case 3. C. Time: 2023L │ 00:00:31 verbose #441 > > │ Test case 4. D. Time: 1358L │ 00:00:31 verbose #442 > > │ Test case 5. E. Time: 1321L │ 00:00:31 verbose #443 > > │ Test case 6. F. Time: 1346L │ 00:00:31 verbose #444 > > │ Test case 7. G. Time: 1304L │ 00:00:31 verbose #445 > > │ Test case 8. H. Time: 1383L │ 00:00:31 verbose #446 > > │ Test case 9. I. Time: 1495L │ 00:00:31 verbose #447 > > │ Test case 10. J. Time: 1245L │ 00:00:31 verbose #448 > > │ Test case 11. K. Time: 1219L │ 00:00:31 verbose #449 > > │ │ 00:00:31 verbose #450 > > │ Solution: accabb │ 00:00:31 verbose #451 > > │ Test case 1. A. Time: 1648L │ 00:00:31 verbose #452 > > │ Test case 2. B. Time: 2061L │ 00:00:31 verbose #453 > > │ Test case 3. C. Time: 2413L │ 00:00:31 verbose #454 > > │ Test case 4. D. Time: 1561L │ 00:00:31 verbose #455 > > │ Test case 5. E. Time: 1593L │ 00:00:31 verbose #456 > > │ Test case 6. F. Time: 1518L │ 00:00:31 verbose #457 > > │ Test case 7. G. Time: 1415L │ 00:00:31 verbose #458 > > │ Test case 8. H. Time: 1510L │ 00:00:31 verbose #459 > > │ Test case 9. I. Time: 1445L │ 00:00:31 verbose #460 > > │ Test case 10. J. Time: 1636L │ 00:00:31 verbose #461 > > │ Test case 11. K. Time: 1317L │ 00:00:31 verbose #462 > > │ │ 00:00:31 verbose #463 > > │ Solution: pprrqqpp │ 00:00:31 verbose #464 > > │ Test case 1. A. Time: 2255L │ 00:00:31 verbose #465 > > │ Test case 2. B. Time: 2408L │ 00:00:31 verbose #466 > > │ Test case 3. C. Time: 2393L │ 00:00:31 verbose #467 > > │ Test case 4. D. Time: 1675L │ 00:00:31 verbose #468 > > │ Test case 5. E. Time: 1911L │ 00:00:31 verbose #469 > > │ Test case 6. F. Time: 2126L │ 00:00:31 verbose #470 > > │ Test case 7. G. Time: 1504L │ 00:00:31 verbose #471 > > │ Test case 8. H. Time: 1715L │ 00:00:31 verbose #472 > > │ Test case 9. I. Time: 1537L │ 00:00:31 verbose #473 > > │ Test case 10. J. Time: 1522L │ 00:00:31 verbose #474 > > │ Test case 11. K. Time: 1322L │ 00:00:31 verbose #475 > > │ │ 00:00:31 verbose #476 > > │ Solution: │ 00:00:31 verbose #477 > > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │ 00:00:31 verbose #478 > > │ bbb │ 00:00:31 verbose #479 > > │ Test case 1. A. Time: 13073L │ 00:00:31 verbose #480 > > │ Test case 2. B. Time: 11519L │ 00:00:31 verbose #481 > > │ Test case 3. C. Time: 8373L │ 00:00:31 verbose #482 > > │ Test case 4. D. Time: 5860L │ 00:00:31 verbose #483 > > │ Test case 5. E. Time: 6490L │ 00:00:31 verbose #484 > > │ Test case 6. F. Time: 6325L │ 00:00:31 verbose #485 > > │ Test case 7. G. Time: 5799L │ 00:00:31 verbose #486 > > │ Test case 8. H. Time: 7099L │ 00:00:31 verbose #487 > > │ Test case 9. I. Time: 6133L │ 00:00:31 verbose #488 > > │ Test case 10. J. Time: 5993L │ 00:00:31 verbose #489 > > │ Test case 11. K. Time: 2040L │ 00:00:31 verbose #490 > > │ │ 00:00:31 verbose #491 > > │ Input │ 00:00:31 verbose #492 > > │ | Expected | Result | Best │ 00:00:31 verbose #493 > > │ --- │ 00:00:31 verbose #494 > > │ │ 00:00:31 verbose #495 > > │ | --- | --- | --- │ 00:00:31 verbose #496 > > │ abc │ 00:00:31 verbose #497 > > │ │ 00:00:31 verbose #498 > > │ | abc | abc | (11, 1219) │ 00:00:31 verbose #499 > > │ accabb │ 00:00:31 verbose #500 > > │ | acb | acb | (11, 1317) │ 00:00:31 verbose #501 > > │ pprrqqpp │ 00:00:31 verbose #502 > > │ | prq | prq | (11, 1322) │ 00:00:31 verbose #503 > > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │ 00:00:31 verbose #504 > > │ bbb | acb | acb | (11, 2040) │ 00:00:31 verbose #505 > > │ │ 00:00:31 verbose #506 > > │ Averages │ 00:00:31 verbose #507 > > │ Test case 1. Average Time: 4622L │ 00:00:31 verbose #508 > > │ Test case 2. Average Time: 4483L │ 00:00:31 verbose #509 > > │ Test case 3. Average Time: 3800L │ 00:00:31 verbose #510 > > │ Test case 4. Average Time: 2613L │ 00:00:31 verbose #511 > > │ Test case 5. Average Time: 2828L │ 00:00:31 verbose #512 > > │ Test case 6. Average Time: 2828L │ 00:00:31 verbose #513 > > │ Test case 7. Average Time: 2505L │ 00:00:31 verbose #514 > > │ Test case 8. Average Time: 2926L │ 00:00:31 verbose #515 > > │ Test case 9. Average Time: 2652L │ 00:00:31 verbose #516 > > │ Test case 10. Average Time: 2599L │ 00:00:31 verbose #517 > > │ Test case 11. Average Time: 1474L │ 00:00:31 verbose #518 > > │ │ 00:00:31 verbose #519 > > │ Ranking │ 00:00:31 verbose #520 > > │ Test case 1. Average Time: 4622L │ 00:00:31 verbose #521 > > │ Test case 2. Average Time: 4483L │ 00:00:31 verbose #522 > > │ Test case 3. Average Time: 3800L │ 00:00:31 verbose #523 > > │ Test case 8. Average Time: 2926L │ 00:00:31 verbose #524 > > │ Test case 5. Average Time: 2828L │ 00:00:31 verbose #525 > > │ Test case 6. Average Time: 2828L │ 00:00:31 verbose #526 > > │ Test case 9. Average Time: 2652L │ 00:00:31 verbose #527 > > │ Test case 4. Average Time: 2613L │ 00:00:31 verbose #528 > > │ Test case 10. Average Time: 2599L │ 00:00:31 verbose #529 > > │ Test case 7. Average Time: 2505L │ 00:00:31 verbose #530 > > │ Test case 11. Average Time: 1474L │ 00:00:31 verbose #531 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:31 verbose #532 > > 00:00:31 verbose #533 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:31 verbose #534 > > //// test 00:00:31 verbose #535 > > 00:00:31 verbose #536 > > let solutions = [[ 00:00:31 verbose #537 > > "A", 00:00:31 verbose #538 > > fun input -> 00:00:31 verbose #539 > > input 00:00:31 verbose #540 > > |> Seq.toList 00:00:31 verbose #541 > > |> List.fold (fun acc x -> if List.contains x acc then acc else acc @ [[ 00:00:31 verbose #542 > > x ]]) [[]] 00:00:31 verbose #543 > > |> Seq.toArray 00:00:31 verbose #544 > > |> String 00:00:31 verbose #545 > > 00:00:31 verbose #546 > > "B", 00:00:31 verbose #547 > > fun input -> 00:00:31 verbose #548 > > input 00:00:31 verbose #549 > > |> Seq.rev 00:00:31 verbose #550 > > |> fun list -> Seq.foldBack (fun x acc -> if List.contains x acc then 00:00:31 verbose #551 > > acc else x :: acc) list [[]] 00:00:31 verbose #552 > > |> Seq.rev 00:00:31 verbose #553 > > |> Seq.toArray 00:00:31 verbose #554 > > |> String 00:00:31 verbose #555 > > 00:00:31 verbose #556 > > "C", 00:00:31 verbose #557 > > fun input -> 00:00:31 verbose #558 > > input 00:00:31 verbose #559 > > |> Seq.rev 00:00:31 verbose #560 > > |> fun list -> Seq.foldBack (fun x (set, acc) -> if Set.contains x set 00:00:31 verbose #561 > > then set, acc else set.Add x, x :: acc) list (Set.empty, [[]]) 00:00:31 verbose #562 > > |> snd 00:00:31 verbose #563 > > |> Seq.rev 00:00:31 verbose #564 > > |> Seq.toArray 00:00:31 verbose #565 > > |> String 00:00:31 verbose #566 > > 00:00:31 verbose #567 > > "D", 00:00:31 verbose #568 > > fun input -> 00:00:31 verbose #569 > > input 00:00:31 verbose #570 > > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc 00:00:31 verbose #571 > > else set.Add x, Array.append acc [[| x |]]) (Set.empty, [[||]]) 00:00:31 verbose #572 > > |> snd 00:00:31 verbose #573 > > |> String 00:00:31 verbose #574 > > 00:00:31 verbose #575 > > "E", 00:00:31 verbose #576 > > fun input -> 00:00:31 verbose #577 > > input 00:00:31 verbose #578 > > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc 00:00:31 verbose #579 > > else set.Add x, x :: acc) (Set.empty, [[]]) 00:00:31 verbose #580 > > |> snd 00:00:31 verbose #581 > > |> List.rev 00:00:31 verbose #582 > > |> List.toArray 00:00:31 verbose #583 > > |> String 00:00:31 verbose #584 > > 00:00:31 verbose #585 > > "F", 00:00:31 verbose #586 > > fun input -> 00:00:31 verbose #587 > > input 00:00:31 verbose #588 > > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc 00:00:31 verbose #589 > > else set.Add x, acc @ [[ x ]]) (Set.empty, [[]]) 00:00:31 verbose #590 > > |> snd 00:00:31 verbose #591 > > |> List.toArray 00:00:31 verbose #592 > > |> String 00:00:31 verbose #593 > > 00:00:31 verbose #594 > > "G", 00:00:31 verbose #595 > > fun input -> 00:00:31 verbose #596 > > input 00:00:31 verbose #597 > > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc 00:00:31 verbose #598 > > else set.Add x, x :: acc) (Set.empty, [[]]) 00:00:31 verbose #599 > > |> snd 00:00:31 verbose #600 > > |> List.toArray 00:00:31 verbose #601 > > |> Array.rev 00:00:31 verbose #602 > > |> String 00:00:31 verbose #603 > > 00:00:31 verbose #604 > > "H", 00:00:31 verbose #605 > > fun input -> 00:00:31 verbose #606 > > input 00:00:31 verbose #607 > > |> Seq.toList 00:00:31 verbose #608 > > |> fun list -> 00:00:31 verbose #609 > > let rec loop set = function 00:00:31 verbose #610 > > | head :: tail when Set.contains head set -> loop set tail 00:00:31 verbose #611 > > | head :: tail -> (loop (set.Add head) tail) @ [[ head ]] 00:00:31 verbose #612 > > | [[]] -> [[]] 00:00:31 verbose #613 > > loop Set.empty list 00:00:31 verbose #614 > > |> List.rev 00:00:31 verbose #615 > > |> List.toArray 00:00:31 verbose #616 > > |> String 00:00:31 verbose #617 > > 00:00:31 verbose #618 > > "I", 00:00:31 verbose #619 > > fun input -> 00:00:31 verbose #620 > > input 00:00:31 verbose #621 > > |> Seq.toList 00:00:31 verbose #622 > > |> fun list -> 00:00:31 verbose #623 > > let rec loop set = function 00:00:31 verbose #624 > > | head :: tail when Set.contains head set -> loop set tail 00:00:31 verbose #625 > > | head :: tail -> loop (set.Add head) tail |> Array.append [[| 00:00:31 verbose #626 > > head |]] 00:00:31 verbose #627 > > | [[]] -> [[||]] 00:00:31 verbose #628 > > loop Set.empty list 00:00:31 verbose #629 > > |> String 00:00:31 verbose #630 > > 00:00:31 verbose #631 > > "J", 00:00:31 verbose #632 > > fun input -> 00:00:31 verbose #633 > > input 00:00:31 verbose #634 > > |> Seq.toList 00:00:31 verbose #635 > > |> fun list -> 00:00:31 verbose #636 > > let rec loop set = function 00:00:31 verbose #637 > > | head :: tail when Set.contains head set -> loop set tail 00:00:31 verbose #638 > > | head :: tail -> head :: loop (set.Add head) tail 00:00:31 verbose #639 > > | [[]] -> [[]] 00:00:31 verbose #640 > > loop Set.empty list 00:00:31 verbose #641 > > |> List.toArray 00:00:31 verbose #642 > > |> String 00:00:31 verbose #643 > > 00:00:31 verbose #644 > > "K", 00:00:31 verbose #645 > > fun input -> 00:00:31 verbose #646 > > input 00:00:31 verbose #647 > > |> Seq.distinct 00:00:31 verbose #648 > > |> Seq.toArray 00:00:31 verbose #649 > > |> String 00:00:31 verbose #650 > > ]] 00:00:31 verbose #651 > > let testCases = seq { 00:00:31 verbose #652 > > "abc", "abc" 00:00:31 verbose #653 > > "accabb", "acb" 00:00:31 verbose #654 > > "pprrqqpp", "prq" 00:00:31 verbose #655 > > 00:00:31 verbose #656 > > "aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbbbbb 00:00:31 verbose #657 > > ", "acb" 00:00:31 verbose #658 > > } 00:00:31 verbose #659 > > let rec uniqueLettersTests = runAll (nameof uniqueLettersTests) _count solutions 00:00:31 verbose #660 > > testCases 00:00:31 verbose #661 > > uniqueLettersTests 00:00:31 verbose #662 > > |> sortResultList 00:00:44 verbose #663 > > 00:00:44 verbose #664 > > ╭─[ 12.80s - stdout ]──────────────────────────────────────────────────────────╮ 00:00:44 verbose #665 > > │ │ 00:00:44 verbose #666 > > │ │ 00:00:44 verbose #667 > > │ Test: uniqueLettersTests │ 00:00:44 verbose #668 > > │ │ 00:00:44 verbose #669 > > │ Solution: abc │ 00:00:44 verbose #670 > > │ Test case 1. A. Time: 3L │ 00:00:44 verbose #671 > > │ Test case 2. B. Time: 4L │ 00:00:44 verbose #672 > > │ Test case 3. C. Time: 6L │ 00:00:44 verbose #673 > > │ Test case 4. D. Time: 2L │ 00:00:44 verbose #674 > > │ Test case 5. E. Time: 2L │ 00:00:44 verbose #675 > > │ Test case 6. F. Time: 3L │ 00:00:44 verbose #676 > > │ Test case 7. G. Time: 3L │ 00:00:44 verbose #677 > > │ Test case 8. H. Time: 3L │ 00:00:44 verbose #678 > > │ Test case 9. I. Time: 3L │ 00:00:44 verbose #679 > > │ Test case 10. J. Time: 3L │ 00:00:44 verbose #680 > > │ Test case 11. K. Time: 4L │ 00:00:44 verbose #681 > > │ │ 00:00:44 verbose #682 > > │ Solution: accabb │ 00:00:44 verbose #683 > > │ Test case 1. A. Time: 1L │ 00:00:44 verbose #684 > > │ Test case 2. B. Time: 3L │ 00:00:44 verbose #685 > > │ Test case 3. C. Time: 6L │ 00:00:44 verbose #686 > > │ Test case 4. D. Time: 2L │ 00:00:44 verbose #687 > > │ Test case 5. E. Time: 2L │ 00:00:44 verbose #688 > > │ Test case 6. F. Time: 1L │ 00:00:44 verbose #689 > > │ Test case 7. G. Time: 1L │ 00:00:44 verbose #690 > > │ Test case 8. H. Time: 1L │ 00:00:44 verbose #691 > > │ Test case 9. I. Time: 1L │ 00:00:44 verbose #692 > > │ Test case 10. J. Time: 1L │ 00:00:44 verbose #693 > > │ Test case 11. K. Time: 1L │ 00:00:44 verbose #694 > > │ │ 00:00:44 verbose #695 > > │ Solution: pprrqqpp │ 00:00:44 verbose #696 > > │ Test case 1. A. Time: 1L │ 00:00:44 verbose #697 > > │ Test case 2. B. Time: 2L │ 00:00:44 verbose #698 > > │ Test case 3. C. Time: 1L │ 00:00:44 verbose #699 > > │ Test case 4. D. Time: 1L │ 00:00:44 verbose #700 > > │ Test case 5. E. Time: 1L │ 00:00:44 verbose #701 > > │ Test case 6. F. Time: 1L │ 00:00:44 verbose #702 > > │ Test case 7. G. Time: 1L │ 00:00:44 verbose #703 > > │ Test case 8. H. Time: 2L │ 00:00:44 verbose #704 > > │ Test case 9. I. Time: 1L │ 00:00:44 verbose #705 > > │ Test case 10. J. Time: 1L │ 00:00:44 verbose #706 > > │ Test case 11. K. Time: 1L │ 00:00:44 verbose #707 > > │ │ 00:00:44 verbose #708 > > │ Solution: │ 00:00:44 verbose #709 > > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │ 00:00:44 verbose #710 > > │ bbb │ 00:00:44 verbose #711 > > │ Test case 1. A. Time: 27L │ 00:00:44 verbose #712 > > │ Test case 2. B. Time: 11L │ 00:00:44 verbose #713 > > │ Test case 3. C. Time: 17L │ 00:00:44 verbose #714 > > │ Test case 4. D. Time: 10L │ 00:00:44 verbose #715 > > │ Test case 5. E. Time: 14L │ 00:00:44 verbose #716 > > │ Test case 6. F. Time: 12L │ 00:00:44 verbose #717 > > │ Test case 7. G. Time: 11L │ 00:00:44 verbose #718 > > │ Test case 8. H. Time: 11L │ 00:00:44 verbose #719 > > │ Test case 9. I. Time: 9L │ 00:00:44 verbose #720 > > │ Test case 10. J. Time: 11L │ 00:00:44 verbose #721 > > │ Test case 11. K. Time: 4L │ 00:00:44 verbose #722 > > │ │ 00:00:44 verbose #723 > > │ Input │ 00:00:44 verbose #724 > > │ | Expected | Result | Best │ 00:00:44 verbose #725 > > │ --- │ 00:00:44 verbose #726 > > │ | --- | --- | --- │ 00:00:44 verbose #727 > > │ abc │ 00:00:44 verbose #728 > > │ | abc | abc | (4, 2) │ 00:00:44 verbose #729 > > │ accabb │ 00:00:44 verbose #730 > > │ | acb | acb | (1, 1) │ 00:00:44 verbose #731 > > │ pprrqqpp │ 00:00:44 verbose #732 > > │ | prq | prq | (1, 1) │ 00:00:44 verbose #733 > > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │ 00:00:44 verbose #734 > > │ bbb | acb | acb | (11, 4) │ 00:00:44 verbose #735 > > │ │ 00:00:44 verbose #736 > > │ Average Ranking │ 00:00:44 verbose #737 > > │ Test case 11. Average Time: 2L │ 00:00:44 verbose #738 > > │ Test case 4. Average Time: 3L │ 00:00:44 verbose #739 > > │ Test case 9. Average Time: 3L │ 00:00:44 verbose #740 > > │ Test case 5. Average Time: 4L │ 00:00:44 verbose #741 > > │ Test case 6. Average Time: 4L │ 00:00:44 verbose #742 > > │ Test case 7. Average Time: 4L │ 00:00:44 verbose #743 > > │ Test case 8. Average Time: 4L │ 00:00:44 verbose #744 > > │ Test case 10. Average Time: 4L │ 00:00:44 verbose #745 > > │ Test case 2. Average Time: 5L │ 00:00:44 verbose #746 > > │ Test case 3. Average Time: 7L │ 00:00:44 verbose #747 > > │ Test case 1. Average Time: 8L │ 00:00:44 verbose #748 > > │ │ 00:00:44 verbose #749 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:44 verbose #750 > > 00:00:44 verbose #751 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:44 verbose #752 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:44 verbose #753 > > │ ## rotateStringsTests │ 00:00:44 verbose #754 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:44 verbose #755 > > 00:00:44 verbose #756 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:44 verbose #757 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:44 verbose #758 > > │ https://www.hackerrank.com/challenges/rotate-string/forum │ 00:00:44 verbose #759 > > │ │ 00:00:44 verbose #760 > > │ Test: RotateStrings │ 00:00:44 verbose #761 > > │ │ 00:00:44 verbose #762 > > │ Solution: abc │ 00:00:44 verbose #763 > > │ Test case 1. A. Time: 1842L │ 00:00:44 verbose #764 > > │ Test case 2. B. Time: 1846L │ 00:00:44 verbose #765 > > │ Test case 3. C. Time: 1936L │ 00:00:44 verbose #766 > > │ Test case 4. CA. Time: 2224L │ 00:00:44 verbose #767 > > │ Test case 5. CB. Time: 2329L │ 00:00:44 verbose #768 > > │ Test case 6. D. Time: 2474L │ 00:00:44 verbose #769 > > │ Test case 7. E. Time: 1664L │ 00:00:44 verbose #770 > > │ Test case 8. F. Time: 1517L │ 00:00:44 verbose #771 > > │ Test case 9. FA. Time: 1651L │ 00:00:44 verbose #772 > > │ Test case 10. FB. Time: 3764L │ 00:00:44 verbose #773 > > │ Test case 11. FC. Time: 5415L │ 00:00:44 verbose #774 > > │ │ 00:00:44 verbose #775 > > │ Solution: abcde │ 00:00:44 verbose #776 > > │ Test case 1. A. Time: 3356L │ 00:00:44 verbose #777 > > │ Test case 2. B. Time: 2592L │ 00:00:44 verbose #778 > > │ Test case 3. C. Time: 2346L │ 00:00:44 verbose #779 > > │ Test case 4. CA. Time: 2997L │ 00:00:44 verbose #780 > > │ Test case 5. CB. Time: 3061L │ 00:00:44 verbose #781 > > │ Test case 6. D. Time: 4051L │ 00:00:44 verbose #782 > > │ Test case 7. E. Time: 1905L │ 00:00:44 verbose #783 > > │ Test case 8. F. Time: 1771L │ 00:00:44 verbose #784 > > │ Test case 9. FA. Time: 2175L │ 00:00:44 verbose #785 > > │ Test case 10. FB. Time: 3275L │ 00:00:44 verbose #786 > > │ Test case 11. FC. Time: 5266L │ 00:00:44 verbose #787 > > │ │ 00:00:44 verbose #788 > > │ Solution: abcdefghi │ 00:00:44 verbose #789 > > │ Test case 1. A. Time: 4492L │ 00:00:44 verbose #790 > > │ Test case 2. B. Time: 3526L │ 00:00:44 verbose #791 > > │ Test case 3. C. Time: 3583L │ 00:00:44 verbose #792 > > │ Test case 4. CA. Time: 3711L │ 00:00:44 verbose #793 > > │ Test case 5. CB. Time: 4783L │ 00:00:44 verbose #794 > > │ Test case 6. D. Time: 7557L │ 00:00:44 verbose #795 > > │ Test case 7. E. Time: 3452L │ 00:00:44 verbose #796 > > │ Test case 8. F. Time: 3050L │ 00:00:44 verbose #797 > > │ Test case 9. FA. Time: 3275L │ 00:00:44 verbose #798 > > │ Test case 10. FB. Time: 4635L │ 00:00:44 verbose #799 > > │ Test case 11. FC. Time: 5616L │ 00:00:44 verbose #800 > > │ │ 00:00:44 verbose #801 > > │ Solution: abab │ 00:00:44 verbose #802 > > │ Test case 1. A. Time: 2093L │ 00:00:44 verbose #803 > > │ Test case 2. B. Time: 1843L │ 00:00:44 verbose #804 > > │ Test case 3. C. Time: 1746L │ 00:00:44 verbose #805 > > │ Test case 4. CA. Time: 2085L │ 00:00:44 verbose #806 > > │ Test case 5. CB. Time: 2139L │ 00:00:44 verbose #807 > > │ Test case 6. D. Time: 2095L │ 00:00:44 verbose #808 > > │ Test case 7. E. Time: 1723L │ 00:00:44 verbose #809 > > │ Test case 8. F. Time: 1558L │ 00:00:44 verbose #810 > > │ Test case 9. FA. Time: 1620L │ 00:00:44 verbose #811 > > │ Test case 10. FB. Time: 2319L │ 00:00:44 verbose #812 > > │ Test case 11. FC. Time: 3918L │ 00:00:44 verbose #813 > > │ │ 00:00:44 verbose #814 > > │ Solution: aa │ 00:00:44 verbose #815 > > │ Test case 1. A. Time: 1107L │ 00:00:44 verbose #816 > > │ Test case 2. B. Time: 1241L │ 00:00:44 verbose #817 > > │ Test case 3. C. Time: 1183L │ 00:00:44 verbose #818 > > │ Test case 4. CA. Time: 1563L │ 00:00:44 verbose #819 > > │ Test case 5. CB. Time: 1525L │ 00:00:44 verbose #820 > > │ Test case 6. D. Time: 1591L │ 00:00:44 verbose #821 > > │ Test case 7. E. Time: 1327L │ 00:00:44 verbose #822 > > │ Test case 8. F. Time: 1151L │ 00:00:44 verbose #823 > > │ Test case 9. FA. Time: 1180L │ 00:00:44 verbose #824 > > │ Test case 10. FB. Time: 1733L │ 00:00:44 verbose #825 > > │ Test case 11. FC. Time: 2817L │ 00:00:44 verbose #826 > > │ │ 00:00:44 verbose #827 > > │ Solution: z │ 00:00:44 verbose #828 > > │ Test case 1. A. Time: 816L │ 00:00:44 verbose #829 > > │ Test case 2. B. Time: 745L │ 00:00:44 verbose #830 > > │ Test case 3. C. Time: 928L │ 00:00:44 verbose #831 > > │ Test case 4. CA. Time: 1375L │ 00:00:44 verbose #832 > > │ Test case 5. CB. Time: 1029L │ 00:00:44 verbose #833 > > │ Test case 6. D. Time: 852L │ 00:00:44 verbose #834 > > │ Test case 7. E. Time: 712L │ 00:00:44 verbose #835 > > │ Test case 8. F. Time: 263L │ 00:00:44 verbose #836 > > │ Test case 9. FA. Time: 232L │ 00:00:44 verbose #837 > > │ Test case 10. FB. Time: 773L │ 00:00:44 verbose #838 > > │ Test case 11. FC. Time: 1789L │ 00:00:44 verbose #839 > > │ │ 00:00:44 verbose #840 > > │ Input | Expected │ 00:00:44 verbose #841 > > │ │ 00:00:44 verbose #842 > > │ | Result │ 00:00:44 verbose #843 > > │ │ 00:00:44 verbose #844 > > │ | Best │ 00:00:44 verbose #845 > > │ --- | --- │ 00:00:44 verbose #846 > > │ │ 00:00:44 verbose #847 > > │ | --- │ 00:00:44 verbose #848 > > │ │ 00:00:44 verbose #849 > > │ | --- │ 00:00:44 verbose #850 > > │ abc | bca cab abc │ 00:00:44 verbose #851 > > │ │ 00:00:44 verbose #852 > > │ | bca cab abc │ 00:00:44 verbose #853 > > │ │ 00:00:44 verbose #854 > > │ | (8, 1517) │ 00:00:44 verbose #855 > > │ abcde | bcdea cdeab deabc eabcd abcde │ 00:00:44 verbose #856 > > │ | bcdea cdeab deabc eabcd abcde │ 00:00:44 verbose #857 > > │ | (8, 1771) │ 00:00:44 verbose #858 > > │ abcdefghi | bcdefghia cdefghiab defghiabc efghiabcd fghiabcde │ 00:00:44 verbose #859 > > │ ghiabcdef hiabcdefg iabcdefgh abcdefghi | bcdefghia cdefghiab │ 00:00:44 verbose #860 > > │ defghiabc efghiabcd fghiabcde ghiabcdef hiabcdefg iabcdefgh abcdefghi │ 00:00:44 verbose #861 > > │ | (8, 3050) │ 00:00:44 verbose #862 > > │ abab | baba abab baba abab │ 00:00:44 verbose #863 > > │ │ 00:00:44 verbose #864 > > │ | baba abab baba abab │ 00:00:44 verbose #865 > > │ │ 00:00:44 verbose #866 > > │ | (8, 1558) │ 00:00:44 verbose #867 > > │ aa | aa aa │ 00:00:44 verbose #868 > > │ │ 00:00:44 verbose #869 > > │ | aa aa │ 00:00:44 verbose #870 > > │ │ 00:00:44 verbose #871 > > │ | (1, 1107) │ 00:00:44 verbose #872 > > │ z | z │ 00:00:44 verbose #873 > > │ │ 00:00:44 verbose #874 > > │ | z │ 00:00:44 verbose #875 > > │ │ 00:00:44 verbose #876 > > │ | (9, 232) │ 00:00:44 verbose #877 > > │ │ 00:00:44 verbose #878 > > │ Averages │ 00:00:44 verbose #879 > > │ Test case 1. Average Time: 2284L │ 00:00:44 verbose #880 > > │ Test case 2. Average Time: 1965L │ 00:00:44 verbose #881 > > │ Test case 3. Average Time: 1953L │ 00:00:44 verbose #882 > > │ Test case 4. Average Time: 2325L │ 00:00:44 verbose #883 > > │ Test case 5. Average Time: 2477L │ 00:00:44 verbose #884 > > │ Test case 6. Average Time: 3103L │ 00:00:44 verbose #885 > > │ Test case 7. Average Time: 1797L │ 00:00:44 verbose #886 > > │ Test case 8. Average Time: 1551L │ 00:00:44 verbose #887 > > │ Test case 9. Average Time: 1688L │ 00:00:44 verbose #888 > > │ Test case 10. Average Time: 2749L │ 00:00:44 verbose #889 > > │ Test case 11. Average Time: 4136L │ 00:00:44 verbose #890 > > │ │ 00:00:44 verbose #891 > > │ Ranking │ 00:00:44 verbose #892 > > │ Test case 11. Average Time: 4136L │ 00:00:44 verbose #893 > > │ Test case 6. Average Time: 3103L │ 00:00:44 verbose #894 > > │ Test case 10. Average Time: 2749L │ 00:00:44 verbose #895 > > │ Test case 5. Average Time: 2477L │ 00:00:44 verbose #896 > > │ Test case 4. Average Time: 2325L │ 00:00:44 verbose #897 > > │ Test case 1. Average Time: 2284L │ 00:00:44 verbose #898 > > │ Test case 2. Average Time: 1965L │ 00:00:44 verbose #899 > > │ Test case 3. Average Time: 1953L │ 00:00:44 verbose #900 > > │ Test case 7. Average Time: 1797L │ 00:00:44 verbose #901 > > │ Test case 9. Average Time: 1688L │ 00:00:44 verbose #902 > > │ Test case 8. Average Time: 1551L │ 00:00:44 verbose #903 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:44 verbose #904 > > 00:00:44 verbose #905 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:44 verbose #906 > > //// test 00:00:44 verbose #907 > > 00:00:44 verbose #908 > > let solutions = [[ 00:00:44 verbose #909 > > "A", 00:00:44 verbose #910 > > fun (input: string) -> 00:00:44 verbose #911 > > let resultList = 00:00:44 verbose #912 > > List.fold (fun acc x -> 00:00:44 verbose #913 > > let rotate (text: string) (letter: string) = (text |> 00:00:44 verbose #914 > > SpiralSm.slice 1 (input.Length - 1)) + letter 00:00:44 verbose #915 > > [[ rotate (if acc.IsEmpty then input else acc.Head) (string x) 00:00:44 verbose #916 > > ]] @ acc 00:00:44 verbose #917 > > ) [[]] (Seq.toList input) 00:00:44 verbose #918 > > 00:00:44 verbose #919 > > (resultList, "") 00:00:44 verbose #920 > > ||> List.foldBack (fun acc x -> x + acc + " ") 00:00:44 verbose #921 > > |> _.TrimEnd() 00:00:44 verbose #922 > > 00:00:44 verbose #923 > > "B", 00:00:44 verbose #924 > > fun input -> 00:00:44 verbose #925 > > input 00:00:44 verbose #926 > > |> Seq.toList 00:00:44 verbose #927 > > |> List.fold (fun (acc: string list) letter -> 00:00:44 verbose #928 > > let last = 00:00:44 verbose #929 > > if acc.IsEmpty 00:00:44 verbose #930 > > then input 00:00:44 verbose #931 > > else acc.Head 00:00:44 verbose #932 > > 00:00:44 verbose #933 > > let item = last.[[1 .. input.Length - 1]] + string letter 00:00:44 verbose #934 > > 00:00:44 verbose #935 > > item :: acc 00:00:44 verbose #936 > > ) [[]] 00:00:44 verbose #937 > > |> List.rev 00:00:44 verbose #938 > > |> SpiralSm.concat " " 00:00:44 verbose #939 > > 00:00:44 verbose #940 > > "C", 00:00:44 verbose #941 > > fun input -> 00:00:44 verbose #942 > > input 00:00:44 verbose #943 > > |> Seq.toList 00:00:44 verbose #944 > > |> List.fold (fun (acc: string list) letter -> acc.Head.[[ 1 .. 00:00:44 verbose #945 > > input.Length - 1 ]] + string letter :: acc) [[ input ]] 00:00:44 verbose #946 > > |> List.rev 00:00:44 verbose #947 > > |> List.skip 1 00:00:44 verbose #948 > > |> SpiralSm.concat " " 00:00:44 verbose #949 > > 00:00:44 verbose #950 > > "CA", 00:00:44 verbose #951 > > fun input -> 00:00:44 verbose #952 > > input 00:00:44 verbose #953 > > |> Seq.fold (fun (acc: string list) letter -> acc.Head.[[ 1 .. 00:00:44 verbose #954 > > input.Length - 1 ]] + string letter :: acc) [[ input ]] 00:00:44 verbose #955 > > |> Seq.rev 00:00:44 verbose #956 > > |> Seq.skip 1 00:00:44 verbose #957 > > |> SpiralSm.concat " " 00:00:44 verbose #958 > > 00:00:44 verbose #959 > > "CB", 00:00:44 verbose #960 > > fun input -> 00:00:44 verbose #961 > > input 00:00:44 verbose #962 > > |> Seq.toArray 00:00:44 verbose #963 > > |> Array.fold (fun (acc: string[[]]) letter -> acc |> Array.append [[| 00:00:44 verbose #964 > > acc.[[0]].[[ 1 .. input.Length - 1 ]] + string letter |]]) [[| input |]] 00:00:44 verbose #965 > > |> Array.rev 00:00:44 verbose #966 > > |> Array.skip 1 00:00:44 verbose #967 > > |> SpiralSm.concat " " 00:00:44 verbose #968 > > 00:00:44 verbose #969 > > "D", 00:00:44 verbose #970 > > fun input -> 00:00:44 verbose #971 > > input 00:00:44 verbose #972 > > |> Seq.toList 00:00:44 verbose #973 > > |> fun list -> 00:00:44 verbose #974 > > let rec loop (acc: char list list) = function 00:00:44 verbose #975 > > | _ when acc.Length = list.Length -> acc 00:00:44 verbose #976 > > | head :: tail -> 00:00:44 verbose #977 > > let item = tail @ [[ head ]] 00:00:44 verbose #978 > > loop (item :: acc) item 00:00:44 verbose #979 > > | [[]] -> [[]] 00:00:44 verbose #980 > > loop [[]] list 00:00:44 verbose #981 > > |> List.rev 00:00:44 verbose #982 > > |> List.map (List.toArray >> String) 00:00:44 verbose #983 > > |> SpiralSm.concat " " 00:00:44 verbose #984 > > 00:00:44 verbose #985 > > "E", 00:00:44 verbose #986 > > fun input -> 00:00:44 verbose #987 > > input 00:00:44 verbose #988 > > |> Seq.toList 00:00:44 verbose #989 > > |> fun list -> 00:00:44 verbose #990 > > let rec loop (last: string) = function 00:00:44 verbose #991 > > | head :: tail -> 00:00:44 verbose #992 > > let item = last.[[1 .. input.Length - 1]] + string head 00:00:44 verbose #993 > > item :: loop item tail 00:00:44 verbose #994 > > | [[]] -> [[]] 00:00:44 verbose #995 > > loop input list 00:00:44 verbose #996 > > |> SpiralSm.concat " " 00:00:44 verbose #997 > > 00:00:44 verbose #998 > > "F", 00:00:44 verbose #999 > > fun input -> 00:00:44 verbose #1000 > > Array.singleton 0 00:00:44 verbose #1001 > > |> Array.append [[| 1 .. input.Length - 1 |]] 00:00:44 verbose #1002 > > |> Array.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]]) 00:00:44 verbose #1003 > > |> SpiralSm.concat " " 00:00:44 verbose #1004 > > 00:00:44 verbose #1005 > > "FA", 00:00:44 verbose #1006 > > fun input -> 00:00:44 verbose #1007 > > List.singleton 0 00:00:44 verbose #1008 > > |> List.append [[ 1 .. input.Length - 1 ]] 00:00:44 verbose #1009 > > |> List.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]]) 00:00:44 verbose #1010 > > |> SpiralSm.concat " " 00:00:44 verbose #1011 > > 00:00:44 verbose #1012 > > "FB", 00:00:44 verbose #1013 > > fun input -> 00:00:44 verbose #1014 > > Seq.singleton 0 00:00:44 verbose #1015 > > |> Seq.append (seq { 1 .. input.Length - 1 }) 00:00:44 verbose #1016 > > |> Seq.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]]) 00:00:44 verbose #1017 > > |> SpiralSm.concat " " 00:00:44 verbose #1018 > > 00:00:44 verbose #1019 > > "FC", 00:00:44 verbose #1020 > > fun input -> 00:00:44 verbose #1021 > > Array.singleton 0 00:00:44 verbose #1022 > > |> Array.append [[| 1 .. input.Length - 1 |]] 00:00:44 verbose #1023 > > |> Array.Parallel.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]]) 00:00:44 verbose #1024 > > |> SpiralSm.concat " " 00:00:44 verbose #1025 > > ]] 00:00:44 verbose #1026 > > let testCases = seq { 00:00:44 verbose #1027 > > "abc", "bca cab abc" 00:00:44 verbose #1028 > > "abcde", "bcdea cdeab deabc eabcd abcde" 00:00:44 verbose #1029 > > "abcdefghi", "bcdefghia cdefghiab defghiabc efghiabcd fghiabcde ghiabcdef 00:00:44 verbose #1030 > > hiabcdefg iabcdefgh abcdefghi" 00:00:44 verbose #1031 > > "abab", "baba abab baba abab" 00:00:44 verbose #1032 > > "aa", "aa aa" 00:00:44 verbose #1033 > > "z", "z" 00:00:44 verbose #1034 > > } 00:00:44 verbose #1035 > > let rec rotateStringsTests = runAll (nameof rotateStringsTests) _count solutions 00:00:44 verbose #1036 > > testCases 00:00:44 verbose #1037 > > rotateStringsTests 00:00:44 verbose #1038 > > |> sortResultList 00:01:04 verbose #1039 > > 00:01:04 verbose #1040 > > ╭─[ 20.42s - stdout ]──────────────────────────────────────────────────────────╮ 00:01:04 verbose #1041 > > │ │ 00:01:04 verbose #1042 > > │ │ 00:01:04 verbose #1043 > > │ Test: rotateStringsTests │ 00:01:04 verbose #1044 > > │ │ 00:01:04 verbose #1045 > > │ Solution: abc │ 00:01:04 verbose #1046 > > │ Test case 1. A. Time: 4L │ 00:01:04 verbose #1047 > > │ Test case 2. B. Time: 3L │ 00:01:04 verbose #1048 > > │ Test case 3. C. Time: 3L │ 00:01:04 verbose #1049 > > │ Test case 4. CA. Time: 5L │ 00:01:04 verbose #1050 > > │ Test case 5. CB. Time: 3L │ 00:01:04 verbose #1051 > > │ Test case 6. D. Time: 5L │ 00:01:04 verbose #1052 > > │ Test case 7. E. Time: 3L │ 00:01:04 verbose #1053 > > │ Test case 8. F. Time: 4L │ 00:01:04 verbose #1054 > > │ Test case 9. FA. Time: 3L │ 00:01:04 verbose #1055 > > │ Test case 10. FB. Time: 14L │ 00:01:04 verbose #1056 > > │ Test case 11. FC. Time: 13L │ 00:01:04 verbose #1057 > > │ │ 00:01:04 verbose #1058 > > │ Solution: abcde │ 00:01:04 verbose #1059 > > │ Test case 1. A. Time: 5L │ 00:01:04 verbose #1060 > > │ Test case 2. B. Time: 2L │ 00:01:04 verbose #1061 > > │ Test case 3. C. Time: 1L │ 00:01:04 verbose #1062 > > │ Test case 4. CA. Time: 2L │ 00:01:04 verbose #1063 > > │ Test case 5. CB. Time: 2L │ 00:01:04 verbose #1064 > > │ Test case 6. D. Time: 5L │ 00:01:04 verbose #1065 > > │ Test case 7. E. Time: 1L │ 00:01:04 verbose #1066 > > │ Test case 8. F. Time: 0L │ 00:01:04 verbose #1067 > > │ Test case 9. FA. Time: 1L │ 00:01:04 verbose #1068 > > │ Test case 10. FB. Time: 9L │ 00:01:04 verbose #1069 > > │ Test case 11. FC. Time: 5L │ 00:01:04 verbose #1070 > > │ │ 00:01:04 verbose #1071 > > │ Solution: abcdefghi │ 00:01:04 verbose #1072 > > │ Test case 1. A. Time: 8L │ 00:01:04 verbose #1073 > > │ Test case 2. B. Time: 2L │ 00:01:04 verbose #1074 > > │ Test case 3. C. Time: 5L │ 00:01:04 verbose #1075 > > │ Test case 4. CA. Time: 1L │ 00:01:04 verbose #1076 > > │ Test case 5. CB. Time: 5L │ 00:01:04 verbose #1077 > > │ Test case 6. D. Time: 10L │ 00:01:04 verbose #1078 > > │ Test case 7. E. Time: 4L │ 00:01:04 verbose #1079 > > │ Test case 8. F. Time: 1L │ 00:01:04 verbose #1080 > > │ Test case 9. FA. Time: 6L │ 00:01:04 verbose #1081 > > │ Test case 10. FB. Time: 3L │ 00:01:04 verbose #1082 > > │ Test case 11. FC. Time: 6L │ 00:01:04 verbose #1083 > > │ │ 00:01:04 verbose #1084 > > │ Solution: abab │ 00:01:04 verbose #1085 > > │ Test case 1. A. Time: 1L │ 00:01:04 verbose #1086 > > │ Test case 2. B. Time: 1L │ 00:01:04 verbose #1087 > > │ Test case 3. C. Time: 1L │ 00:01:04 verbose #1088 > > │ Test case 4. CA. Time: 2L │ 00:01:04 verbose #1089 > > │ Test case 5. CB. Time: 1L │ 00:01:04 verbose #1090 > > │ Test case 6. D. Time: 2L │ 00:01:04 verbose #1091 > > │ Test case 7. E. Time: 1L │ 00:01:04 verbose #1092 > > │ Test case 8. F. Time: 0L │ 00:01:04 verbose #1093 > > │ Test case 9. FA. Time: 1L │ 00:01:04 verbose #1094 > > │ Test case 10. FB. Time: 1L │ 00:01:04 verbose #1095 > > │ Test case 11. FC. Time: 13L │ 00:01:04 verbose #1096 > > │ │ 00:01:04 verbose #1097 > > │ Solution: aa │ 00:01:04 verbose #1098 > > │ Test case 1. A. Time: 1L │ 00:01:04 verbose #1099 > > │ Test case 2. B. Time: 0L │ 00:01:04 verbose #1100 > > │ Test case 3. C. Time: 0L │ 00:01:04 verbose #1101 > > │ Test case 4. CA. Time: 2L │ 00:01:04 verbose #1102 > > │ Test case 5. CB. Time: 1L │ 00:01:04 verbose #1103 > > │ Test case 6. D. Time: 1L │ 00:01:04 verbose #1104 > > │ Test case 7. E. Time: 2L │ 00:01:04 verbose #1105 > > │ Test case 8. F. Time: 1L │ 00:01:04 verbose #1106 > > │ Test case 9. FA. Time: 1L │ 00:01:04 verbose #1107 > > │ Test case 10. FB. Time: 1L │ 00:01:04 verbose #1108 > > │ Test case 11. FC. Time: 10L │ 00:01:04 verbose #1109 > > │ │ 00:01:04 verbose #1110 > > │ Solution: z │ 00:01:04 verbose #1111 > > │ Test case 1. A. Time: 0L │ 00:01:04 verbose #1112 > > │ Test case 2. B. Time: 0L │ 00:01:04 verbose #1113 > > │ Test case 3. C. Time: 0L │ 00:01:04 verbose #1114 > > │ Test case 4. CA. Time: 1L │ 00:01:04 verbose #1115 > > │ Test case 5. CB. Time: 0L │ 00:01:04 verbose #1116 > > │ Test case 6. D. Time: 1L │ 00:01:04 verbose #1117 > > │ Test case 7. E. Time: 0L │ 00:01:04 verbose #1118 > > │ Test case 8. F. Time: 0L │ 00:01:04 verbose #1119 > > │ Test case 9. FA. Time: 0L │ 00:01:04 verbose #1120 > > │ Test case 10. FB. Time: 1L │ 00:01:04 verbose #1121 > > │ Test case 11. FC. Time: 6L │ 00:01:04 verbose #1122 > > │ │ 00:01:04 verbose #1123 > > │ Input | Expected │ 00:01:04 verbose #1124 > > │ │ 00:01:04 verbose #1125 > > │ | Result │ 00:01:04 verbose #1126 > > │ │ 00:01:04 verbose #1127 > > │ | Best │ 00:01:04 verbose #1128 > > │ --- | --- │ 00:01:04 verbose #1129 > > │ │ 00:01:04 verbose #1130 > > │ | --- │ 00:01:04 verbose #1131 > > │ │ 00:01:04 verbose #1132 > > │ | --- │ 00:01:04 verbose #1133 > > │ abc | bca cab abc │ 00:01:04 verbose #1134 > > │ │ 00:01:04 verbose #1135 > > │ | bca cab abc │ 00:01:04 verbose #1136 > > │ │ 00:01:04 verbose #1137 > > │ | (2, 3) │ 00:01:04 verbose #1138 > > │ abcde | bcdea cdeab deabc eabcd abcde │ 00:01:04 verbose #1139 > > │ | bcdea cdeab deabc eabcd abcde │ 00:01:04 verbose #1140 > > │ | (8, 0) │ 00:01:04 verbose #1141 > > │ abcdefghi | bcdefghia cdefghiab defghiabc efghiabcd fghiabcde ghiabcdef │ 00:01:04 verbose #1142 > > │ hiabcdefg iabcdefgh abcdefghi | bcdefghia cdefghiab defghiabc efghiabcd │ 00:01:04 verbose #1143 > > │ fghiabcde ghiabcdef hiabcdefg iabcdefgh abcdefghi | (4, 1) │ 00:01:04 verbose #1144 > > │ abab | baba abab baba abab │ 00:01:04 verbose #1145 > > │ | baba abab baba abab │ 00:01:04 verbose #1146 > > │ | (8, 0) │ 00:01:04 verbose #1147 > > │ aa | aa aa │ 00:01:04 verbose #1148 > > │ │ 00:01:04 verbose #1149 > > │ | aa aa │ 00:01:04 verbose #1150 > > │ │ 00:01:04 verbose #1151 > > │ | (2, 0) │ 00:01:04 verbose #1152 > > │ z | z │ 00:01:04 verbose #1153 > > │ │ 00:01:04 verbose #1154 > > │ | z │ 00:01:04 verbose #1155 > > │ │ 00:01:04 verbose #1156 > > │ | (1, 0) │ 00:01:04 verbose #1157 > > │ │ 00:01:04 verbose #1158 > > │ Average Ranking │ 00:01:04 verbose #1159 > > │ Test case 2. Average Time: 1L │ 00:01:04 verbose #1160 > > │ Test case 3. Average Time: 1L │ 00:01:04 verbose #1161 > > │ Test case 7. Average Time: 1L │ 00:01:04 verbose #1162 > > │ Test case 8. Average Time: 1L │ 00:01:04 verbose #1163 > > │ Test case 4. Average Time: 2L │ 00:01:04 verbose #1164 > > │ Test case 5. Average Time: 2L │ 00:01:04 verbose #1165 > > │ Test case 9. Average Time: 2L │ 00:01:04 verbose #1166 > > │ Test case 1. Average Time: 3L │ 00:01:04 verbose #1167 > > │ Test case 6. Average Time: 4L │ 00:01:04 verbose #1168 > > │ Test case 10. Average Time: 4L │ 00:01:04 verbose #1169 > > │ Test case 11. Average Time: 8L │ 00:01:04 verbose #1170 > > │ │ 00:01:04 verbose #1171 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:04 verbose #1172 > > 00:01:04 verbose #1173 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:04 verbose #1174 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:04 verbose #1175 > > │ ## rotate_strings_tests │ 00:01:04 verbose #1176 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:04 verbose #1177 > > 00:01:04 verbose #1178 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:04 verbose #1179 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:04 verbose #1180 > > │ ``` │ 00:01:04 verbose #1181 > > │ 02:21:12 verbose #1 benchmark.run_all / {count = 2000000; test_name = │ 00:01:04 verbose #1182 > > │ rotate_strings_tests} │ 00:01:04 verbose #1183 > > │ │ 00:01:04 verbose #1184 > > │ 02:21:12 verbose #2 benchmark.run / {input_str = "abc"} │ 00:01:04 verbose #1185 > > │ 02:21:13 verbose #3 benchmark.run / solutions.map / {i = 1; test_name = │ 00:01:04 verbose #1186 > > │ F; time = 638} │ 00:01:04 verbose #1187 > > │ 02:21:14 verbose #4 benchmark.run / solutions.map / {i = 2; test_name = │ 00:01:04 verbose #1188 > > │ FA; time = 779} │ 00:01:04 verbose #1189 > > │ │ 00:01:04 verbose #1190 > > │ 02:21:14 verbose #5 benchmark.run / {input_str = "abcde"} │ 00:01:04 verbose #1191 > > │ 02:21:15 verbose #6 benchmark.run / solutions.map / {i = 1; test_name = │ 00:01:04 verbose #1192 > > │ F; time = 745} │ 00:01:04 verbose #1193 > > │ 02:21:16 verbose #7 benchmark.run / solutions.map / {i = 2; test_name = │ 00:01:04 verbose #1194 > > │ FA; time = 809} │ 00:01:04 verbose #1195 > > │ │ 00:01:04 verbose #1196 > > │ 02:21:16 verbose #8 benchmark.run / {input_str = "abcdefghi"} │ 00:01:04 verbose #1197 > > │ 02:21:17 verbose #9 benchmark.run / solutions.map / {i = 1; test_name = │ 00:01:04 verbose #1198 > > │ F; time = 1092} │ 00:01:04 verbose #1199 > > │ 02:21:18 verbose #10 benchmark.run / solutions.map / {i = 2; test_name │ 00:01:04 verbose #1200 > > │ = FA; time = 1304} │ 00:01:04 verbose #1201 > > │ │ 00:01:04 verbose #1202 > > │ 02:21:18 verbose #11 benchmark.run / {input_str = "abab"} │ 00:01:04 verbose #1203 > > │ 02:21:19 verbose #12 benchmark.run / solutions.map / {i = 1; test_name │ 00:01:04 verbose #1204 > > │ = F; time = 536} │ 00:01:04 verbose #1205 > > │ 02:21:20 verbose #13 benchmark.run / solutions.map / {i = 2; test_name │ 00:01:04 verbose #1206 > > │ = FA; time = 620} │ 00:01:04 verbose #1207 > > │ │ 00:01:04 verbose #1208 > > │ 02:21:20 verbose #14 benchmark.run / {input_str = "aa"} │ 00:01:04 verbose #1209 > > │ 02:21:21 verbose #15 benchmark.run / solutions.map / {i = 1; test_name │ 00:01:04 verbose #1210 > > │ = F; time = 365} │ 00:01:04 verbose #1211 > > │ 02:21:21 verbose #16 benchmark.run / solutions.map / {i = 2; test_name │ 00:01:04 verbose #1212 > > │ = FA; time = 396} │ 00:01:04 verbose #1213 > > │ │ 00:01:04 verbose #1214 > > │ 02:21:21 verbose #17 benchmark.run / {input_str = "z"} │ 00:01:04 verbose #1215 > > │ 02:21:22 verbose #18 benchmark.run / solutions.map / {i = 1; test_name │ 00:01:04 verbose #1216 > > │ = F; time = 158} │ 00:01:04 verbose #1217 > > │ 02:21:22 verbose #19 benchmark.run / solutions.map / {i = 2; test_name │ 00:01:04 verbose #1218 > > │ = FA; time = 143} │ 00:01:04 verbose #1219 > > │ ``` │ 00:01:04 verbose #1220 > > │ input | expected │ 00:01:04 verbose #1221 > > │ │ 00:01:04 verbose #1222 > > │ | result │ 00:01:04 verbose #1223 > > │ │ 00:01:04 verbose #1224 > > │ | best │ 00:01:04 verbose #1225 > > │ --- | --- │ 00:01:04 verbose #1226 > > │ │ 00:01:04 verbose #1227 > > │ | --- │ 00:01:04 verbose #1228 > > │ │ 00:01:04 verbose #1229 > > │ | --- │ 00:01:04 verbose #1230 > > │ "abc" | "bca cab abc" │ 00:01:04 verbose #1231 > > │ │ 00:01:04 verbose #1232 > > │ | "bca cab abc" │ 00:01:04 verbose #1233 > > │ │ 00:01:04 verbose #1234 > > │ | 1, 638 │ 00:01:04 verbose #1235 > > │ "abcde" | "bcdea cdeab deabc eabcd abcde" │ 00:01:04 verbose #1236 > > │ | "bcdea cdeab deabc eabcd abcde" │ 00:01:04 verbose #1237 > > │ | 1, 745 │ 00:01:04 verbose #1238 > > │ "abcdefghi" | "bcdefghia cdefghiab defghiabc efghiabcd fghiabcde ghiabcdef │ 00:01:04 verbose #1239 > > │ hiabcdefg iabcdefgh abcdefghi" | "bcdefghia cdefghiab defghiabc efghiabcd │ 00:01:04 verbose #1240 > > │ fghiabcde ghiabcdef hiabcdefg iabcdefgh abcdefghi" | 1, 1092 │ 00:01:04 verbose #1241 > > │ "abab" | "baba abab baba abab" │ 00:01:04 verbose #1242 > > │ | "baba abab baba abab" │ 00:01:04 verbose #1243 > > │ | 1, 536 │ 00:01:04 verbose #1244 > > │ "aa" | "aa aa" │ 00:01:04 verbose #1245 > > │ │ 00:01:04 verbose #1246 > > │ | "aa aa" │ 00:01:04 verbose #1247 > > │ │ 00:01:04 verbose #1248 > > │ | 1, 365 │ 00:01:04 verbose #1249 > > │ "z" | "z" │ 00:01:04 verbose #1250 > > │ │ 00:01:04 verbose #1251 > > │ | "z" │ 00:01:04 verbose #1252 > > │ │ 00:01:04 verbose #1253 > > │ | 2, 143 │ 00:01:04 verbose #1254 > > │ ``` │ 00:01:04 verbose #1255 > > │ 02:21:22 verbose #20 benchmark.sort_result_list / averages.iter / {avg │ 00:01:04 verbose #1256 > > │ = 589; i = 1} │ 00:01:04 verbose #1257 > > │ 02:21:22 verbose #21 benchmark.sort_result_list / averages.iter / {avg │ 00:01:04 verbose #1258 > > │ = 675; i = 2} │ 00:01:04 verbose #1259 > > │ ``` │ 00:01:04 verbose #1260 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:04 verbose #1261 > > 00:01:04 verbose #1262 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:04 verbose #1263 > > //// test 00:01:04 verbose #1264 > > //// timeout=60000 00:01:04 verbose #1265 > > 00:01:04 verbose #1266 > > inl get_solutions () = 00:01:04 verbose #1267 > > [[ 00:01:04 verbose #1268 > > // "A", 00:01:04 verbose #1269 > > // fun (input : string) => 00:01:04 verbose #1270 > > // let resultList = 00:01:04 verbose #1271 > > // List.fold (fun acc x => 00:01:04 verbose #1272 > > // let rotate (text : string) (letter : string) = 00:01:04 verbose #1273 > > text.Substring (1, input.Length - 1) + letter 00:01:04 verbose #1274 > > // [[ rotate (if acc.IsEmpty then input else acc.Head) 00:01:04 verbose #1275 > > (string x) ]] ++ acc 00:01:04 verbose #1276 > > // ) [[]] (Seq.toList input) 00:01:04 verbose #1277 > > 00:01:04 verbose #1278 > > // List.foldBack (fun acc x => x + acc + " ") resultList "" 00:01:04 verbose #1279 > > // |> fun x => x.TrimEnd () 00:01:04 verbose #1280 > > 00:01:04 verbose #1281 > > // "B", 00:01:04 verbose #1282 > > // fun input => 00:01:04 verbose #1283 > > // input 00:01:04 verbose #1284 > > // |> Seq.toList 00:01:04 verbose #1285 > > // |> List.fold (fun (acc : string list) letter => 00:01:04 verbose #1286 > > // let last = 00:01:04 verbose #1287 > > // if acc.IsEmpty 00:01:04 verbose #1288 > > // then input 00:01:04 verbose #1289 > > // else acc.Head 00:01:04 verbose #1290 > > 00:01:04 verbose #1291 > > // let item = last.[[1 .. input.Length - 1]] + string letter 00:01:04 verbose #1292 > > 00:01:04 verbose #1293 > > // item :: acc 00:01:04 verbose #1294 > > // ) [[]] 00:01:04 verbose #1295 > > // |> List.rev 00:01:04 verbose #1296 > > // |> SpiralSm.concat " " 00:01:04 verbose #1297 > > 00:01:04 verbose #1298 > > // "C", 00:01:04 verbose #1299 > > // fun input => 00:01:04 verbose #1300 > > // input 00:01:04 verbose #1301 > > // |> Seq.toList 00:01:04 verbose #1302 > > // |> List.fold (fun (acc : list string) letter => acc.Head.[[ 1 .. 00:01:04 verbose #1303 > > input.Length - 1 ]] + string letter :: acc) [[ input ]] 00:01:04 verbose #1304 > > // |> List.rev 00:01:04 verbose #1305 > > // |> List.skip 1 00:01:04 verbose #1306 > > // |> SpiralSm.concat " " 00:01:04 verbose #1307 > > 00:01:04 verbose #1308 > > // "CA", 00:01:04 verbose #1309 > > // fun input => 00:01:04 verbose #1310 > > // input 00:01:04 verbose #1311 > > // |> Seq.fold (fun (acc : list string) letter => acc.Head.[[ 1 .. 00:01:04 verbose #1312 > > input.Length - 1 ]] + string letter :: acc) [[ input ]] 00:01:04 verbose #1313 > > // |> Seq.rev 00:01:04 verbose #1314 > > // |> Seq.skip 1 00:01:04 verbose #1315 > > // |> SpiralSm.concat " " 00:01:04 verbose #1316 > > 00:01:04 verbose #1317 > > // "CB", 00:01:04 verbose #1318 > > // fun input => 00:01:04 verbose #1319 > > // input 00:01:04 verbose #1320 > > // |> Seq.toArray 00:01:04 verbose #1321 > > // |> Array.fold (fun (acc : a _ string) letter => acc |> 00:01:04 verbose #1322 > > Array.append (a ;[[ acc.[[0]].[[ 1 .. input.Length - 1 ]] + string letter ]])) 00:01:04 verbose #1323 > > (a ;[[ input ]]) 00:01:04 verbose #1324 > > // |> Array.rev 00:01:04 verbose #1325 > > // |> Array.skip 1 00:01:04 verbose #1326 > > // |> SpiralSm.concat " " 00:01:04 verbose #1327 > > 00:01:04 verbose #1328 > > // "D", 00:01:04 verbose #1329 > > // fun input => 00:01:04 verbose #1330 > > // input 00:01:04 verbose #1331 > > // |> Seq.toList 00:01:04 verbose #1332 > > // |> fun list => 00:01:04 verbose #1333 > > // let rec loop (acc : list (list char)) = function 00:01:04 verbose #1334 > > // | _ when acc.Length = list.Length => acc 00:01:04 verbose #1335 > > // | head :: tail => 00:01:04 verbose #1336 > > // let item = tail ++ [[ head ]] 00:01:04 verbose #1337 > > // loop (item :: acc) item 00:01:04 verbose #1338 > > // | [[]] => [[]] 00:01:04 verbose #1339 > > // loop [[]] list 00:01:04 verbose #1340 > > // |> List.rev 00:01:04 verbose #1341 > > // |> List.map (List.toArray >> String) 00:01:04 verbose #1342 > > // |> SpiralSm.concat " " 00:01:04 verbose #1343 > > 00:01:04 verbose #1344 > > // "E", 00:01:04 verbose #1345 > > // fun input => 00:01:04 verbose #1346 > > // input 00:01:04 verbose #1347 > > // |> Seq.toList 00:01:04 verbose #1348 > > // |> fun list => 00:01:04 verbose #1349 > > // let rec loop (last : string) = function 00:01:04 verbose #1350 > > // | head :: tail => 00:01:04 verbose #1351 > > // let item = last.[[1 .. input.Length - 1]] + string 00:01:04 verbose #1352 > > head 00:01:04 verbose #1353 > > // item :: loop item tail 00:01:04 verbose #1354 > > // | [[]] => [[]] 00:01:04 verbose #1355 > > // loop input list 00:01:04 verbose #1356 > > // |> SpiralSm.concat " " 00:01:04 verbose #1357 > > 00:01:04 verbose #1358 > > "F", 00:01:04 verbose #1359 > > fun input => 00:01:04 verbose #1360 > > // Array.singleton 0 00:01:04 verbose #1361 > > // |> Array.append [[| 1 .. input.Length - 1 |]] 00:01:04 verbose #1362 > > // |> Array.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]]) 00:01:04 verbose #1363 > > // |> SpiralSm.concat " " 00:01:04 verbose #1364 > > inl input_length = input |> sm.length 00:01:04 verbose #1365 > > am.singleton 0i32 00:01:04 verbose #1366 > > |> am.append (am'.init_series 1 (input_length - 1) 1 |> fun x => a x 00:01:04 verbose #1367 > > : _ int _) 00:01:04 verbose #1368 > > |> fun (a x) => x 00:01:04 verbose #1369 > > |> am'.map_base fun i => 00:01:04 verbose #1370 > > inl a = input |> sm'.slice i (input_length - 1) 00:01:04 verbose #1371 > > inl b = input |> sm'.slice 0 (i - 1) 00:01:04 verbose #1372 > > a +. b 00:01:04 verbose #1373 > > |> fun x => a x : _ int _ 00:01:04 verbose #1374 > > |> seq.of_array 00:01:04 verbose #1375 > > |> sm'.concat " " 00:01:04 verbose #1376 > > 00:01:04 verbose #1377 > > "FA", 00:01:04 verbose #1378 > > fun input => 00:01:04 verbose #1379 > > // List.singleton 0 00:01:04 verbose #1380 > > // |> List.append [[ 1 .. input.Length - 1 ]] 00:01:04 verbose #1381 > > // // |> List.map (fun i => input.[[ i .. ]] + input.[[ .. i - 1 ]]) 00:01:04 verbose #1382 > > // |> SpiralSm.concat " " 00:01:04 verbose #1383 > > inl input_length = input |> sm.length 00:01:04 verbose #1384 > > listm.singleton 0i32 00:01:04 verbose #1385 > > |> listm.append (listm'.init_series 1 (input_length - 1) 1) 00:01:04 verbose #1386 > > |> listm.map (fun i => 00:01:04 verbose #1387 > > inl a = input |> sm'.slice i (input_length - 1) 00:01:04 verbose #1388 > > inl b = if i = 0 then "" else input |> sm'.slice 0 (i - 1) 00:01:04 verbose #1389 > > a +. b 00:01:04 verbose #1390 > > ) 00:01:04 verbose #1391 > > |> listm'.box 00:01:04 verbose #1392 > > |> listm'.to_array' 00:01:04 verbose #1393 > > |> fun x => a x : _ int _ 00:01:04 verbose #1394 > > |> seq.of_array 00:01:04 verbose #1395 > > |> sm'.concat " " 00:01:04 verbose #1396 > > 00:01:04 verbose #1397 > > // "FB", 00:01:04 verbose #1398 > > // fun input => 00:01:04 verbose #1399 > > // Seq.singleton 0 00:01:04 verbose #1400 > > // // |> Seq.append (seq { 1 .. input.Length - 1 }) 00:01:04 verbose #1401 > > // // |> Seq.map (fun i => input.[[ i .. ]] + input.[[ .. i - 1 ]]) 00:01:04 verbose #1402 > > // |> SpiralSm.concat " " 00:01:04 verbose #1403 > > 00:01:04 verbose #1404 > > // "FC", 00:01:04 verbose #1405 > > // fun input => 00:01:04 verbose #1406 > > // Array.singleton 0 00:01:04 verbose #1407 > > // |> Array.append (a ;[[ 1 .. input.Length - 1 ]]) 00:01:04 verbose #1408 > > //// |> Array.Parallel.map (fun i => input.[[ i .. ]] + input.[[ .. i 00:01:04 verbose #1409 > > - 1 ]]) 00:01:04 verbose #1410 > > // |> SpiralSm.concat " " 00:01:04 verbose #1411 > > ]] 00:01:04 verbose #1412 > > 00:01:04 verbose #1413 > > inl rec rotate_strings_tests () = 00:01:04 verbose #1414 > > inl test_cases = [[ 00:01:04 verbose #1415 > > "abc", "bca cab abc" 00:01:04 verbose #1416 > > "abcde", "bcdea cdeab deabc eabcd abcde" 00:01:04 verbose #1417 > > "abcdefghi", "bcdefghia cdefghiab defghiabc efghiabcd fghiabcde 00:01:04 verbose #1418 > > ghiabcdef hiabcdefg iabcdefgh abcdefghi" 00:01:04 verbose #1419 > > "abab", "baba abab baba abab" 00:01:04 verbose #1420 > > "aa", "aa aa" 00:01:04 verbose #1421 > > "z", "z" 00:01:04 verbose #1422 > > ]] 00:01:04 verbose #1423 > > 00:01:04 verbose #1424 > > inl solutions = get_solutions () 00:01:04 verbose #1425 > > 00:01:04 verbose #1426 > > // inl is_fast () = true 00:01:04 verbose #1427 > > 00:01:04 verbose #1428 > > inl count = 00:01:04 verbose #1429 > > if is_fast () 00:01:04 verbose #1430 > > then 1000i32 00:01:04 verbose #1431 > > else 2000000i32 00:01:04 verbose #1432 > > 00:01:04 verbose #1433 > > run_all (reflection.nameof { rotate_strings_tests }) count solutions 00:01:04 verbose #1434 > > test_cases 00:01:04 verbose #1435 > > |> sort_result_list 00:01:04 verbose #1436 > > 00:01:04 verbose #1437 > > rotate_strings_tests () 00:01:37 verbose #1438 > > 00:01:37 verbose #1439 > > ╭─[ 33.01s - stdout ]──────────────────────────────────────────────────────────╮ 00:01:37 verbose #1440 > > │ │ 00:01:37 verbose #1441 > > │ ``` │ 00:01:37 verbose #1442 > > │ 00:00:00 verbose #1 benchmark.run_all / { test_name = │ 00:01:37 verbose #1443 > > │ rotate_strings_tests; count = 2000000 } │ 00:01:37 verbose #1444 > > │ │ 00:01:37 verbose #1445 > > │ 00:00:00 verbose #2 benchmark.run / { input_str = "abc" } │ 00:01:37 verbose #1446 > > │ 00:00:01 verbose #3 benchmark.run / solutions.map / { i = 1; test_name │ 00:01:37 verbose #1447 > > │ = F; time = 1229 } │ 00:01:37 verbose #1448 > > │ 00:00:03 verbose #4 benchmark.run / solutions.map / { i = 2; test_name │ 00:01:37 verbose #1449 > > │ = FA; time = 1533 } │ 00:01:37 verbose #1450 > > │ │ 00:01:37 verbose #1451 > > │ 00:00:03 verbose #5 benchmark.run / { input_str = "abcde" } │ 00:01:37 verbose #1452 > > │ 00:00:06 verbose #6 benchmark.run / solutions.map / { i = 1; test_name │ 00:01:37 verbose #1453 > > │ = F; time = 1926 } │ 00:01:37 verbose #1454 > > │ 00:00:09 verbose #7 benchmark.run / solutions.map / { i = 2; test_name │ 00:01:37 verbose #1455 > > │ = FA; time = 2786 } │ 00:01:37 verbose #1456 > > │ │ 00:01:37 verbose #1457 > > │ 00:00:09 verbose #8 benchmark.run / { input_str = "abcdefghi" } │ 00:01:37 verbose #1458 > > │ 00:00:13 verbose #9 benchmark.run / solutions.map / { i = 1; test_name │ 00:01:37 verbose #1459 > > │ = F; time = 3658 } │ 00:01:37 verbose #1460 > > │ 00:00:19 verbose #10 benchmark.run / solutions.map / { i = 2; test_name │ 00:01:37 verbose #1461 > > │ = FA; time = 5200 } │ 00:01:37 verbose #1462 > > │ │ 00:01:37 verbose #1463 > > │ 00:00:19 verbose #11 benchmark.run / { input_str = "abab" } │ 00:01:37 verbose #1464 > > │ 00:00:22 verbose #12 benchmark.run / solutions.map / { i = 1; test_name │ 00:01:37 verbose #1465 > > │ = F; time = 2089 } │ 00:01:37 verbose #1466 > > │ 00:00:25 verbose #13 benchmark.run / solutions.map / { i = 2; test_name │ 00:01:37 verbose #1467 > > │ = FA; time = 2619 } │ 00:01:37 verbose #1468 > > │ │ 00:01:37 verbose #1469 > > │ 00:00:25 verbose #14 benchmark.run / { input_str = "aa" } │ 00:01:37 verbose #1470 > > │ 00:00:27 verbose #15 benchmark.run / solutions.map / { i = 1; test_name │ 00:01:37 verbose #1471 > > │ = F; time = 1303 } │ 00:01:37 verbose #1472 > > │ 00:00:29 verbose #16 benchmark.run / solutions.map / { i = 2; test_name │ 00:01:37 verbose #1473 > > │ = FA; time = 1610 } │ 00:01:37 verbose #1474 > > │ │ 00:01:37 verbose #1475 > > │ 00:00:29 verbose #17 benchmark.run / { input_str = "z" } │ 00:01:37 verbose #1476 > > │ 00:00:30 verbose #18 benchmark.run / solutions.map / { i = 1; test_name │ 00:01:37 verbose #1477 > > │ = F; time = 471 } │ 00:01:37 verbose #1478 > > │ 00:00:31 verbose #19 benchmark.run / solutions.map / { i = 2; test_name │ 00:01:37 verbose #1479 > > │ = FA; time = 503 } │ 00:01:37 verbose #1480 > > │ ``` │ 00:01:37 verbose #1481 > > │ input | expected │ 00:01:37 verbose #1482 > > │ │ 00:01:37 verbose #1483 > > │ | result │ 00:01:37 verbose #1484 > > │ │ 00:01:37 verbose #1485 > > │ | best │ 00:01:37 verbose #1486 > > │ --- | --- │ 00:01:37 verbose #1487 > > │ │ 00:01:37 verbose #1488 > > │ | --- │ 00:01:37 verbose #1489 > > │ │ 00:01:37 verbose #1490 > > │ | --- │ 00:01:37 verbose #1491 > > │ "abc" | "bca cab abc" │ 00:01:37 verbose #1492 > > │ │ 00:01:37 verbose #1493 > > │ | "bca cab abc" │ 00:01:37 verbose #1494 > > │ │ 00:01:37 verbose #1495 > > │ | 1, 1229 │ 00:01:37 verbose #1496 > > │ "abcde" | "bcdea cdeab deabc eabcd abcde" │ 00:01:37 verbose #1497 > > │ | "bcdea cdeab deabc eabcd abcde" │ 00:01:37 verbose #1498 > > │ | 1, 1926 │ 00:01:37 verbose #1499 > > │ "abcdefghi" | "bcdefghia cdefghiab defghiabc efghiabcd fghiabcde ghiabcdef │ 00:01:37 verbose #1500 > > │ hiabcdefg iabcdefgh abcdefghi" | "bcdefghia cdefghiab defghiabc efghiabcd │ 00:01:37 verbose #1501 > > │ fghiabcde ghiabcdef hiabcdefg iabcdefgh abcdefghi" | 1, 3658 │ 00:01:37 verbose #1502 > > │ "abab" | "baba abab baba abab" │ 00:01:37 verbose #1503 > > │ | "baba abab baba abab" │ 00:01:37 verbose #1504 > > │ | 1, 2089 │ 00:01:37 verbose #1505 > > │ "aa" | "aa aa" │ 00:01:37 verbose #1506 > > │ │ 00:01:37 verbose #1507 > > │ | "aa aa" │ 00:01:37 verbose #1508 > > │ │ 00:01:37 verbose #1509 > > │ | 1, 1303 │ 00:01:37 verbose #1510 > > │ "z" | "z" │ 00:01:37 verbose #1511 > > │ │ 00:01:37 verbose #1512 > > │ | "z" │ 00:01:37 verbose #1513 > > │ │ 00:01:37 verbose #1514 > > │ | 1, 471 │ 00:01:37 verbose #1515 > > │ ``` │ 00:01:37 verbose #1516 > > │ 00:00:31 verbose #20 benchmark.sort_result_list / averages.iter / { i = │ 00:01:37 verbose #1517 > > │ 1; avg = 1779 } │ 00:01:37 verbose #1518 > > │ 00:00:31 verbose #21 benchmark.sort_result_list / averages.iter / { i = │ 00:01:37 verbose #1519 > > │ 2; avg = 2375 } │ 00:01:37 verbose #1520 > > │ ``` │ 00:01:37 verbose #1521 > > │ │ 00:01:37 verbose #1522 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:37 verbose #1523 > > 00:01:37 verbose #1524 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:37 verbose #1525 > > //// test 00:01:37 verbose #1526 > > 00:01:37 verbose #1527 > > // rotate_strings_tests () 00:01:37 verbose #1528 > > () 00:01:38 verbose #1529 > > 00:01:38 verbose #1530 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:38 verbose #1531 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:38 verbose #1532 > > │ ## binary_search_tests │ 00:01:38 verbose #1533 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:38 verbose #1534 > > 00:01:38 verbose #1535 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:38 verbose #1536 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:38 verbose #1537 > > │ ``` │ 00:01:38 verbose #1538 > > │ 02:19:29 verbose #1 benchmark.run_all / {count = 10000000; test_name = │ 00:01:38 verbose #1539 > > │ binary_search_tests} │ 00:01:38 verbose #1540 > > │ │ 00:01:38 verbose #1541 > > │ 02:19:29 verbose #2 benchmark.run / {input_str = struct ([|1; 3; 4; 6; │ 00:01:38 verbose #1542 > > │ 8; 9; 11|], 6, 7)} │ 00:01:38 verbose #1543 > > │ 02:19:30 verbose #3 benchmark.run / solutions.map / {i = 1; test_name = │ 00:01:38 verbose #1544 > > │ semi_open_1; time = 662} │ 00:01:38 verbose #1545 > > │ 02:19:30 verbose #4 benchmark.run / solutions.map / {i = 2; test_name = │ 00:01:38 verbose #1546 > > │ closed_1; time = 619} │ 00:01:38 verbose #1547 > > │ 02:19:31 verbose #5 benchmark.run / solutions.map / {i = 3; test_name = │ 00:01:38 verbose #1548 > > │ semi_open_2; time = 644} │ 00:01:38 verbose #1549 > > │ 02:19:32 verbose #6 benchmark.run / solutions.map / {i = 4; test_name = │ 00:01:38 verbose #1550 > > │ closed_2; time = 610} │ 00:01:38 verbose #1551 > > │ │ 00:01:38 verbose #1552 > > │ 02:19:32 verbose #7 benchmark.run / {input_str = struct ([|1; 3; 4; 6; │ 00:01:38 verbose #1553 > > │ 8; 9; 11|], 1, 7)} │ 00:01:38 verbose #1554 > > │ 02:19:33 verbose #8 benchmark.run / solutions.map / {i = 1; test_name = │ 00:01:38 verbose #1555 > > │ semi_open_1; time = 607} │ 00:01:38 verbose #1556 > > │ 02:19:33 verbose #9 benchmark.run / solutions.map / {i = 2; test_name = │ 00:01:38 verbose #1557 > > │ closed_1; time = 559} │ 00:01:38 verbose #1558 > > │ 02:19:34 verbose #10 benchmark.run / solutions.map / {i = 3; test_name │ 00:01:38 verbose #1559 > > │ = semi_open_2; time = 612} │ 00:01:38 verbose #1560 > > │ 02:19:35 verbose #11 benchmark.run / solutions.map / {i = 4; test_name │ 00:01:38 verbose #1561 > > │ = closed_2; time = 577} │ 00:01:38 verbose #1562 > > │ │ 00:01:38 verbose #1563 > > │ 02:19:35 verbose #12 benchmark.run / {input_str = struct ([|1; 3; 4; 6; │ 00:01:38 verbose #1564 > > │ 8; 9; 11|], 11, 7)} │ 00:01:38 verbose #1565 > > │ 02:19:35 verbose #13 benchmark.run / solutions.map / {i = 1; test_name │ 00:01:38 verbose #1566 > > │ = semi_open_1; time = 550} │ 00:01:38 verbose #1567 > > │ 02:19:36 verbose #14 benchmark.run / solutions.map / {i = 2; test_name │ 00:01:38 verbose #1568 > > │ = closed_1; time = 580} │ 00:01:38 verbose #1569 > > │ 02:19:37 verbose #15 benchmark.run / solutions.map / {i = 3; test_name │ 00:01:38 verbose #1570 > > │ = semi_open_2; time = 624} │ 00:01:38 verbose #1571 > > │ 02:19:37 verbose #16 benchmark.run / solutions.map / {i = 4; test_name │ 00:01:38 verbose #1572 > > │ = closed_2; time = 590} │ 00:01:38 verbose #1573 > > │ │ 00:01:38 verbose #1574 > > │ 02:19:37 verbose #17 benchmark.run / {input_str = struct ([|1; 3; 4; 6; │ 00:01:38 verbose #1575 > > │ 8; 9; 11|], 12, 7)} │ 00:01:38 verbose #1576 > > │ 02:19:38 verbose #18 benchmark.run / solutions.map / {i = 1; test_name │ 00:01:38 verbose #1577 > > │ = semi_open_1; time = 574} │ 00:01:38 verbose #1578 > > │ 02:19:39 verbose #19 benchmark.run / solutions.map / {i = 2; test_name │ 00:01:38 verbose #1579 > > │ = closed_1; time = 577} │ 00:01:38 verbose #1580 > > │ 02:19:39 verbose #20 benchmark.run / solutions.map / {i = 3; test_name │ 00:01:38 verbose #1581 > > │ = semi_open_2; time = 582} │ 00:01:38 verbose #1582 > > │ 02:19:40 verbose #21 benchmark.run / solutions.map / {i = 4; test_name │ 00:01:38 verbose #1583 > > │ = closed_2; time = 585} │ 00:01:38 verbose #1584 > > │ │ 00:01:38 verbose #1585 > > │ 02:19:40 verbose #22 benchmark.run / {input_str = struct ([|1; 2; 3; │ 00:01:38 verbose #1586 > > │ 4...00; ...|], 60, 1000)} │ 00:01:38 verbose #1587 > > │ 02:19:41 verbose #23 benchmark.run / solutions.map / {i = 1; test_name │ 00:01:38 verbose #1588 > > │ = semi_open_1; time = 610} │ 00:01:38 verbose #1589 > > │ 02:19:42 verbose #24 benchmark.run / solutions.map / {i = 2; test_name │ 00:01:38 verbose #1590 > > │ = closed_1; time = 672} │ 00:01:38 verbose #1591 > > │ 02:19:42 verbose #25 benchmark.run / solutions.map / {i = 3; test_name │ 00:01:38 verbose #1592 > > │ = semi_open_2; time = 636} │ 00:01:38 verbose #1593 > > │ 02:19:43 verbose #26 benchmark.run / solutions.map / {i = 4; test_name │ 00:01:38 verbose #1594 > > │ = closed_2; time = 629} │ 00:01:38 verbose #1595 > > │ │ 00:01:38 verbose #1596 > > │ 02:19:43 verbose #27 benchmark.run / {input_str = struct ([|1; 3; 4; 6; │ 00:01:38 verbose #1597 > > │ 8; 9; 11|], 6, 7)} │ 00:01:38 verbose #1598 > > │ 02:19:44 verbose #28 benchmark.run / solutions.map / {i = 1; test_name │ 00:01:38 verbose #1599 > > │ = semi_open_1; time = 599} │ 00:01:38 verbose #1600 > > │ 02:19:44 verbose #29 benchmark.run / solutions.map / {i = 2; test_name │ 00:01:38 verbose #1601 > > │ = closed_1; time = 561} │ 00:01:38 verbose #1602 > > │ 02:19:45 verbose #30 benchmark.run / solutions.map / {i = 3; test_name │ 00:01:38 verbose #1603 > > │ = semi_open_2; time = 604} │ 00:01:38 verbose #1604 > > │ 02:19:46 verbose #31 benchmark.run / solutions.map / {i = 4; test_name │ 00:01:38 verbose #1605 > > │ = closed_2; time = 573} │ 00:01:38 verbose #1606 > > │ │ 00:01:38 verbose #1607 > > │ 02:19:46 verbose #32 benchmark.run / {input_str = struct ([|1; 3; 4; 6; │ 00:01:38 verbose #1608 > > │ 8; 9; 11|], 1, 7)} │ 00:01:38 verbose #1609 > > │ 02:19:47 verbose #33 benchmark.run / solutions.map / {i = 1; test_name │ 00:01:38 verbose #1610 > > │ = semi_open_1; time = 635} │ 00:01:38 verbose #1611 > > │ 02:19:47 verbose #34 benchmark.run / solutions.map / {i = 2; test_name │ 00:01:38 verbose #1612 > > │ = closed_1; time = 603} │ 00:01:38 verbose #1613 > > │ 02:19:48 verbose #35 benchmark.run / solutions.map / {i = 3; test_name │ 00:01:38 verbose #1614 > > │ = semi_open_2; time = 644} │ 00:01:38 verbose #1615 > > │ 02:19:49 verbose #36 benchmark.run / solutions.map / {i = 4; test_name │ 00:01:38 verbose #1616 > > │ = closed_2; time = 628} │ 00:01:38 verbose #1617 > > │ │ 00:01:38 verbose #1618 > > │ 02:19:49 verbose #37 benchmark.run / {input_str = struct ([|1; 3; 4; 6; │ 00:01:38 verbose #1619 > > │ 8; 9; 11|], 11, 7)} │ 00:01:38 verbose #1620 > > │ 02:19:49 verbose #38 benchmark.run / solutions.map / {i = 1; test_name │ 00:01:38 verbose #1621 > > │ = semi_open_1; time = 643} │ 00:01:38 verbose #1622 > > │ 02:19:50 verbose #39 benchmark.run / solutions.map / {i = 2; test_name │ 00:01:38 verbose #1623 > > │ = closed_1; time = 606} │ 00:01:38 verbose #1624 > > │ 02:19:51 verbose #40 benchmark.run / solutions.map / {i = 3; test_name │ 00:01:38 verbose #1625 > > │ = semi_open_2; time = 636} │ 00:01:38 verbose #1626 > > │ 02:19:52 verbose #41 benchmark.run / solutions.map / {i = 4; test_name │ 00:01:38 verbose #1627 > > │ = closed_2; time = 624} │ 00:01:38 verbose #1628 > > │ │ 00:01:38 verbose #1629 > > │ 02:19:52 verbose #42 benchmark.run / {input_str = struct ([|1; 3; 4; 6; │ 00:01:38 verbose #1630 > > │ 8; 9; 11|], 12, 7)} │ 00:01:38 verbose #1631 > > │ 02:19:52 verbose #43 benchmark.run / solutions.map / {i = 1; test_name │ 00:01:38 verbose #1632 > > │ = semi_open_1; time = 689} │ 00:01:38 verbose #1633 > > │ 02:19:53 verbose #44 benchmark.run / solutions.map / {i = 2; test_name │ 00:01:38 verbose #1634 > > │ = closed_1; time = 613} │ 00:01:38 verbose #1635 > > │ 02:19:54 verbose #45 benchmark.run / solutions.map / {i = 3; test_name │ 00:01:38 verbose #1636 > > │ = semi_open_2; time = 623} │ 00:01:38 verbose #1637 > > │ 02:19:55 verbose #46 benchmark.run / solutions.map / {i = 4; test_name │ 00:01:38 verbose #1638 > > │ = closed_2; time = 613} │ 00:01:38 verbose #1639 > > │ │ 00:01:38 verbose #1640 > > │ 02:19:55 verbose #47 benchmark.run / {input_str = struct ([|1; 2; 3; │ 00:01:38 verbose #1641 > > │ 4...100; ...|], 60, 100)} │ 00:01:38 verbose #1642 > > │ 02:19:55 verbose #48 benchmark.run / solutions.map / {i = 1; test_name │ 00:01:38 verbose #1643 > > │ = semi_open_1; time = 630} │ 00:01:38 verbose #1644 > > │ 02:19:56 verbose #49 benchmark.run / solutions.map / {i = 2; test_name │ 00:01:38 verbose #1645 > > │ = closed_1; time = 633} │ 00:01:38 verbose #1646 > > │ 02:19:57 verbose #50 benchmark.run / solutions.map / {i = 3; test_name │ 00:01:38 verbose #1647 > > │ = semi_open_2; time = 653} │ 00:01:38 verbose #1648 > > │ 02:19:58 verbose #51 benchmark.run / solutions.map / {i = 4; test_name │ 00:01:38 verbose #1649 > > │ = closed_2; time = 646} │ 00:01:38 verbose #1650 > > │ ``` │ 00:01:38 verbose #1651 > > │ input | expected | result | best │ 00:01:38 verbose #1652 > > │ --- | --- | --- | --- │ 00:01:38 verbose #1653 > > │ struct ([1; 3; 4; 6; 8; 9; 11], 6, 7) | US4_0 3 | US4_0 3 | 4, 610 │ 00:01:38 verbose #1654 > > │ struct ([1; 3; 4; 6; 8; 9; 11], 1, 7) | US4_0 0 | US4_0 0 | 2, 559 │ 00:01:38 verbose #1655 > > │ struct ([1; 3; 4; 6; 8; 9; 11], 11, 7) | US4_0 6 | US4_0 6 | 1, 550 │ 00:01:38 verbose #1656 > > │ struct ([1; 3; 4; 6; 8; 9; 11], 12, 7) | US4_1 | US4_1 | 1, 574 │ 00:01:38 verbose #1657 > > │ struct ([1; 2; 3; 4...00; ...], 60, 1000) | US4_0 59 | US4_0 59 | 1, 610 │ 00:01:38 verbose #1658 > > │ struct ([1; 3; 4; 6; 8; 9; 11], 6, 7) | US4_0 3 | US4_0 3 | 2, 561 │ 00:01:38 verbose #1659 > > │ struct ([1; 3; 4; 6; 8; 9; 11], 1, 7) | US4_0 0 | US4_0 0 | 2, 603 │ 00:01:38 verbose #1660 > > │ struct ([1; 3; 4; 6; 8; 9; 11], 11, 7) | US4_0 6 | US4_0 6 | 2, 606 │ 00:01:38 verbose #1661 > > │ struct ([1; 3; 4; 6; 8; 9; 11], 12, 7) | US4_1 | US4_1 | 2, 613 │ 00:01:38 verbose #1662 > > │ struct ([1; 2; 3; 4...100; ...], 60, 100) | US4_0 59 | US4_0 59 | 1, 630 │ 00:01:38 verbose #1663 > > │ ``` │ 00:01:38 verbose #1664 > > │ 02:19:58 verbose #52 benchmark.sort_result_list / averages.iter / {avg │ 00:01:38 verbose #1665 > > │ = 602; i = 2} │ 00:01:38 verbose #1666 > > │ 02:19:58 verbose #53 benchmark.sort_result_list / averages.iter / {avg │ 00:01:38 verbose #1667 > > │ = 607; i = 4} │ 00:01:38 verbose #1668 > > │ 02:19:58 verbose #54 benchmark.sort_result_list / averages.iter / {avg │ 00:01:38 verbose #1669 > > │ = 619; i = 1} │ 00:01:38 verbose #1670 > > │ 02:19:58 verbose #55 benchmark.sort_result_list / averages.iter / {avg │ 00:01:38 verbose #1671 > > │ = 625; i = 3} │ 00:01:38 verbose #1672 > > │ ``` │ 00:01:38 verbose #1673 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:38 verbose #1674 > > 00:01:38 verbose #1675 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:38 verbose #1676 > > //// test 00:01:38 verbose #1677 > > //// timeout=90000 00:01:38 verbose #1678 > > 00:01:38 verbose #1679 > > inl binary_search_semi_open_1 arr target left right = 00:01:38 verbose #1680 > > inl rec body left right = 00:01:38 verbose #1681 > > if left >= right 00:01:38 verbose #1682 > > then None 00:01:38 verbose #1683 > > else 00:01:38 verbose #1684 > > inl mid = (left + right) / 2 00:01:38 verbose #1685 > > inl item = index arr mid 00:01:38 verbose #1686 > > if item = target 00:01:38 verbose #1687 > > then Some mid 00:01:38 verbose #1688 > > elif item < target 00:01:38 verbose #1689 > > then loop (mid + 1) right 00:01:38 verbose #1690 > > else loop left mid 00:01:38 verbose #1691 > > and inl loop left right = 00:01:38 verbose #1692 > > if var_is right |> not 00:01:38 verbose #1693 > > then body left right 00:01:38 verbose #1694 > > else 00:01:38 verbose #1695 > > inl left = dyn left 00:01:38 verbose #1696 > > join body left right 00:01:38 verbose #1697 > > loop left right 00:01:38 verbose #1698 > > 00:01:38 verbose #1699 > > inl binary_search_closed_1 arr target left right = 00:01:38 verbose #1700 > > inl rec body left right = 00:01:38 verbose #1701 > > if left > right 00:01:38 verbose #1702 > > then None 00:01:38 verbose #1703 > > else 00:01:38 verbose #1704 > > inl mid = (left + right) / 2 00:01:38 verbose #1705 > > inl item = index arr mid 00:01:38 verbose #1706 > > if item = target 00:01:38 verbose #1707 > > then Some mid 00:01:38 verbose #1708 > > elif item < target 00:01:38 verbose #1709 > > then loop (mid + 1) right 00:01:38 verbose #1710 > > else loop left (mid - 1) 00:01:38 verbose #1711 > > and inl loop left right = 00:01:38 verbose #1712 > > if var_is right |> not 00:01:38 verbose #1713 > > then body left right 00:01:38 verbose #1714 > > else 00:01:38 verbose #1715 > > inl left = dyn left 00:01:38 verbose #1716 > > join body left right 00:01:38 verbose #1717 > > loop left right 00:01:38 verbose #1718 > > 00:01:38 verbose #1719 > > inl binary_search_semi_open_2 arr target left right = 00:01:38 verbose #1720 > > let rec body left right = 00:01:38 verbose #1721 > > if left >= right 00:01:38 verbose #1722 > > then None 00:01:38 verbose #1723 > > else 00:01:38 verbose #1724 > > inl mid = (left + right) / 2 00:01:38 verbose #1725 > > inl item = index arr mid 00:01:38 verbose #1726 > > if item = target 00:01:38 verbose #1727 > > then Some mid 00:01:38 verbose #1728 > > elif item < target 00:01:38 verbose #1729 > > then loop (mid + 1) right 00:01:38 verbose #1730 > > else loop left mid 00:01:38 verbose #1731 > > and inl loop left right = body left right 00:01:38 verbose #1732 > > loop left right 00:01:38 verbose #1733 > > 00:01:38 verbose #1734 > > inl binary_search_closed_2 arr target left right = 00:01:38 verbose #1735 > > let rec body left right = 00:01:38 verbose #1736 > > if left > right 00:01:38 verbose #1737 > > then None 00:01:38 verbose #1738 > > else 00:01:38 verbose #1739 > > inl mid = (left + right) / 2 00:01:38 verbose #1740 > > inl item = index arr mid 00:01:38 verbose #1741 > > if item = target 00:01:38 verbose #1742 > > then Some mid 00:01:38 verbose #1743 > > elif item < target 00:01:38 verbose #1744 > > then loop (mid + 1) right 00:01:38 verbose #1745 > > else loop left (mid - 1) 00:01:38 verbose #1746 > > and inl loop left right = body left right 00:01:38 verbose #1747 > > loop left right 00:01:38 verbose #1748 > > 00:01:38 verbose #1749 > > inl get_solutions () = 00:01:38 verbose #1750 > > [[ 00:01:38 verbose #1751 > > "semi_open_1", 00:01:38 verbose #1752 > > fun (arr, (target, len)) => 00:01:38 verbose #1753 > > binary_search_semi_open_1 arr target 0 len 00:01:38 verbose #1754 > > 00:01:38 verbose #1755 > > "closed_1", 00:01:38 verbose #1756 > > fun (arr, (target, len)) => 00:01:38 verbose #1757 > > binary_search_closed_1 arr target 0 (len - 1) 00:01:38 verbose #1758 > > 00:01:38 verbose #1759 > > "semi_open_2", 00:01:38 verbose #1760 > > fun (arr, (target, len)) => 00:01:38 verbose #1761 > > binary_search_semi_open_2 arr target 0 len 00:01:38 verbose #1762 > > 00:01:38 verbose #1763 > > "closed_2", 00:01:38 verbose #1764 > > fun (arr, (target, len)) => 00:01:38 verbose #1765 > > binary_search_closed_2 arr target 0 (len - 1) 00:01:38 verbose #1766 > > ]] 00:01:38 verbose #1767 > > 00:01:38 verbose #1768 > > inl rec binary_search_tests () = 00:01:38 verbose #1769 > > inl arr_with_len target len arr = 00:01:38 verbose #1770 > > arr, (target, (len |> optionm'.default_with fun () => length arr)) 00:01:38 verbose #1771 > > 00:01:38 verbose #1772 > > inl test_cases = [[ 00:01:38 verbose #1773 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 6 None), (Some 3i32) 00:01:38 verbose #1774 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 1 None), (Some 0i32) 00:01:38 verbose #1775 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 11 None), (Some 6i32) 00:01:38 verbose #1776 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 12 None), None 00:01:38 verbose #1777 > > ((am'.init_series 1i32 1000 1 |> fun x => a x : _ int _) |> arr_with_len 00:01:38 verbose #1778 > > 60 None), (Some 59) 00:01:38 verbose #1779 > > 00:01:38 verbose #1780 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 6 (Some 7)), (Some 00:01:38 verbose #1781 > > 3i32) 00:01:38 verbose #1782 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 1 (Some 7)), (Some 00:01:38 verbose #1783 > > 0i32) 00:01:38 verbose #1784 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 11 (Some 7)), (Some 00:01:38 verbose #1785 > > 6i32) 00:01:38 verbose #1786 > > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 12 (Some 7)), None 00:01:38 verbose #1787 > > ((am'.init_series 1i32 1000 1 |> fun x => a x : _ int _) |> arr_with_len 00:01:38 verbose #1788 > > 60 (Some 100)), (Some 59) 00:01:38 verbose #1789 > > ]] 00:01:38 verbose #1790 > > 00:01:38 verbose #1791 > > inl solutions = get_solutions () 00:01:38 verbose #1792 > > 00:01:38 verbose #1793 > > // inl is_fast () = true 00:01:38 verbose #1794 > > 00:01:38 verbose #1795 > > inl count = 00:01:38 verbose #1796 > > if is_fast () 00:01:38 verbose #1797 > > then 1000i32 00:01:38 verbose #1798 > > else 10000000i32 00:01:38 verbose #1799 > > 00:01:38 verbose #1800 > > run_all (reflection.nameof { binary_search_tests }) count solutions 00:01:38 verbose #1801 > > test_cases 00:01:38 verbose #1802 > > |> sort_result_list 00:01:38 verbose #1803 > > 00:01:38 verbose #1804 > > 00:01:38 verbose #1805 > > let main () = 00:01:38 verbose #1806 > > binary_search_tests () 00:02:26 verbose #1807 > > 00:02:26 verbose #1808 > > ╭─[ 48.14s - stdout ]──────────────────────────────────────────────────────────╮ 00:02:26 verbose #1809 > > │ │ 00:02:26 verbose #1810 > > │ ``` │ 00:02:26 verbose #1811 > > │ 00:00:00 verbose #1 benchmark.run_all / { test_name = │ 00:02:26 verbose #1812 > > │ binary_search_tests; count = 10000000 } │ 00:02:26 verbose #1813 > > │ │ 00:02:26 verbose #1814 > > │ 00:00:00 verbose #2 benchmark.run / { input_str = struct ([|1; 3; 4; 6; │ 00:02:26 verbose #1815 > > │ 8; 9; 11|], 6, 7) } │ 00:02:26 verbose #1816 > > │ 00:00:01 verbose #3 benchmark.run / solutions.map / { i = 1; test_name │ 00:02:26 verbose #1817 > > │ = semi_open_1; time = 973 } │ 00:02:26 verbose #1818 > > │ 00:00:02 verbose #4 benchmark.run / solutions.map / { i = 2; test_name │ 00:02:26 verbose #1819 > > │ = closed_1; time = 857 } │ 00:02:26 verbose #1820 > > │ 00:00:03 verbose #5 benchmark.run / solutions.map / { i = 3; test_name │ 00:02:26 verbose #1821 > > │ = semi_open_2; time = 851 } │ 00:02:26 verbose #1822 > > │ 00:00:05 verbose #6 benchmark.run / solutions.map / { i = 4; test_name │ 00:02:26 verbose #1823 > > │ = closed_2; time = 967 } │ 00:02:26 verbose #1824 > > │ │ 00:02:26 verbose #1825 > > │ 00:00:05 verbose #7 benchmark.run / { input_str = struct ([|1; 3; 4; 6; │ 00:02:26 verbose #1826 > > │ 8; 9; 11|], 1, 7) } │ 00:02:26 verbose #1827 > > │ 00:00:06 verbose #8 benchmark.run / solutions.map / { i = 1; test_name │ 00:02:26 verbose #1828 > > │ = semi_open_1; time = 1005 } │ 00:02:26 verbose #1829 > > │ 00:00:07 verbose #9 benchmark.run / solutions.map / { i = 2; test_name │ 00:02:26 verbose #1830 > > │ = closed_1; time = 1167 } │ 00:02:26 verbose #1831 > > │ 00:00:09 verbose #10 benchmark.run / solutions.map / { i = 3; test_name │ 00:02:26 verbose #1832 > > │ = semi_open_2; time = 1099 } │ 00:02:26 verbose #1833 > > │ 00:00:10 verbose #11 benchmark.run / solutions.map / { i = 4; test_name │ 00:02:26 verbose #1834 > > │ = closed_2; time = 823 } │ 00:02:26 verbose #1835 > > │ │ 00:02:26 verbose #1836 > > │ 00:00:10 verbose #12 benchmark.run / { input_str = struct ([|1; 3; 4; │ 00:02:26 verbose #1837 > > │ 6; 8; 9; 11|], 11, 7) } │ 00:02:26 verbose #1838 > > │ 00:00:11 verbose #13 benchmark.run / solutions.map / { i = 1; test_name │ 00:02:26 verbose #1839 > > │ = semi_open_1; time = 789 } │ 00:02:26 verbose #1840 > > │ 00:00:13 verbose #14 benchmark.run / solutions.map / { i = 2; test_name │ 00:02:26 verbose #1841 > > │ = closed_1; time = 741 } │ 00:02:26 verbose #1842 > > │ 00:00:14 verbose #15 benchmark.run / solutions.map / { i = 3; test_name │ 00:02:26 verbose #1843 > > │ = semi_open_2; time = 746 } │ 00:02:26 verbose #1844 > > │ 00:00:15 verbose #16 benchmark.run / solutions.map / { i = 4; test_name │ 00:02:26 verbose #1845 > > │ = closed_2; time = 760 } │ 00:02:26 verbose #1846 > > │ │ 00:02:26 verbose #1847 > > │ 00:00:15 verbose #17 benchmark.run / { input_str = struct ([|1; 3; 4; │ 00:02:26 verbose #1848 > > │ 6; 8; 9; 11|], 12, 7) } │ 00:02:26 verbose #1849 > > │ 00:00:16 verbose #18 benchmark.run / solutions.map / { i = 1; test_name │ 00:02:26 verbose #1850 > > │ = semi_open_1; time = 760 } │ 00:02:26 verbose #1851 > > │ 00:00:17 verbose #19 benchmark.run / solutions.map / { i = 2; test_name │ 00:02:26 verbose #1852 > > │ = closed_1; time = 737 } │ 00:02:26 verbose #1853 > > │ 00:00:18 verbose #20 benchmark.run / solutions.map / { i = 3; test_name │ 00:02:26 verbose #1854 > > │ = semi_open_2; time = 787 } │ 00:02:26 verbose #1855 > > │ 00:00:19 verbose #21 benchmark.run / solutions.map / { i = 4; test_name │ 00:02:26 verbose #1856 > > │ = closed_2; time = 858 } │ 00:02:26 verbose #1857 > > │ │ 00:02:26 verbose #1858 > > │ 00:00:19 verbose #22 benchmark.run / { input_str = struct ([|1; 2; 3; │ 00:02:26 verbose #1859 > > │ 4...00; ...|], 60, 1000) } │ 00:02:26 verbose #1860 > > │ 00:00:21 verbose #23 benchmark.run / solutions.map / { i = 1; test_name │ 00:02:26 verbose #1861 > > │ = semi_open_1; time = 910 } │ 00:02:26 verbose #1862 > > │ 00:00:22 verbose #24 benchmark.run / solutions.map / { i = 2; test_name │ 00:02:26 verbose #1863 > > │ = closed_1; time = 842 } │ 00:02:26 verbose #1864 > > │ 00:00:23 verbose #25 benchmark.run / solutions.map / { i = 3; test_name │ 00:02:26 verbose #1865 > > │ = semi_open_2; time = 796 } │ 00:02:26 verbose #1866 > > │ 00:00:24 verbose #26 benchmark.run / solutions.map / { i = 4; test_name │ 00:02:26 verbose #1867 > > │ = closed_2; time = 786 } │ 00:02:26 verbose #1868 > > │ │ 00:02:26 verbose #1869 > > │ 00:00:24 verbose #27 benchmark.run / { input_str = struct ([|1; 3; 4; │ 00:02:26 verbose #1870 > > │ 6; 8; 9; 11|], 6, 7) } │ 00:02:26 verbose #1871 > > │ 00:00:25 verbose #28 benchmark.run / solutions.map / { i = 1; test_name │ 00:02:26 verbose #1872 > > │ = semi_open_1; time = 682 } │ 00:02:26 verbose #1873 > > │ 00:00:26 verbose #29 benchmark.run / solutions.map / { i = 2; test_name │ 00:02:26 verbose #1874 > > │ = closed_1; time = 674 } │ 00:02:26 verbose #1875 > > │ 00:00:27 verbose #30 benchmark.run / solutions.map / { i = 3; test_name │ 00:02:26 verbose #1876 > > │ = semi_open_2; time = 698 } │ 00:02:26 verbose #1877 > > │ 00:00:28 verbose #31 benchmark.run / solutions.map / { i = 4; test_name │ 00:02:26 verbose #1878 > > │ = closed_2; time = 686 } │ 00:02:26 verbose #1879 > > │ │ 00:02:26 verbose #1880 > > │ 00:00:28 verbose #32 benchmark.run / { input_str = struct ([|1; 3; 4; │ 00:02:26 verbose #1881 > > │ 6; 8; 9; 11|], 1, 7) } │ 00:02:26 verbose #1882 > > │ 00:00:29 verbose #33 benchmark.run / solutions.map / { i = 1; test_name │ 00:02:26 verbose #1883 > > │ = semi_open_1; time = 741 } │ 00:02:26 verbose #1884 > > │ 00:00:30 verbose #34 benchmark.run / solutions.map / { i = 2; test_name │ 00:02:26 verbose #1885 > > │ = closed_1; time = 721 } │ 00:02:26 verbose #1886 > > │ 00:00:31 verbose #35 benchmark.run / solutions.map / { i = 3; test_name │ 00:02:26 verbose #1887 > > │ = semi_open_2; time = 716 } │ 00:02:26 verbose #1888 > > │ 00:00:32 verbose #36 benchmark.run / solutions.map / { i = 4; test_name │ 00:02:26 verbose #1889 > > │ = closed_2; time = 743 } │ 00:02:26 verbose #1890 > > │ │ 00:02:26 verbose #1891 > > │ 00:00:32 verbose #37 benchmark.run / { input_str = struct ([|1; 3; 4; │ 00:02:26 verbose #1892 > > │ 6; 8; 9; 11|], 11, 7) } │ 00:02:26 verbose #1893 > > │ 00:00:33 verbose #38 benchmark.run / solutions.map / { i = 1; test_name │ 00:02:26 verbose #1894 > > │ = semi_open_1; time = 743 } │ 00:02:26 verbose #1895 > > │ 00:00:35 verbose #39 benchmark.run / solutions.map / { i = 2; test_name │ 00:02:26 verbose #1896 > > │ = closed_1; time = 728 } │ 00:02:26 verbose #1897 > > │ 00:00:36 verbose #40 benchmark.run / solutions.map / { i = 3; test_name │ 00:02:26 verbose #1898 > > │ = semi_open_2; time = 755 } │ 00:02:26 verbose #1899 > > │ 00:00:37 verbose #41 benchmark.run / solutions.map / { i = 4; test_name │ 00:02:26 verbose #1900 > > │ = closed_2; time = 738 } │ 00:02:26 verbose #1901 > > │ │ 00:02:26 verbose #1902 > > │ 00:00:37 verbose #42 benchmark.run / { input_str = struct ([|1; 3; 4; │ 00:02:26 verbose #1903 > > │ 6; 8; 9; 11|], 12, 7) } │ 00:02:26 verbose #1904 > > │ 00:00:38 verbose #43 benchmark.run / solutions.map / { i = 1; test_name │ 00:02:26 verbose #1905 > > │ = semi_open_1; time = 729 } │ 00:02:26 verbose #1906 > > │ 00:00:39 verbose #44 benchmark.run / solutions.map / { i = 2; test_name │ 00:02:26 verbose #1907 > > │ = closed_1; time = 769 } │ 00:02:26 verbose #1908 > > │ 00:00:40 verbose #45 benchmark.run / solutions.map / { i = 3; test_name │ 00:02:26 verbose #1909 > > │ = semi_open_2; time = 764 } │ 00:02:26 verbose #1910 > > │ 00:00:41 verbose #46 benchmark.run / solutions.map / { i = 4; test_name │ 00:02:26 verbose #1911 > > │ = closed_2; time = 746 } │ 00:02:26 verbose #1912 > > │ │ 00:02:26 verbose #1913 > > │ 00:00:41 verbose #47 benchmark.run / { input_str = struct ([|1; 2; 3; │ 00:02:26 verbose #1914 > > │ 4...100; ...|], 60, 100) } │ 00:02:26 verbose #1915 > > │ 00:00:42 verbose #48 benchmark.run / solutions.map / { i = 1; test_name │ 00:02:26 verbose #1916 > > │ = semi_open_1; time = 770 } │ 00:02:26 verbose #1917 > > │ 00:00:43 verbose #49 benchmark.run / solutions.map / { i = 2; test_name │ 00:02:26 verbose #1918 > > │ = closed_1; time = 727 } │ 00:02:26 verbose #1919 > > │ 00:00:44 verbose #50 benchmark.run / solutions.map / { i = 3; test_name │ 00:02:26 verbose #1920 > > │ = semi_open_2; time = 738 } │ 00:02:26 verbose #1921 > > │ 00:00:45 verbose #51 benchmark.run / solutions.map / { i = 4; test_name │ 00:02:26 verbose #1922 > > │ = closed_2; time = 759 } │ 00:02:26 verbose #1923 > > │ ``` │ 00:02:26 verbose #1924 > > │ input | expected | result | best │ 00:02:26 verbose #1925 > > │ --- | --- | --- | --- │ 00:02:26 verbose #1926 > > │ struct ([1; 3; 4; 6; 8; 9; 11], 6, 7) | US4_0 3 | US4_0 3 | 3, 851 │ 00:02:26 verbose #1927 > > │ struct ([1; 3; 4; 6; 8; 9; 11], 1, 7) | US4_0 0 | US4_0 0 | 4, 823 │ 00:02:26 verbose #1928 > > │ struct ([1; 3; 4; 6; 8; 9; 11], 11, 7) | US4_0 6 | US4_0 6 | 2, 741 │ 00:02:26 verbose #1929 > > │ struct ([1; 3; 4; 6; 8; 9; 11], 12, 7) | US4_1 | US4_1 | 2, 737 │ 00:02:26 verbose #1930 > > │ struct ([1; 2; 3; 4...00; ...], 60, 1000) | US4_0 59 | US4_0 59 | 4, 786 │ 00:02:26 verbose #1931 > > │ struct ([1; 3; 4; 6; 8; 9; 11], 6, 7) | US4_0 3 | US4_0 3 | 2, 674 │ 00:02:26 verbose #1932 > > │ struct ([1; 3; 4; 6; 8; 9; 11], 1, 7) | US4_0 0 | US4_0 0 | 3, 716 │ 00:02:26 verbose #1933 > > │ struct ([1; 3; 4; 6; 8; 9; 11], 11, 7) | US4_0 6 | US4_0 6 | 2, 728 │ 00:02:26 verbose #1934 > > │ struct ([1; 3; 4; 6; 8; 9; 11], 12, 7) | US4_1 | US4_1 | 1, 729 │ 00:02:26 verbose #1935 > > │ struct ([1; 2; 3; 4...100; ...], 60, 100) | US4_0 59 | US4_0 59 | 2, 727 │ 00:02:26 verbose #1936 > > │ ``` │ 00:02:26 verbose #1937 > > │ 00:00:45 verbose #52 benchmark.sort_result_list / averages.iter / { i = │ 00:02:26 verbose #1938 > > │ 4; avg = 786 } │ 00:02:26 verbose #1939 > > │ 00:00:45 verbose #53 benchmark.sort_result_list / averages.iter / { i = │ 00:02:26 verbose #1940 > > │ 3; avg = 795 } │ 00:02:26 verbose #1941 > > │ 00:00:45 verbose #54 benchmark.sort_result_list / averages.iter / { i = │ 00:02:26 verbose #1942 > > │ 2; avg = 796 } │ 00:02:26 verbose #1943 > > │ 00:00:45 verbose #55 benchmark.sort_result_list / averages.iter / { i = │ 00:02:26 verbose #1944 > > │ 1; avg = 810 } │ 00:02:26 verbose #1945 > > │ ``` │ 00:02:26 verbose #1946 > > │ │ 00:02:26 verbose #1947 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:26 verbose #1948 > > 00:02:26 verbose #1949 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:26 verbose #1950 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:26 verbose #1951 > > │ ## returnLettersWithOddCountTests │ 00:02:26 verbose #1952 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:26 verbose #1953 > > 00:02:26 verbose #1954 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:26 verbose #1955 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:26 verbose #1956 > > │ Test: ReturnLettersWithOddCount │ 00:02:26 verbose #1957 > > │ │ 00:02:26 verbose #1958 > > │ Solution: 1 │ 00:02:26 verbose #1959 > > │ Test case 1. A. Time: 645L │ 00:02:26 verbose #1960 > > │ │ 00:02:26 verbose #1961 > > │ Solution: 2 │ 00:02:26 verbose #1962 > > │ Test case 1. A. Time: 663L │ 00:02:26 verbose #1963 > > │ │ 00:02:26 verbose #1964 > > │ Solution: 3 │ 00:02:26 verbose #1965 > > │ Test case 1. A. Time: 680L │ 00:02:26 verbose #1966 > > │ │ 00:02:26 verbose #1967 > > │ Solution: 9 │ 00:02:26 verbose #1968 > > │ Test case 1. A. Time: 730L │ 00:02:26 verbose #1969 > > │ │ 00:02:26 verbose #1970 > > │ Solution: 10 │ 00:02:26 verbose #1971 > > │ Test case 1. A. Time: 815L │ 00:02:26 verbose #1972 > > │ │ 00:02:26 verbose #1973 > > │ Input | Expected | Result | Best │ 00:02:26 verbose #1974 > > │ --- | --- | --- | --- │ 00:02:26 verbose #1975 > > │ 1 | a | a | (1, 645) │ 00:02:26 verbose #1976 > > │ 2 | ba | ba | (1, 663) │ 00:02:26 verbose #1977 > > │ 3 | aaa | aaa | (1, 680) │ 00:02:26 verbose #1978 > > │ 9 | aaaaaaaaa | aaaaaaaaa | (1, 730) │ 00:02:26 verbose #1979 > > │ 10 | baaaaaaaaa | baaaaaaaaa | (1, 815) │ 00:02:26 verbose #1980 > > │ │ 00:02:26 verbose #1981 > > │ Averages │ 00:02:26 verbose #1982 > > │ Test case 1. Average Time: 706L │ 00:02:26 verbose #1983 > > │ │ 00:02:26 verbose #1984 > > │ Ranking │ 00:02:26 verbose #1985 > > │ Test case 1. Average Time: 706L │ 00:02:26 verbose #1986 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:26 verbose #1987 > > 00:02:26 verbose #1988 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:02:26 verbose #1989 > > //// test 00:02:26 verbose #1990 > > 00:02:26 verbose #1991 > > let solutions = [[ 00:02:26 verbose #1992 > > "A", 00:02:26 verbose #1993 > > fun n -> 00:02:26 verbose #1994 > > let mutable _builder = StringBuilder (new string('a', n)) 00:02:26 verbose #1995 > > if n % 2 = 0 then 00:02:26 verbose #1996 > > _builder.[[0]] <- 'b' 00:02:26 verbose #1997 > > 00:02:26 verbose #1998 > > _builder.ToString () 00:02:26 verbose #1999 > > ]] 00:02:26 verbose #2000 > > let testCases = seq { 00:02:26 verbose #2001 > > 1, "a" 00:02:26 verbose #2002 > > 2, "ba" 00:02:26 verbose #2003 > > 3, "aaa" 00:02:26 verbose #2004 > > 9, "aaaaaaaaa" 00:02:26 verbose #2005 > > 10, "baaaaaaaaa" 00:02:26 verbose #2006 > > } 00:02:26 verbose #2007 > > let rec returnLettersWithOddCountTests = 00:02:26 verbose #2008 > > runAll (nameof returnLettersWithOddCountTests) _count solutions testCases 00:02:26 verbose #2009 > > returnLettersWithOddCountTests 00:02:26 verbose #2010 > > |> sortResultList 00:02:27 verbose #2011 > > 00:02:27 verbose #2012 > > ╭─[ 1.45s - stdout ]───────────────────────────────────────────────────────────╮ 00:02:27 verbose #2013 > > │ │ 00:02:27 verbose #2014 > > │ │ 00:02:27 verbose #2015 > > │ Test: returnLettersWithOddCountTests │ 00:02:27 verbose #2016 > > │ │ 00:02:27 verbose #2017 > > │ Solution: 1 │ 00:02:27 verbose #2018 > > │ Test case 1. A. Time: 1L │ 00:02:27 verbose #2019 > > │ │ 00:02:27 verbose #2020 > > │ Solution: 2 │ 00:02:27 verbose #2021 > > │ Test case 1. A. Time: 0L │ 00:02:27 verbose #2022 > > │ │ 00:02:27 verbose #2023 > > │ Solution: 3 │ 00:02:27 verbose #2024 > > │ Test case 1. A. Time: 0L │ 00:02:27 verbose #2025 > > │ │ 00:02:27 verbose #2026 > > │ Solution: 9 │ 00:02:27 verbose #2027 > > │ Test case 1. A. Time: 0L │ 00:02:27 verbose #2028 > > │ │ 00:02:27 verbose #2029 > > │ Solution: 10 │ 00:02:27 verbose #2030 > > │ Test case 1. A. Time: 2L │ 00:02:27 verbose #2031 > > │ │ 00:02:27 verbose #2032 > > │ Input | Expected | Result | Best │ 00:02:27 verbose #2033 > > │ --- | --- | --- | --- │ 00:02:27 verbose #2034 > > │ 1 | a | a | (1, 1) │ 00:02:27 verbose #2035 > > │ 2 | ba | ba | (1, 0) │ 00:02:27 verbose #2036 > > │ 3 | aaa | aaa | (1, 0) │ 00:02:27 verbose #2037 > > │ 9 | aaaaaaaaa | aaaaaaaaa | (1, 0) │ 00:02:27 verbose #2038 > > │ 10 | baaaaaaaaa | baaaaaaaaa | (1, 2) │ 00:02:27 verbose #2039 > > │ │ 00:02:27 verbose #2040 > > │ Average Ranking │ 00:02:27 verbose #2041 > > │ Test case 1. Average Time: 0L │ 00:02:27 verbose #2042 > > │ │ 00:02:27 verbose #2043 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:27 verbose #2044 > > 00:02:27 verbose #2045 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:27 verbose #2046 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:27 verbose #2047 > > │ ## hasAnyPairCloseToEachotherTests │ 00:02:27 verbose #2048 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:27 verbose #2049 > > 00:02:27 verbose #2050 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:27 verbose #2051 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:27 verbose #2052 > > │ Test: HasAnyPairCloseToEachother │ 00:02:27 verbose #2053 > > │ │ 00:02:27 verbose #2054 > > │ Solution: 0 │ 00:02:27 verbose #2055 > > │ Test case 1. A. Time: 137L │ 00:02:27 verbose #2056 > > │ │ 00:02:27 verbose #2057 > > │ Solution: 1,2 │ 00:02:27 verbose #2058 > > │ Test case 1. A. Time: 186L │ 00:02:27 verbose #2059 > > │ │ 00:02:27 verbose #2060 > > │ Solution: 3,5 │ 00:02:27 verbose #2061 > > │ Test case 1. A. Time: 206L │ 00:02:27 verbose #2062 > > │ │ 00:02:27 verbose #2063 > > │ Solution: 3,4,6 │ 00:02:27 verbose #2064 > > │ Test case 1. A. Time: 149L │ 00:02:27 verbose #2065 > > │ │ 00:02:27 verbose #2066 > > │ Solution: 2,4,6 │ 00:02:27 verbose #2067 > > │ Test case 1. A. Time: 150L │ 00:02:27 verbose #2068 > > │ │ 00:02:27 verbose #2069 > > │ Input | Expected | Result | Best │ 00:02:27 verbose #2070 > > │ --- | --- | --- | --- │ 00:02:27 verbose #2071 > > │ 0 | False | False | (1, 137) │ 00:02:27 verbose #2072 > > │ 1,2 | True | True | (1, 186) │ 00:02:27 verbose #2073 > > │ 3,5 | False | False | (1, 206) │ 00:02:27 verbose #2074 > > │ 3,4,6 | True | True | (1, 149) │ 00:02:27 verbose #2075 > > │ 2,4,6 | False | False | (1, 150) │ 00:02:27 verbose #2076 > > │ │ 00:02:27 verbose #2077 > > │ Averages │ 00:02:27 verbose #2078 > > │ Test case 1. Average Time: 165L │ 00:02:27 verbose #2079 > > │ │ 00:02:27 verbose #2080 > > │ Ranking │ 00:02:27 verbose #2081 > > │ Test case 1. Average Time: 165L │ 00:02:27 verbose #2082 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:27 verbose #2083 > > 00:02:27 verbose #2084 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:02:27 verbose #2085 > > //// test 00:02:27 verbose #2086 > > 00:02:27 verbose #2087 > > let solutions = [[ 00:02:27 verbose #2088 > > "A", 00:02:27 verbose #2089 > > fun (a: int[[]]) -> 00:02:27 verbose #2090 > > let indices = System.Linq.Enumerable.Range(0, a.Length) |> 00:02:27 verbose #2091 > > System.Linq.Enumerable.ToArray 00:02:27 verbose #2092 > > System.Array.Sort (a, indices) 00:02:27 verbose #2093 > > 00:02:27 verbose #2094 > > indices 00:02:27 verbose #2095 > > |> Array.take (a.Length - 1) 00:02:27 verbose #2096 > > |> Array.exists (fun i -> a.[[i + 1]] - a.[[i]] = 1) 00:02:27 verbose #2097 > > ]] 00:02:27 verbose #2098 > > let testCases = seq { 00:02:27 verbose #2099 > > [[| 0 |]], false 00:02:27 verbose #2100 > > [[| 1; 2 |]], true 00:02:27 verbose #2101 > > [[| 3; 5 |]], false 00:02:27 verbose #2102 > > [[| 3; 4; 6 |]], true 00:02:27 verbose #2103 > > [[| 2; 4; 6 |]], false 00:02:27 verbose #2104 > > } 00:02:27 verbose #2105 > > let rec hasAnyPairCloseToEachotherTests = 00:02:27 verbose #2106 > > runAll (nameof hasAnyPairCloseToEachotherTests) _count solutions testCases 00:02:27 verbose #2107 > > hasAnyPairCloseToEachotherTests 00:02:27 verbose #2108 > > |> sortResultList 00:02:29 verbose #2109 > > 00:02:29 verbose #2110 > > ╭─[ 1.48s - stdout ]───────────────────────────────────────────────────────────╮ 00:02:29 verbose #2111 > > │ │ 00:02:29 verbose #2112 > > │ │ 00:02:29 verbose #2113 > > │ Test: hasAnyPairCloseToEachotherTests │ 00:02:29 verbose #2114 > > │ │ 00:02:29 verbose #2115 > > │ Solution: 0 │ 00:02:29 verbose #2116 > > │ Test case 1. A. Time: 2L │ 00:02:29 verbose #2117 > > │ │ 00:02:29 verbose #2118 > > │ Solution: 1,2 │ 00:02:29 verbose #2119 > > │ Test case 1. A. Time: 0L │ 00:02:29 verbose #2120 > > │ │ 00:02:29 verbose #2121 > > │ Solution: 3,5 │ 00:02:29 verbose #2122 > > │ Test case 1. A. Time: 0L │ 00:02:29 verbose #2123 > > │ │ 00:02:29 verbose #2124 > > │ Solution: 3,4,6 │ 00:02:29 verbose #2125 > > │ Test case 1. A. Time: 0L │ 00:02:29 verbose #2126 > > │ │ 00:02:29 verbose #2127 > > │ Solution: 2,4,6 │ 00:02:29 verbose #2128 > > │ Test case 1. A. Time: 0L │ 00:02:29 verbose #2129 > > │ │ 00:02:29 verbose #2130 > > │ Input | Expected | Result | Best │ 00:02:29 verbose #2131 > > │ --- | --- | --- | --- │ 00:02:29 verbose #2132 > > │ 0 | False | False | (1, 2) │ 00:02:29 verbose #2133 > > │ 1,2 | True | True | (1, 0) │ 00:02:29 verbose #2134 > > │ 3,5 | False | False | (1, 0) │ 00:02:29 verbose #2135 > > │ 3,4,6 | True | True | (1, 0) │ 00:02:29 verbose #2136 > > │ 2,4,6 | False | False | (1, 0) │ 00:02:29 verbose #2137 > > │ │ 00:02:29 verbose #2138 > > │ Average Ranking │ 00:02:29 verbose #2139 > > │ Test case 1. Average Time: 0L │ 00:02:29 verbose #2140 > > │ │ 00:02:29 verbose #2141 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:29 verbose #2142 > 00:02:28 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 125147 } 00:02:29 verbose #2143 > 00:02:28 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:02:29 verbose #2144 > "nbconvert", 00:02:29 verbose #2145 > "c:/home/git/polyglot/apps/perf/Perf.dib.ipynb", 00:02:29 verbose #2146 > "--to", 00:02:29 verbose #2147 > "html", 00:02:29 verbose #2148 > "--HTMLExporter.theme=dark", 00:02:29 verbose #2149 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/apps/perf/Perf.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:02:32 verbose #2150 > 00:02:31 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/perf/Perf.dib.ipynb to html 00:02:32 verbose #2151 > 00:02:31 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:02:32 verbose #2152 > 00:02:31 verbose #7 ! validate(nb) 00:02:36 verbose #2153 > 00:02:35 verbose #8 ! [NbConvertApp] Writing 458554 bytes to c:\home\git\polyglot\apps\perf\Perf.dib.html 00:02:36 verbose #2154 > 00:02:35 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 637 } 00:02:36 verbose #2155 > 00:02:35 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 637 } 00:02:36 verbose #2156 > 00:02:35 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:02:36 verbose #2157 > "-c", 00:02:36 verbose #2158 > "$counter = 1; $path = 'c:/home/git/polyglot/apps/perf/Perf.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:02:36 verbose #2159 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/perf/Perf.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:02:37 verbose #2160 > 00:02:36 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:02:37 verbose #2161 > 00:02:36 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:02:37 verbose #2162 > 00:02:36 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 125843 } 00:02:37 debug #2163 runtime.execute_with_options_async / { exit_code = 0; output_length = 132759 } 00:02:37 debug #1 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path Perf.dib --retries 3 00:00:00 debug #1 writeDibCode / output: Fs / path: Perf.dib 00:00:00 debug #2 parseDibCode / output: Fs / file: Perf.dib
In [ ]:
{ pwsh ../apps/dir-tree-html/build.ps1 } | Invoke-Block
00:00:00 verbose #1 async.run_with_timeout_async / { timeout = 180 } 00:00:01 debug #1 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path DirTreeHtml.dib; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:01 verbose #2 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "DirTreeHtml.dib"])) } 00:00:01 verbose #3 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:00:01 verbose #4 > "repl", 00:00:01 verbose #5 > "--exit-after-run", 00:00:01 verbose #6 > "--run", 00:00:01 verbose #7 > "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib", 00:00:01 verbose #8 > "--output-path", 00:00:01 verbose #9 > "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb", 00:00:01 verbose #10 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib" --output-path "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:00:04 verbose #11 > > 00:00:04 verbose #12 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:04 verbose #13 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:04 verbose #14 > > │ # DirTreeHtml (Polyglot) │ 00:00:04 verbose #15 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:10 verbose #16 > > 00:00:10 verbose #17 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:10 verbose #18 > > #r 00:00:10 verbose #19 > > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan 00:00:10 verbose #20 > > dard2.1/FSharp.Control.AsyncSeq.dll" 00:00:10 verbose #21 > > #r 00:00:10 verbose #22 > > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6. 00:00:10 verbose #23 > > 0/System.Reactive.dll" 00:00:10 verbose #24 > > #r 00:00:10 verbose #25 > > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib 00:00:10 verbose #26 > > netstandard2.0/System.Reactive.Linq.dll" 00:00:10 verbose #27 > > #r 00:00:10 verbose #28 > > @"../../../../../../../.nuget/packages/argu/6.2.4/lib/netstandard2.0/Argu.dll" 00:00:10 verbose #29 > > #r 00:00:10 verbose #30 > > @"../../../../../../../.nuget/packages/falco.markup/1.1.1/lib/netstandard2.0/Fal 00:00:10 verbose #31 > > co.Markup.dll" 00:00:34 verbose #32 > > 00:00:34 verbose #33 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:34 verbose #34 > > #if !INTERACTIVE 00:00:34 verbose #35 > > open Lib 00:00:34 verbose #36 > > #endif 00:00:34 verbose #37 > > 00:00:34 verbose #38 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:34 verbose #39 > > open SpiralFileSystem.Operators 00:00:34 verbose #40 > > open Falco.Markup 00:00:34 verbose #41 > > 00:00:34 verbose #42 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:34 verbose #43 > > type FileSystemNode = 00:00:34 verbose #44 > > | File of string * string * int64 00:00:34 verbose #45 > > | Folder of string * string * FileSystemNode list 00:00:34 verbose #46 > > | Root of FileSystemNode list 00:00:34 verbose #47 > > 00:00:34 verbose #48 > > let rec scanDirectory isRoot (basePath : string) (path : string) = 00:00:34 verbose #49 > > let relativePath = 00:00:34 verbose #50 > > path 00:00:34 verbose #51 > > |> SpiralSm.replace basePath "" 00:00:34 verbose #52 > > |> SpiralSm.replace "\\" "/" 00:00:34 verbose #53 > > |> SpiralSm.replace "//" "/" 00:00:34 verbose #54 > > |> SpiralSm.trim_start [[| '/' |]] 00:00:34 verbose #55 > > 00:00:34 verbose #56 > > let directories = 00:00:34 verbose #57 > > path 00:00:34 verbose #58 > > |> System.IO.Directory.GetDirectories 00:00:34 verbose #59 > > |> Array.toList 00:00:34 verbose #60 > > |> List.sort 00:00:34 verbose #61 > > |> List.map (scanDirectory false basePath) 00:00:34 verbose #62 > > let files = 00:00:34 verbose #63 > > path 00:00:34 verbose #64 > > |> System.IO.Directory.GetFiles 00:00:34 verbose #65 > > |> Array.toList 00:00:34 verbose #66 > > |> List.sort 00:00:34 verbose #67 > > |> List.map (fun f -> File (System.IO.Path.GetFileName f, relativePath, 00:00:34 verbose #68 > > System.IO.FileInfo(f).Length)) 00:00:34 verbose #69 > > 00:00:34 verbose #70 > > let children = directories @ files 00:00:34 verbose #71 > > if isRoot 00:00:34 verbose #72 > > then Root children 00:00:34 verbose #73 > > else Folder (path |> System.IO.Path.GetFileName, relativePath, children) 00:00:34 verbose #74 > > 00:00:34 verbose #75 > > let rec generateHtml fsNode = 00:00:34 verbose #76 > > let sizeLabel size = 00:00:34 verbose #77 > > match float size with 00:00:34 verbose #78 > > | size when size > 1024.0 * 1024.0 -> $"%.2f{size / 1024.0 / 1024.0} MB" 00:00:34 verbose #79 > > | size when size > 1024.0 -> $"%.2f{size / 1024.0} KB" 00:00:34 verbose #80 > > | size -> $"%.2f{size} B" 00:00:34 verbose #81 > > match fsNode with 00:00:34 verbose #82 > > | File (fileName, relativePath, size) -> 00:00:34 verbose #83 > > Elem.div [[]] [[ 00:00:34 verbose #84 > > Text.raw "📄 " 00:00:34 verbose #85 > > Elem.a [[ 00:00:34 verbose #86 > > Attr.href $"""{relativePath}{if relativePath = "" then "" else 00:00:34 verbose #87 > > "/"}{fileName}""" 00:00:34 verbose #88 > > ]] [[ 00:00:34 verbose #89 > > Text.raw fileName 00:00:34 verbose #90 > > ]] 00:00:34 verbose #91 > > Elem.span [[]] [[ 00:00:34 verbose #92 > > Text.raw $" ({size |> sizeLabel})" 00:00:34 verbose #93 > > ]] 00:00:34 verbose #94 > > ]] 00:00:34 verbose #95 > > | Folder (folderName, relativePath, children) -> 00:00:34 verbose #96 > > let size = 00:00:34 verbose #97 > > let rec loop children = 00:00:34 verbose #98 > > children 00:00:34 verbose #99 > > |> List.sumBy (function 00:00:34 verbose #100 > > | File (_, _, size) -> size 00:00:34 verbose #101 > > | Folder (_, _, children) 00:00:34 verbose #102 > > | Root children -> loop children 00:00:34 verbose #103 > > ) 00:00:34 verbose #104 > > loop children 00:00:34 verbose #105 > > Elem.details [[ 00:00:34 verbose #106 > > Attr.open' "true" 00:00:34 verbose #107 > > ]] [[ 00:00:34 verbose #108 > > Elem.summary [[]] [[ 00:00:34 verbose #109 > > Text.raw "📂 " 00:00:34 verbose #110 > > Elem.a [[ 00:00:34 verbose #111 > > Attr.href relativePath 00:00:34 verbose #112 > > ]] [[ 00:00:34 verbose #113 > > Text.raw folderName 00:00:34 verbose #114 > > ]] 00:00:34 verbose #115 > > Elem.span [[]] [[ 00:00:34 verbose #116 > > Text.raw $" ({size |> sizeLabel})" 00:00:34 verbose #117 > > ]] 00:00:34 verbose #118 > > ]] 00:00:34 verbose #119 > > Elem.div [[]] [[ 00:00:34 verbose #120 > > yield! children |> List.map generateHtml 00:00:34 verbose #121 > > ]] 00:00:34 verbose #122 > > ]] 00:00:34 verbose #123 > > | Root children -> 00:00:34 verbose #124 > > Elem.div [[]] [[ 00:00:34 verbose #125 > > yield! children |> List.map generateHtml 00:00:34 verbose #126 > > ]] 00:00:34 verbose #127 > > 00:00:34 verbose #128 > > let generateHtmlForFileSystem root = 00:00:34 verbose #129 > > $"""<!DOCTYPE html> 00:00:34 verbose #130 > > <html lang="en"> 00:00:34 verbose #131 > > <head> 00:00:34 verbose #132 > > <meta charset="UTF-8"> 00:00:34 verbose #133 > > <style> 00:00:34 verbose #134 > > body {{ 00:00:34 verbose #135 > > background-color: #222; 00:00:34 verbose #136 > > color: #ccc; 00:00:34 verbose #137 > > }} 00:00:34 verbose #138 > > a {{ 00:00:34 verbose #139 > > color: #777; 00:00:34 verbose #140 > > font-size: 15px; 00:00:34 verbose #141 > > }} 00:00:34 verbose #142 > > span {{ 00:00:34 verbose #143 > > font-size: 11px; 00:00:34 verbose #144 > > }} 00:00:34 verbose #145 > > div > div {{ 00:00:34 verbose #146 > > padding-left: 10px; 00:00:34 verbose #147 > > }} 00:00:34 verbose #148 > > details > div {{ 00:00:34 verbose #149 > > padding-left: 19px; 00:00:34 verbose #150 > > }} 00:00:34 verbose #151 > > </style> 00:00:34 verbose #152 > > </head> 00:00:34 verbose #153 > > <body> 00:00:34 verbose #154 > > {root |> generateHtml |> renderNode} 00:00:34 verbose #155 > > </body> 00:00:34 verbose #156 > > </html> 00:00:34 verbose #157 > > """ 00:00:34 verbose #158 > > 00:00:34 verbose #159 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:34 verbose #160 > > //// test 00:00:34 verbose #161 > > 00:00:34 verbose #162 > > let expected = """<!DOCTYPE html> 00:00:34 verbose #163 > > <html lang="en"> 00:00:34 verbose #164 > > <head> 00:00:34 verbose #165 > > <meta charset="UTF-8"> 00:00:34 verbose #166 > > <style> 00:00:34 verbose #167 > > body { 00:00:34 verbose #168 > > background-color: #222; 00:00:34 verbose #169 > > color: #ccc; 00:00:34 verbose #170 > > } 00:00:34 verbose #171 > > a { 00:00:34 verbose #172 > > color: #777; 00:00:34 verbose #173 > > font-size: 15px; 00:00:34 verbose #174 > > } 00:00:34 verbose #175 > > span { 00:00:34 verbose #176 > > font-size: 11px; 00:00:34 verbose #177 > > } 00:00:34 verbose #178 > > div > div { 00:00:34 verbose #179 > > padding-left: 10px; 00:00:34 verbose #180 > > } 00:00:34 verbose #181 > > details > div { 00:00:34 verbose #182 > > padding-left: 19px; 00:00:34 verbose #183 > > } 00:00:34 verbose #184 > > </style> 00:00:34 verbose #185 > > </head> 00:00:34 verbose #186 > > <body> 00:00:34 verbose #187 > > <div><details open="true"><summary>📂 <a href="_.root">_.root</a><span> 00:00:34 verbose #188 > > (10.00 B)</span></summary><div><details open="true"><summary>📂 <a 00:00:34 verbose #189 > > href="_.root/3">3</a><span> (6.00 B)</span></summary><div><details 00:00:34 verbose #190 > > open="true"><summary>📂 <a href="_.root/3/2">2</a><span> (3.00 00:00:34 verbose #191 > > B)</span></summary><div><details open="true"><summary>📂 <a 00:00:34 verbose #192 > > href="_.root/3/2/1">1</a><span> (1.00 B)</span></summary><div><div>📄 <a 00:00:34 verbose #193 > > href="_.root/3/2/1/file.txt">file.txt</a><span> (1.00 00:00:34 verbose #194 > > B)</span></div></div></details><div>📄 <a 00:00:34 verbose #195 > > href="_.root/3/2/file.txt">file.txt</a><span> (2.00 00:00:34 verbose #196 > > B)</span></div></div></details><div>📄 <a 00:00:34 verbose #197 > > href="_.root/3/file.txt">file.txt</a><span> (3.00 00:00:34 verbose #198 > > B)</span></div></div></details><div>📄 <a 00:00:34 verbose #199 > > href="_.root/file.txt">file.txt</a><span> (4.00 00:00:34 verbose #200 > > B)</span></div></div></details></div> 00:00:34 verbose #201 > > </body> 00:00:34 verbose #202 > > </html> 00:00:34 verbose #203 > > """ 00:00:34 verbose #204 > > 00:00:34 verbose #205 > > let struct (tempFolder, disposable) = expected |> SpiralCrypto.hash_text |> 00:00:34 verbose #206 > > SpiralFileSystem.create_temp_dir' 00:00:34 verbose #207 > > let rec loop d n = async { 00:00:34 verbose #208 > > if n >= 0 then 00:00:34 verbose #209 > > tempFolder </> d |> System.IO.Directory.CreateDirectory |> ignore 00:00:34 verbose #210 > > do! 00:00:34 verbose #211 > > n 00:00:34 verbose #212 > > |> string 00:00:34 verbose #213 > > |> String.replicate (n + 1) 00:00:34 verbose #214 > > |> SpiralFileSystem.write_all_text_async (tempFolder </> d </> 00:00:34 verbose #215 > > $"file.txt") 00:00:34 verbose #216 > > do! loop $"{d}/{n}" (n - 1) 00:00:34 verbose #217 > > } 00:00:34 verbose #218 > > loop "_.root" 3 00:00:34 verbose #219 > > |> Async.RunSynchronously 00:00:34 verbose #220 > > 00:00:34 verbose #221 > > let html = 00:00:34 verbose #222 > > scanDirectory true tempFolder tempFolder 00:00:34 verbose #223 > > |> generateHtmlForFileSystem 00:00:34 verbose #224 > > 00:00:34 verbose #225 > > html 00:00:34 verbose #226 > > |> _assertEqual expected 00:00:34 verbose #227 > > 00:00:34 verbose #228 > > disposable.Dispose () 00:00:34 verbose #229 > > 00:00:34 verbose #230 > > html |> Microsoft.DotNet.Interactive.Formatting.Html.ToHtmlContent 00:00:34 verbose #231 > > 00:00:34 verbose #232 > > ╭─[ 285.87ms - return value ]──────────────────────────────────────────────────╮ 00:00:34 verbose #233 > > │ <!DOCTYPE html> │ 00:00:34 verbose #234 > > │ <html lang="en"> │ 00:00:34 verbose #235 > > │ <head> │ 00:00:34 verbose #236 > > │ <meta charset="UTF-8"> │ 00:00:34 verbose #237 > > │ <style> │ 00:00:34 verbose #238 > > │ body { │ 00:00:34 verbose #239 > > │ background-color: #222; │ 00:00:34 verbose #240 > > │ color: #ccc; │ 00:00:34 verbose #241 > > │ } │ 00:00:34 verbose #242 > > │ a { │ 00:00:34 verbose #243 > > │ color: #777; │ 00:00:34 verbose #244 > > │ font-size: 15px; │ 00:00:34 verbose #245 > > │ } │ 00:00:34 verbose #246 > > │ span { │ 00:00:34 verbose #247 > > │ font-size: 11px; │ 00:00:34 verbose #248 > > │ } │ 00:00:34 verbose #249 > > │ div > div { │ 00:00:34 verbose #250 > > │ padding-left: 10px; │ 00:00:34 verbose #251 > > │ } │ 00:00:34 verbose #252 > > │ details > div { │ 00:00:34 verbose #253 > > │ padding-left: 19px; │ 00:00:34 verbose #254 > > │ } │ 00:00:34 verbose #255 > > │ </style> │ 00:00:34 verbose #256 > > │ </head> │ 00:00:34 verbose #257 > > │ <body> │ 00:00:34 verbose #258 > > │ <div><details open="true"><summary>📂 <a │ 00:00:34 verbose #259 > > │ href="_.root">_.root</a><span> (10.00 B)</span></summary><div><details │ 00:00:34 verbose #260 > > │ open="true"><summary>📂 <a href="_.root/3">3</a><span> (6.00 │ 00:00:34 verbose #261 > > │ B)</span></summary><div><details open="true"><summary>📂 <a │ 00:00:34 verbose #262 > > │ href="_.root/3/2">2</a><span> (3.00 B)</span></summary><div><details │ 00:00:34 verbose #263 > > │ open="true"><summary>📂 <a href="_.root/3/2/1">1</a><span> (1.00 │ 00:00:34 verbose #264 > > │ B)</span></summary><div><div>📄 <a │ 00:00:34 verbose #265 > > │ href="_.root/3/2/1/file.txt">file.txt</a><span> (1.00 │ 00:00:34 verbose #266 > > │ B)</span></div></div></details><div>📄 <a │ 00:00:34 verbose #267 > > │ href="_.root/3/2/file.txt">file.txt</a><span> (2.00 │ 00:00:34 verbose #268 > > │ B)</span></div></div></details><div>📄 <a │ 00:00:34 verbose #269 > > │ href="_.root/3/file.txt">file.txt</a><span> (3.00 │ 00:00:34 verbose #270 > > │ B)</span></div></div></details><div>📄 <a │ 00:00:34 verbose #271 > > │ href="_.root/file.txt">file.txt</a><span> (4.00 │ 00:00:34 verbose #272 > > │ B)</span></div></div></details></div> │ 00:00:34 verbose #273 > > │ </body> │ 00:00:34 verbose #274 > > │ </html> │ 00:00:34 verbose #275 > > │ │ 00:00:34 verbose #276 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:34 verbose #277 > > 00:00:34 verbose #278 > > ╭─[ 296.23ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:34 verbose #279 > > │ "<!DOCTYPE html> │ 00:00:34 verbose #280 > > │ <html lang="en"> │ 00:00:34 verbose #281 > > │ <head> │ 00:00:34 verbose #282 > > │ <meta charset="UTF-8"> │ 00:00:34 verbose #283 > > │ <style> │ 00:00:34 verbose #284 > > │ body { │ 00:00:34 verbose #285 > > │ background-color: #222; │ 00:00:34 verbose #286 > > │ color: #ccc; │ 00:00:34 verbose #287 > > │ } │ 00:00:34 verbose #288 > > │ a { │ 00:00:34 verbose #289 > > │ color: #777; │ 00:00:34 verbose #290 > > │ font-size: 15px; │ 00:00:34 verbose #291 > > │ } │ 00:00:34 verbose #292 > > │ span { │ 00:00:34 verbose #293 > > │ font-size: 11px; │ 00:00:34 verbose #294 > > │ } │ 00:00:34 verbose #295 > > │ div > div { │ 00:00:34 verbose #296 > > │ padding-left: 10px; │ 00:00:34 verbose #297 > > │ } │ 00:00:34 verbose #298 > > │ details > div { │ 00:00:34 verbose #299 > > │ padding-left: 19px; │ 00:00:34 verbose #300 > > │ } │ 00:00:34 verbose #301 > > │ </style> │ 00:00:34 verbose #302 > > │ </head> │ 00:00:34 verbose #303 > > │ <body> │ 00:00:34 verbose #304 > > │ <div><details open="true"><summary>📂 <a │ 00:00:34 verbose #305 > > │ href="_.root">_.root</a><span> (10.00 B)</span></summary><div><details │ 00:00:34 verbose #306 > > │ open="true"><summary>📂 <a href="_.root/3">3</a><span> (6.00 │ 00:00:34 verbose #307 > > │ B)</span></summary><div><details open="true"><summary>📂 <a │ 00:00:34 verbose #308 > > │ href="_.root/3/2">2</a><span> (3.00 B)</span></summary><div><details │ 00:00:34 verbose #309 > > │ open="true"><summary>📂 <a href="_.root/3/2/1">1</a><span> (1.00 │ 00:00:34 verbose #310 > > │ B)</span></summary><div><div>📄 <a │ 00:00:34 verbose #311 > > │ href="_.root/3/2/1/file.txt">file.txt</a><span> (1.00 │ 00:00:34 verbose #312 > > │ B)</span></div></div></details><div>📄 <a │ 00:00:34 verbose #313 > > │ href="_.root/3/2/file.txt">file.txt</a><span> (2.00 │ 00:00:34 verbose #314 > > │ B)</span></div></div></details><div>📄 <a │ 00:00:34 verbose #315 > > │ href="_.root/3/file.txt">file.txt</a><span> (3.00 │ 00:00:34 verbose #316 > > │ B)</span></div></div></details><div>📄 <a │ 00:00:34 verbose #317 > > │ href="_.root/file.txt">file.txt</a><span> (4.00 │ 00:00:34 verbose #318 > > │ B)</span></div></div></details></div> │ 00:00:34 verbose #319 > > │ </body> │ 00:00:34 verbose #320 > > │ </html> │ 00:00:34 verbose #321 > > │ " │ 00:00:34 verbose #322 > > │ │ 00:00:34 verbose #323 > > │ │ 00:00:34 verbose #324 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:34 verbose #325 > > 00:00:34 verbose #326 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:34 verbose #327 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:34 verbose #328 > > │ ## Arguments │ 00:00:34 verbose #329 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:34 verbose #330 > > 00:00:34 verbose #331 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:34 verbose #332 > > [[<RequireQualifiedAccess>]] 00:00:34 verbose #333 > > type Arguments = 00:00:34 verbose #334 > > | [[<Argu.ArguAttributes.ExactlyOnce>]] Dir of string 00:00:34 verbose #335 > > | [[<Argu.ArguAttributes.ExactlyOnce>]] Html of string 00:00:34 verbose #336 > > 00:00:34 verbose #337 > > interface Argu.IArgParserTemplate with 00:00:34 verbose #338 > > member s.Usage = 00:00:34 verbose #339 > > match s with 00:00:34 verbose #340 > > | Dir _ -> nameof Dir 00:00:34 verbose #341 > > | Html _ -> nameof Html 00:00:35 verbose #342 > > 00:00:35 verbose #343 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:35 verbose #344 > > //// test 00:00:35 verbose #345 > > 00:00:35 verbose #346 > > Argu.ArgumentParser.Create<Arguments>().PrintUsage () 00:00:35 verbose #347 > > 00:00:35 verbose #348 > > ╭─[ 160.17ms - return value ]──────────────────────────────────────────────────╮ 00:00:35 verbose #349 > > │ "USAGE: dotnet-repl [--help] --dir <string> --html <string> │ 00:00:35 verbose #350 > > │ │ 00:00:35 verbose #351 > > │ OPTIONS: │ 00:00:35 verbose #352 > > │ │ 00:00:35 verbose #353 > > │ --dir <string> Dir │ 00:00:35 verbose #354 > > │ --html <string> Html │ 00:00:35 verbose #355 > > │ --help display this list of options. │ 00:00:35 verbose #356 > > │ " │ 00:00:35 verbose #357 > > │ │ 00:00:35 verbose #358 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:35 verbose #359 > > 00:00:35 verbose #360 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:35 verbose #361 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:35 verbose #362 > > │ ## main │ 00:00:35 verbose #363 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:35 verbose #364 > > 00:00:35 verbose #365 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:35 verbose #366 > > let main args = 00:00:35 verbose #367 > > let argsMap = args |> Runtime.parseArgsMap<Arguments> 00:00:35 verbose #368 > > 00:00:35 verbose #369 > > let dir = 00:00:35 verbose #370 > > match argsMap.[[nameof Arguments.Dir]] with 00:00:35 verbose #371 > > | [[ Arguments.Dir dir ]] -> Some dir 00:00:35 verbose #372 > > | _ -> None 00:00:35 verbose #373 > > |> Option.get 00:00:35 verbose #374 > > 00:00:35 verbose #375 > > let htmlPath = 00:00:35 verbose #376 > > match argsMap.[[nameof Arguments.Html]] with 00:00:35 verbose #377 > > | [[ Arguments.Html html ]] -> Some html 00:00:35 verbose #378 > > | _ -> None 00:00:35 verbose #379 > > |> Option.get 00:00:35 verbose #380 > > 00:00:35 verbose #381 > > let fileSystem = scanDirectory true dir dir 00:00:35 verbose #382 > > let html = generateHtmlForFileSystem fileSystem 00:00:35 verbose #383 > > 00:00:35 verbose #384 > > html |> SpiralFileSystem.write_all_text_async htmlPath 00:00:35 verbose #385 > > |> Async.runWithTimeout 30000 00:00:35 verbose #386 > > |> function 00:00:35 verbose #387 > > | Some () -> 0 00:00:35 verbose #388 > > | None -> 1 00:00:35 verbose #389 > > 00:00:35 verbose #390 > > ── fsharp ────────────────────────────────────────────────────────────────────── 00:00:35 verbose #391 > > //// test 00:00:35 verbose #392 > > 00:00:35 verbose #393 > > let args = 00:00:35 verbose #394 > > System.Environment.GetEnvironmentVariable "ARGS" 00:00:35 verbose #395 > > |> SpiralRuntime.split_args 00:00:35 verbose #396 > > |> Result.toArray 00:00:35 verbose #397 > > |> Array.collect id 00:00:35 verbose #398 > > 00:00:35 verbose #399 > > match args with 00:00:35 verbose #400 > > | [[||]] -> 0 00:00:35 verbose #401 > > | args -> if main args = 0 then 0 else failwith "main failed" 00:00:35 verbose #402 > > 00:00:35 verbose #403 > > ╭─[ 127.43ms - return value ]──────────────────────────────────────────────────╮ 00:00:35 verbose #404 > > │ <div class="dni-plaintext"><pre>0 │ 00:00:35 verbose #405 > > │ </pre></div><style> │ 00:00:35 verbose #406 > > │ .dni-code-hint { │ 00:00:35 verbose #407 > > │ font-style: italic; │ 00:00:35 verbose #408 > > │ overflow: hidden; │ 00:00:35 verbose #409 > > │ white-space: nowrap; │ 00:00:35 verbose #410 > > │ } │ 00:00:35 verbose #411 > > │ .dni-treeview { │ 00:00:35 verbose #412 > > │ white-space: nowrap; │ 00:00:35 verbose #413 > > │ } │ 00:00:35 verbose #414 > > │ .dni-treeview td { │ 00:00:35 verbose #415 > > │ vertical-align: top; │ 00:00:35 verbose #416 > > │ text-align: start; │ 00:00:35 verbose #417 > > │ } │ 00:00:35 verbose #418 > > │ details.dni-treeview { │ 00:00:35 verbose #419 > > │ padding-left: 1em; │ 00:00:35 verbose #420 > > │ } │ 00:00:35 verbose #421 > > │ table td { │ 00:00:35 verbose #422 > > │ text-align: start; │ 00:00:35 verbose #423 > > │ } │ 00:00:35 verbose #424 > > │ table tr { │ 00:00:35 verbose #425 > > │ vertical-align: top; │ 00:00:35 verbose #426 > > │ margin: 0em 0px; │ 00:00:35 verbose #427 > > │ } │ 00:00:35 verbose #428 > > │ table tr td pre │ 00:00:35 verbose #429 > > │ { │ 00:00:35 verbose #430 > > │ vertical-align: top !important; │ 00:00:35 verbose #431 > > │ margin: 0em 0px !important; │ 00:00:35 verbose #432 > > │ } │ 00:00:35 verbose #433 > > │ table th { │ 00:00:35 verbose #434 > > │ text-align: start; │ 00:00:35 verbose #435 > > │ } │ 00:00:35 verbose #436 > > │ </style> │ 00:00:35 verbose #437 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:35 verbose #438 > 00:00:34 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 19755 } 00:00:35 verbose #439 > 00:00:34 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:00:35 verbose #440 > "nbconvert", 00:00:35 verbose #441 > "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb", 00:00:35 verbose #442 > "--to", 00:00:35 verbose #443 > "html", 00:00:35 verbose #444 > "--HTMLExporter.theme=dark", 00:00:35 verbose #445 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:39 verbose #446 > 00:00:38 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb to html 00:00:39 verbose #447 > 00:00:38 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:00:39 verbose #448 > 00:00:38 verbose #7 ! validate(nb) 00:00:42 verbose #449 > 00:00:40 verbose #8 ! [NbConvertApp] Writing 309931 bytes to c:\home\git\polyglot\apps\dir-tree-html\DirTreeHtml.dib.html 00:00:42 verbose #450 > 00:00:41 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 669 } 00:00:42 verbose #451 > 00:00:41 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 669 } 00:00:42 verbose #452 > 00:00:41 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:00:42 verbose #453 > "-c", 00:00:42 verbose #454 > "$counter = 1; $path = 'c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:00:42 verbose #455 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:43 verbose #456 > 00:00:42 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:00:43 verbose #457 > 00:00:42 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:00:43 verbose #458 > 00:00:42 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 20483 } 00:00:43 debug #459 runtime.execute_with_options_async / { exit_code = 0; output_length = 24106 } 00:00:43 debug #1 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path DirTreeHtml.dib #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type std_string_String = class end #else type std_string_String = string #endif #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("&$0")>] type Ref<'T> = class end #else type Ref<'T> = 'T #endif #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("mut $0")>] #endif type Mut<'T> = class end #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("Vec<$0>")>] #endif type Vec<'T> = class end module TraceState = let mutable trace_state = None #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>] #endif type std_env_VarError = class end type IOsEnviron = abstract environ: x: unit -> obj #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("str")>] type Str = class end #else type Str = string #endif type [<Struct>] US0 = | US0_0 | US0_1 | US0_2 | US0_3 | US0_4 and Mut0 = {mutable l0 : int64} and Mut1 = {mutable l0 : (string -> unit)} and Mut2 = {mutable l0 : bool} and Mut3 = {mutable l0 : string} and Mut4 = {mutable l0 : US0} and [<Struct>] US1 = | US1_0 of f0_0 : string | US1_1 and [<Struct>] US2 = | US2_0 of f0_0 : US0 | US2_1 and [<Struct>] US3 = | US3_0 of f0_0 : int64 | US3_1 and [<Struct>] US4 = | US4_0 of f0_0 : bool | US4_1 and [<Struct>] US5 = | US5_0 of f0_0 : bool | US5_1 of f1_0 : exn and [<Struct>] US6 = | US6_0 of f0_0 : bool | US6_1 of f1_0 : exn and [<Struct>] US7 = | US7_0 of f0_0 : int32 | US7_1 let rec method1 () : string = let v0 : string = "TRACE_LEVEL" v0 and method3 () : string = let v0 : string = "" v0 and closure1 () (v0 : string) : US1 = US1_0(v0) and method4 () : (string -> US1) = closure1() and method2 (v0 : string) : string = let v1 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v2 : string = "std::env::var(&*$0)" let v3 : Result<std_string_String, std_env_VarError> = Fable.Core.RustInterop.emitRustExpr v0 v2 let v4 : string = "true; let _result_map_ = $0.map(|x| { //" let v5 : bool = Fable.Core.RustInterop.emitRustExpr v3 v4 let v6 : string = "x" let v7 : std_string_String = Fable.Core.RustInterop.emitRustExpr () v6 let v8 : string = "fable_library_rust::String_::fromString($0)" let v9 : string = Fable.Core.RustInterop.emitRustExpr v7 v8 let v10 : string = "true; $0 })" let v11 : bool = Fable.Core.RustInterop.emitRustExpr v9 v10 let v12 : string = "_result_map_" let v13 : Result<string, std_env_VarError> = Fable.Core.RustInterop.emitRustExpr () v12 let v14 : string = method3() let v15 : string = "$0.unwrap_or($1)" let v16 : string = Fable.Core.RustInterop.emitRustExpr struct (v13, v14) v15 let _v1 = v16 #endif #if FABLE_COMPILER_RUST && WASM let v17 : string = "std::env::var(&*$0)" let v18 : Result<std_string_String, std_env_VarError> = Fable.Core.RustInterop.emitRustExpr v0 v17 let v19 : string = "true; let _result_map_ = $0.map(|x| { //" let v20 : bool = Fable.Core.RustInterop.emitRustExpr v18 v19 let v21 : string = "x" let v22 : std_string_String = Fable.Core.RustInterop.emitRustExpr () v21 let v23 : string = "fable_library_rust::String_::fromString($0)" let v24 : string = Fable.Core.RustInterop.emitRustExpr v22 v23 let v25 : string = "true; $0 })" let v26 : bool = Fable.Core.RustInterop.emitRustExpr v24 v25 let v27 : string = "_result_map_" let v28 : Result<string, std_env_VarError> = Fable.Core.RustInterop.emitRustExpr () v27 let v29 : string = method3() let v30 : string = "$0.unwrap_or($1)" let v31 : string = Fable.Core.RustInterop.emitRustExpr struct (v28, v29) v30 let _v1 = v31 #endif #if FABLE_COMPILER_RUST && CONTRACT let v32 : string = "std::env::var(&*$0)" let v33 : Result<std_string_String, std_env_VarError> = Fable.Core.RustInterop.emitRustExpr v0 v32 let v34 : string = "true; let _result_map_ = $0.map(|x| { //" let v35 : bool = Fable.Core.RustInterop.emitRustExpr v33 v34 let v36 : string = "x" let v37 : std_string_String = Fable.Core.RustInterop.emitRustExpr () v36 let v38 : string = "fable_library_rust::String_::fromString($0)" let v39 : string = Fable.Core.RustInterop.emitRustExpr v37 v38 let v40 : string = "true; $0 })" let v41 : bool = Fable.Core.RustInterop.emitRustExpr v39 v40 let v42 : string = "_result_map_" let v43 : Result<string, std_env_VarError> = Fable.Core.RustInterop.emitRustExpr () v42 let v44 : string = method3() let v45 : string = "$0.unwrap_or($1)" let v46 : string = Fable.Core.RustInterop.emitRustExpr struct (v43, v44) v45 let _v1 = v46 #endif #if FABLE_COMPILER_TYPESCRIPT let v47 : string = "process.env[$0] ?? \"\"" let v48 : string = Fable.Core.JsInterop.emitJsExpr v0 v47 let _v1 = v48 #endif #if FABLE_COMPILER_PYTHON let v49 : string = "os" let v50 : IOsEnviron = Fable.Core.PyInterop.importAll v49 let v51 : string = "v50.environ" let v52 : obj = Fable.Core.PyInterop.emitPyExpr () v51 let v55 : string = "v52.get($0)" let v56 : string = Fable.Core.PyInterop.emitPyExpr v0 v55 let mutable _v56 = None #if !FABLE_COMPILER && !WASM && !CONTRACT let v59 : (string -> string option) = Option.ofObj let v60 : string option = v59 v56 v60 #else Some v56 #endif |> fun x -> _v56 <- Some x let v61 : string option = match _v56 with Some x -> x | None -> failwith "optionm'.of_obj / _v56=None" let v64 : (string -> US1) = method4() let v65 : US1 option = v61 |> Option.map v64 let v76 : US1 = US1_1 let v77 : US1 = v65 |> Option.defaultValue v76 let v84 : string = match v77 with | US1_1 -> (* None *) let v82 : string = "" v82 | US1_0(v81) -> (* Some *) v81 let _v1 = v84 #endif #else let v85 : (string -> string) = System.Environment.GetEnvironmentVariable let v86 : string = v85 v0 let mutable _v86 = None #if !FABLE_COMPILER && !WASM && !CONTRACT let v87 : (string -> string option) = Option.ofObj let v88 : string option = v87 v86 v88 #else Some v86 #endif |> fun x -> _v86 <- Some x let v89 : string option = match _v86 with Some x -> x | None -> failwith "optionm'.of_obj / _v86=None" let v92 : (string -> US1) = method4() let v93 : US1 option = v89 |> Option.map v92 let v104 : US1 = US1_1 let v105 : US1 = v93 |> Option.defaultValue v104 let v112 : string = match v105 with | US1_1 -> (* None *) let v110 : string = "" v110 | US1_0(v109) -> (* Some *) v109 let _v1 = v112 #endif let v113 : string = _v1 v113 and method5 () : string = let v0 : string = "AUTOMATION" v0 and closure2 () (v0 : string) : unit = () and method0 (v0 : US0) : struct (Mut0 * Mut1 * Mut2 * Mut3 * Mut4 * int64 option) = let v1 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v2 : string = method1() let v3 : string = method2(v2) let v4 : bool = "Verbose" = v3 let v8 : US2 = if v4 then let v5 : US0 = US0_0 US2_0(v5) else US2_1 let v49 : US2 = match v8 with | US2_1 -> (* None *) let v11 : bool = "Debug" = v3 let v15 : US2 = if v11 then let v12 : US0 = US0_1 US2_0(v12) else US2_1 match v15 with | US2_1 -> (* None *) let v18 : bool = "Info" = v3 let v22 : US2 = if v18 then let v19 : US0 = US0_2 US2_0(v19) else US2_1 match v22 with | US2_1 -> (* None *) let v25 : bool = "Warning" = v3 let v29 : US2 = if v25 then let v26 : US0 = US0_3 US2_0(v26) else US2_1 match v29 with | US2_1 -> (* None *) let v32 : bool = "Critical" = v3 let v36 : US2 = if v32 then let v33 : US0 = US0_4 US2_0(v33) else US2_1 match v36 with | US2_1 -> (* None *) US2_1 | US2_0(v37) -> (* Some *) US2_0(v37) | US2_0(v30) -> (* Some *) US2_0(v30) | US2_0(v23) -> (* Some *) US2_0(v23) | US2_0(v16) -> (* Some *) US2_0(v16) | US2_0(v9) -> (* Some *) US2_0(v9) let v50 : string = method5() let v51 : string = method2(v50) let v52 : bool = v51 = "True" let v62 : US3 = if v52 then let v53 : System.DateTime = System.DateTime.Now let v56 : (System.DateTime -> int64) = _.Ticks let v57 : int64 = v56 v53 US3_0(v57) else US3_1 let _v1 = struct (v49, v62) #endif #if FABLE_COMPILER_RUST && WASM let v63 : US2 = US2_1 let v64 : US3 = US3_1 let _v1 = struct (v63, v64) #endif #if FABLE_COMPILER_RUST && CONTRACT let v65 : string = "AUTOMATION" let v66 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v67 : string = "env!(\"" + v65 + "\")" let v68 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v67 let v69 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v70 : string = "String::from($0)" let v71 : std_string_String = Fable.Core.RustInterop.emitRustExpr v68 v70 let _v69 = v71 #endif #if FABLE_COMPILER_RUST && WASM let v72 : string = "String::from($0)" let v73 : std_string_String = Fable.Core.RustInterop.emitRustExpr v68 v72 let _v69 = v73 #endif #if FABLE_COMPILER_RUST && CONTRACT let v74 : string = "String::from($0)" let v75 : std_string_String = Fable.Core.RustInterop.emitRustExpr v68 v74 let _v69 = v75 #endif #if FABLE_COMPILER_TYPESCRIPT let v76 : std_string_String = v68 |> unbox<std_string_String> let _v69 = v76 #endif #if FABLE_COMPILER_PYTHON let v79 : std_string_String = v68 |> unbox<std_string_String> let _v69 = v79 #endif #else let v82 : std_string_String = v68 |> unbox<std_string_String> let _v69 = v82 #endif let v85 : std_string_String = _v69 let v90 : string = "fable_library_rust::String_::fromString($0)" let v91 : string = Fable.Core.RustInterop.emitRustExpr v85 v90 let _v66 = v91 #endif #if FABLE_COMPILER_RUST && WASM let v92 : string = "env!(\"" + v65 + "\")" let v93 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v92 let v94 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v95 : string = "String::from($0)" let v96 : std_string_String = Fable.Core.RustInterop.emitRustExpr v93 v95 let _v94 = v96 #endif #if FABLE_COMPILER_RUST && WASM let v97 : string = "String::from($0)" let v98 : std_string_String = Fable.Core.RustInterop.emitRustExpr v93 v97 let _v94 = v98 #endif #if FABLE_COMPILER_RUST && CONTRACT let v99 : string = "String::from($0)" let v100 : std_string_String = Fable.Core.RustInterop.emitRustExpr v93 v99 let _v94 = v100 #endif #if FABLE_COMPILER_TYPESCRIPT let v101 : std_string_String = v93 |> unbox<std_string_String> let _v94 = v101 #endif #if FABLE_COMPILER_PYTHON let v104 : std_string_String = v93 |> unbox<std_string_String> let _v94 = v104 #endif #else let v107 : std_string_String = v93 |> unbox<std_string_String> let _v94 = v107 #endif let v110 : std_string_String = _v94 let v115 : string = "fable_library_rust::String_::fromString($0)" let v116 : string = Fable.Core.RustInterop.emitRustExpr v110 v115 let _v66 = v116 #endif #if FABLE_COMPILER_RUST && CONTRACT let v117 : string = "env!(\"" + v65 + "\")" let v118 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v117 let v119 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v120 : string = "String::from($0)" let v121 : std_string_String = Fable.Core.RustInterop.emitRustExpr v118 v120 let _v119 = v121 #endif #if FABLE_COMPILER_RUST && WASM let v122 : string = "String::from($0)" let v123 : std_string_String = Fable.Core.RustInterop.emitRustExpr v118 v122 let _v119 = v123 #endif #if FABLE_COMPILER_RUST && CONTRACT let v124 : string = "String::from($0)" let v125 : std_string_String = Fable.Core.RustInterop.emitRustExpr v118 v124 let _v119 = v125 #endif #if FABLE_COMPILER_TYPESCRIPT let v126 : std_string_String = v118 |> unbox<std_string_String> let _v119 = v126 #endif #if FABLE_COMPILER_PYTHON let v129 : std_string_String = v118 |> unbox<std_string_String> let _v119 = v129 #endif #else let v132 : std_string_String = v118 |> unbox<std_string_String> let _v119 = v132 #endif let v135 : std_string_String = _v119 let v140 : string = "fable_library_rust::String_::fromString($0)" let v141 : string = Fable.Core.RustInterop.emitRustExpr v135 v140 let _v66 = v141 #endif #if FABLE_COMPILER_TYPESCRIPT let v142 : string = null |> unbox<string> let _v66 = v142 #endif #if FABLE_COMPILER_PYTHON let v145 : string = null |> unbox<string> let _v66 = v145 #endif #else let v148 : string = null |> unbox<string> let _v66 = v148 #endif let v151 : string = _v66 let v156 : string = "True" let v157 : bool = v151 <> v156 let v166 : US3 = if v157 then US3_1 else let v161 : string = $"near_sdk::env::block_timestamp()" let v162 : uint64 = Fable.Core.RustInterop.emitRustExpr () v161 let v163 : (uint64 -> int64) = int64 let v164 : int64 = v163 v162 US3_0(v164) let v167 : US2 = US2_1 let _v1 = struct (v167, v166) #endif #if FABLE_COMPILER_TYPESCRIPT let v168 : string = method1() let v169 : string = method2(v168) let v170 : bool = "Verbose" = v169 let v174 : US2 = if v170 then let v171 : US0 = US0_0 US2_0(v171) else US2_1 let v215 : US2 = match v174 with | US2_1 -> (* None *) let v177 : bool = "Debug" = v169 let v181 : US2 = if v177 then let v178 : US0 = US0_1 US2_0(v178) else US2_1 match v181 with | US2_1 -> (* None *) let v184 : bool = "Info" = v169 let v188 : US2 = if v184 then let v185 : US0 = US0_2 US2_0(v185) else US2_1 match v188 with | US2_1 -> (* None *) let v191 : bool = "Warning" = v169 let v195 : US2 = if v191 then let v192 : US0 = US0_3 US2_0(v192) else US2_1 match v195 with | US2_1 -> (* None *) let v198 : bool = "Critical" = v169 let v202 : US2 = if v198 then let v199 : US0 = US0_4 US2_0(v199) else US2_1 match v202 with | US2_1 -> (* None *) US2_1 | US2_0(v203) -> (* Some *) US2_0(v203) | US2_0(v196) -> (* Some *) US2_0(v196) | US2_0(v189) -> (* Some *) US2_0(v189) | US2_0(v182) -> (* Some *) US2_0(v182) | US2_0(v175) -> (* Some *) US2_0(v175) let v216 : string = method5() let v217 : string = method2(v216) let v218 : bool = v217 = "True" let v228 : US3 = if v218 then let v219 : System.DateTime = System.DateTime.Now let v222 : (System.DateTime -> int64) = _.Ticks let v223 : int64 = v222 v219 US3_0(v223) else US3_1 let _v1 = struct (v215, v228) #endif #if FABLE_COMPILER_PYTHON let v229 : string = method1() let v230 : string = method2(v229) let v231 : bool = "Verbose" = v230 let v235 : US2 = if v231 then let v232 : US0 = US0_0 US2_0(v232) else US2_1 let v276 : US2 = match v235 with | US2_1 -> (* None *) let v238 : bool = "Debug" = v230 let v242 : US2 = if v238 then let v239 : US0 = US0_1 US2_0(v239) else US2_1 match v242 with | US2_1 -> (* None *) let v245 : bool = "Info" = v230 let v249 : US2 = if v245 then let v246 : US0 = US0_2 US2_0(v246) else US2_1 match v249 with | US2_1 -> (* None *) let v252 : bool = "Warning" = v230 let v256 : US2 = if v252 then let v253 : US0 = US0_3 US2_0(v253) else US2_1 match v256 with | US2_1 -> (* None *) let v259 : bool = "Critical" = v230 let v263 : US2 = if v259 then let v260 : US0 = US0_4 US2_0(v260) else US2_1 match v263 with | US2_1 -> (* None *) US2_1 | US2_0(v264) -> (* Some *) US2_0(v264) | US2_0(v257) -> (* Some *) US2_0(v257) | US2_0(v250) -> (* Some *) US2_0(v250) | US2_0(v243) -> (* Some *) US2_0(v243) | US2_0(v236) -> (* Some *) US2_0(v236) let v277 : string = method5() let v278 : string = method2(v277) let v279 : bool = v278 = "True" let v289 : US3 = if v279 then let v280 : System.DateTime = System.DateTime.Now let v283 : (System.DateTime -> int64) = _.Ticks let v284 : int64 = v283 v280 US3_0(v284) else US3_1 let _v1 = struct (v276, v289) #endif #else let v290 : string = method1() let v291 : string = method2(v290) let v292 : bool = "Verbose" = v291 let v296 : US2 = if v292 then let v293 : US0 = US0_0 US2_0(v293) else US2_1 let v337 : US2 = match v296 with | US2_1 -> (* None *) let v299 : bool = "Debug" = v291 let v303 : US2 = if v299 then let v300 : US0 = US0_1 US2_0(v300) else US2_1 match v303 with | US2_1 -> (* None *) let v306 : bool = "Info" = v291 let v310 : US2 = if v306 then let v307 : US0 = US0_2 US2_0(v307) else US2_1 match v310 with | US2_1 -> (* None *) let v313 : bool = "Warning" = v291 let v317 : US2 = if v313 then let v314 : US0 = US0_3 US2_0(v314) else US2_1 match v317 with | US2_1 -> (* None *) let v320 : bool = "Critical" = v291 let v324 : US2 = if v320 then let v321 : US0 = US0_4 US2_0(v321) else US2_1 match v324 with | US2_1 -> (* None *) US2_1 | US2_0(v325) -> (* Some *) US2_0(v325) | US2_0(v318) -> (* Some *) US2_0(v318) | US2_0(v311) -> (* Some *) US2_0(v311) | US2_0(v304) -> (* Some *) US2_0(v304) | US2_0(v297) -> (* Some *) US2_0(v297) let v338 : string = method5() let v339 : string = method2(v338) let v340 : bool = v339 = "True" let v350 : US3 = if v340 then let v341 : System.DateTime = System.DateTime.Now let v344 : (System.DateTime -> int64) = _.Ticks let v345 : int64 = v344 v341 US3_0(v345) else US3_1 let _v1 = struct (v337, v350) #endif let struct (v351 : US2, v352 : US3) = _v1 let v416 : Mut0 = {l0 = 1L} : Mut0 let v417 : (string -> unit) = closure2() let v418 : Mut1 = {l0 = v417} : Mut1 let v419 : Mut2 = {l0 = true} : Mut2 let v420 : string = "" let v421 : Mut3 = {l0 = v420} : Mut3 let v424 : US0 = match v351 with | US2_1 -> (* None *) v0 | US2_0(v422) -> (* Some *) v422 let v425 : Mut4 = {l0 = v424} : Mut4 let v432 : int64 option = match v352 with | US3_1 -> (* None *) let v430 : int64 option = None v430 | US3_0(v426) -> (* Some *) let v427 : int64 option = Some v426 v427 struct (v416, v418, v419, v421, v425, v432) and closure0 () () : unit = let v0 : bool = TraceState.trace_state.IsNone if v0 then let v1 : US0 = US0_0 let struct (v2 : Mut0, v3 : Mut1, v4 : Mut2, v5 : Mut3, v6 : Mut4, v7 : int64 option) = method0(v1) let v8 : struct (Mut0 * Mut1 * Mut2 * Mut3 * Mut4 * int64 option) option = Some struct (v2, v3, v4, v5, v6, v7) TraceState.trace_state <- v8 () and closure6 () (v0 : int64) : US3 = US3_0(v0) and method7 () : (int64 -> US3) = closure6() and method8 () : string = let v0 : string = "hh:mm:ss" v0 and method9 () : string = let v0 : string = "HH:mm:ss" v0 and method6 (v0 : Mut0, v1 : Mut1, v2 : Mut2, v3 : Mut3, v4 : Mut4, v5 : int64 option) : string = let v6 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v7 : (int64 -> US3) = method7() let v8 : US3 option = v5 |> Option.map v7 let v19 : US3 = US3_1 let v20 : US3 = v8 |> Option.defaultValue v19 let v60 : System.DateTime = match v20 with | US3_1 -> (* None *) let v56 : System.DateTime = System.DateTime.Now v56 | US3_0(v24) -> (* Some *) let v25 : System.DateTime = System.DateTime.Now let v28 : (System.DateTime -> int64) = _.Ticks let v29 : int64 = v28 v25 let v32 : int64 = v29 - v24 let v33 : (int64 -> System.TimeSpan) = System.TimeSpan let v34 : System.TimeSpan = v33 v32 let v37 : (System.TimeSpan -> int32) = _.Hours let v38 : int32 = v37 v34 let v41 : (System.TimeSpan -> int32) = _.Minutes let v42 : int32 = v41 v34 let v45 : (System.TimeSpan -> int32) = _.Seconds let v46 : int32 = v45 v34 let v49 : (System.TimeSpan -> int32) = _.Milliseconds let v50 : int32 = v49 v34 let v53 : System.DateTime = System.DateTime (1, 1, 1, v38, v42, v46, v50) v53 let v61 : string = method8() let v64 : (string -> string) = v60.ToString let v65 : string = v64 v61 let _v6 = v65 #endif #if FABLE_COMPILER_RUST && WASM let v68 : (int64 -> US3) = method7() let v69 : US3 option = v5 |> Option.map v68 let v80 : US3 = US3_1 let v81 : US3 = v69 |> Option.defaultValue v80 let v121 : System.DateTime = match v81 with | US3_1 -> (* None *) let v117 : System.DateTime = System.DateTime.Now v117 | US3_0(v85) -> (* Some *) let v86 : System.DateTime = System.DateTime.Now let v89 : (System.DateTime -> int64) = _.Ticks let v90 : int64 = v89 v86 let v93 : int64 = v90 - v85 let v94 : (int64 -> System.TimeSpan) = System.TimeSpan let v95 : System.TimeSpan = v94 v93 let v98 : (System.TimeSpan -> int32) = _.Hours let v99 : int32 = v98 v95 let v102 : (System.TimeSpan -> int32) = _.Minutes let v103 : int32 = v102 v95 let v106 : (System.TimeSpan -> int32) = _.Seconds let v107 : int32 = v106 v95 let v110 : (System.TimeSpan -> int32) = _.Milliseconds let v111 : int32 = v110 v95 let v114 : System.DateTime = System.DateTime (1, 1, 1, v99, v103, v107, v111) v114 let v122 : string = method8() let v125 : (string -> string) = v121.ToString let v126 : string = v125 v122 let _v6 = v126 #endif #if FABLE_COMPILER_RUST && CONTRACT let v129 : string = $"near_sdk::env::block_timestamp()" let v130 : uint64 = Fable.Core.RustInterop.emitRustExpr () v129 let v131 : (int64 -> US3) = method7() let v132 : US3 option = v5 |> Option.map v131 let v143 : US3 = US3_1 let v144 : US3 = v132 |> Option.defaultValue v143 let v153 : uint64 = match v144 with | US3_1 -> (* None *) v130 | US3_0(v148) -> (* Some *) let v149 : (int64 -> uint64) = uint64 let v150 : uint64 = v149 v148 let v151 : uint64 = v130 - v150 v151 let v154 : uint64 = v153 / 1000000000UL let v155 : uint64 = v154 % 60UL let v156 : uint64 = v154 / 60UL let v157 : uint64 = v156 % 60UL let v158 : uint64 = v154 / 3600UL let v159 : uint64 = v158 % 24UL let v160 : string = $"format!(\"{{:02}}:{{:02}}:{{:02}}\", $0, $1, $2)" let v161 : std_string_String = Fable.Core.RustInterop.emitRustExpr struct (v159, v157, v155) v160 let v162 : string = "fable_library_rust::String_::fromString($0)" let v163 : string = Fable.Core.RustInterop.emitRustExpr v161 v162 let _v6 = v163 #endif #if FABLE_COMPILER_TYPESCRIPT let v164 : (int64 -> US3) = method7() let v165 : US3 option = v5 |> Option.map v164 let v176 : US3 = US3_1 let v177 : US3 = v165 |> Option.defaultValue v176 let v217 : System.DateTime = match v177 with | US3_1 -> (* None *) let v213 : System.DateTime = System.DateTime.Now v213 | US3_0(v181) -> (* Some *) let v182 : System.DateTime = System.DateTime.Now let v185 : (System.DateTime -> int64) = _.Ticks let v186 : int64 = v185 v182 let v189 : int64 = v186 - v181 let v190 : (int64 -> System.TimeSpan) = System.TimeSpan let v191 : System.TimeSpan = v190 v189 let v194 : (System.TimeSpan -> int32) = _.Hours let v195 : int32 = v194 v191 let v198 : (System.TimeSpan -> int32) = _.Minutes let v199 : int32 = v198 v191 let v202 : (System.TimeSpan -> int32) = _.Seconds let v203 : int32 = v202 v191 let v206 : (System.TimeSpan -> int32) = _.Milliseconds let v207 : int32 = v206 v191 let v210 : System.DateTime = System.DateTime (1, 1, 1, v195, v199, v203, v207) v210 let v218 : string = method9() let v221 : (string -> string) = v217.ToString let v222 : string = v221 v218 let _v6 = v222 #endif #if FABLE_COMPILER_PYTHON let v225 : (int64 -> US3) = method7() let v226 : US3 option = v5 |> Option.map v225 let v237 : US3 = US3_1 let v238 : US3 = v226 |> Option.defaultValue v237 let v278 : System.DateTime = match v238 with | US3_1 -> (* None *) let v274 : System.DateTime = System.DateTime.Now v274 | US3_0(v242) -> (* Some *) let v243 : System.DateTime = System.DateTime.Now let v246 : (System.DateTime -> int64) = _.Ticks let v247 : int64 = v246 v243 let v250 : int64 = v247 - v242 let v251 : (int64 -> System.TimeSpan) = System.TimeSpan let v252 : System.TimeSpan = v251 v250 let v255 : (System.TimeSpan -> int32) = _.Hours let v256 : int32 = v255 v252 let v259 : (System.TimeSpan -> int32) = _.Minutes let v260 : int32 = v259 v252 let v263 : (System.TimeSpan -> int32) = _.Seconds let v264 : int32 = v263 v252 let v267 : (System.TimeSpan -> int32) = _.Milliseconds let v268 : int32 = v267 v252 let v271 : System.DateTime = System.DateTime (1, 1, 1, v256, v260, v264, v268) v271 let v279 : string = method9() let v282 : (string -> string) = v278.ToString let v283 : string = v282 v279 let _v6 = v283 #endif #else let v286 : (int64 -> US3) = method7() let v287 : US3 option = v5 |> Option.map v286 let v298 : US3 = US3_1 let v299 : US3 = v287 |> Option.defaultValue v298 let v339 : System.DateTime = match v299 with | US3_1 -> (* None *) let v335 : System.DateTime = System.DateTime.Now v335 | US3_0(v303) -> (* Some *) let v304 : System.DateTime = System.DateTime.Now let v307 : (System.DateTime -> int64) = _.Ticks let v308 : int64 = v307 v304 let v311 : int64 = v308 - v303 let v312 : (int64 -> System.TimeSpan) = System.TimeSpan let v313 : System.TimeSpan = v312 v311 let v316 : (System.TimeSpan -> int32) = _.Hours let v317 : int32 = v316 v313 let v320 : (System.TimeSpan -> int32) = _.Minutes let v321 : int32 = v320 v313 let v324 : (System.TimeSpan -> int32) = _.Seconds let v325 : int32 = v324 v313 let v328 : (System.TimeSpan -> int32) = _.Milliseconds let v329 : int32 = v328 v313 let v332 : System.DateTime = System.DateTime (1, 1, 1, v317, v321, v325, v329) v332 let v340 : string = method9() let v343 : (string -> string) = v339.ToString let v344 : string = v343 v340 let _v6 = v344 #endif let v347 : string = _v6 v347 and method11 () : string = let v0 : string = "\u001b[0m" v0 and method10 () : string = let v0 : string = "Verbose" let v1 : (unit -> string) = v0.ToLower let v2 : string = v1 () let v5 : string = v2.PadLeft (7, ' ') let v19 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v20 : string = "inline_colorization::color_bright_black" let v21 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v20 let v22 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v23 : string = "&*$0" let v24 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v5 v23 let _v22 = v24 #endif #if FABLE_COMPILER_RUST && WASM let v25 : string = "&*$0" let v26 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v5 v25 let _v22 = v26 #endif #if FABLE_COMPILER_RUST && CONTRACT let v27 : string = "&*$0" let v28 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v5 v27 let _v22 = v28 #endif #if FABLE_COMPILER_TYPESCRIPT let v29 : Ref<Str> = v5 |> unbox<Ref<Str>> let _v22 = v29 #endif #if FABLE_COMPILER_PYTHON let v32 : Ref<Str> = v5 |> unbox<Ref<Str>> let _v22 = v32 #endif #else let v35 : Ref<Str> = v5 |> unbox<Ref<Str>> let _v22 = v35 #endif let v38 : Ref<Str> = _v22 let v43 : string = "inline_colorization::color_reset" let v44 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v43 let v45 : string = $"format!(\"{{}}{{}}{{}}\", $0, $1, $2)" let v46 : std_string_String = Fable.Core.RustInterop.emitRustExpr struct (v21, v38, v44) v45 let v47 : string = "fable_library_rust::String_::fromString($0)" let v48 : string = Fable.Core.RustInterop.emitRustExpr v46 v47 let _v19 = v48 #endif #if FABLE_COMPILER_RUST && WASM let v49 : string = "inline_colorization::color_bright_black" let v50 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v49 let v51 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v52 : string = "&*$0" let v53 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v5 v52 let _v51 = v53 #endif #if FABLE_COMPILER_RUST && WASM let v54 : string = "&*$0" let v55 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v5 v54 let _v51 = v55 #endif #if FABLE_COMPILER_RUST && CONTRACT let v56 : string = "&*$0" let v57 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v5 v56 let _v51 = v57 #endif #if FABLE_COMPILER_TYPESCRIPT let v58 : Ref<Str> = v5 |> unbox<Ref<Str>> let _v51 = v58 #endif #if FABLE_COMPILER_PYTHON let v61 : Ref<Str> = v5 |> unbox<Ref<Str>> let _v51 = v61 #endif #else let v64 : Ref<Str> = v5 |> unbox<Ref<Str>> let _v51 = v64 #endif let v67 : Ref<Str> = _v51 let v72 : string = "inline_colorization::color_reset" let v73 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v72 let v74 : string = $"format!(\"{{}}{{}}{{}}\", $0, $1, $2)" let v75 : std_string_String = Fable.Core.RustInterop.emitRustExpr struct (v50, v67, v73) v74 let v76 : string = "fable_library_rust::String_::fromString($0)" let v77 : string = Fable.Core.RustInterop.emitRustExpr v75 v76 let _v19 = v77 #endif #if FABLE_COMPILER_RUST && CONTRACT let v78 : string = "inline_colorization::color_bright_black" let v79 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v78 let v80 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v81 : string = "&*$0" let v82 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v5 v81 let _v80 = v82 #endif #if FABLE_COMPILER_RUST && WASM let v83 : string = "&*$0" let v84 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v5 v83 let _v80 = v84 #endif #if FABLE_COMPILER_RUST && CONTRACT let v85 : string = "&*$0" let v86 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v5 v85 let _v80 = v86 #endif #if FABLE_COMPILER_TYPESCRIPT let v87 : Ref<Str> = v5 |> unbox<Ref<Str>> let _v80 = v87 #endif #if FABLE_COMPILER_PYTHON let v90 : Ref<Str> = v5 |> unbox<Ref<Str>> let _v80 = v90 #endif #else let v93 : Ref<Str> = v5 |> unbox<Ref<Str>> let _v80 = v93 #endif let v96 : Ref<Str> = _v80 let v101 : string = "inline_colorization::color_reset" let v102 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v101 let v103 : string = $"format!(\"{{}}{{}}{{}}\", $0, $1, $2)" let v104 : std_string_String = Fable.Core.RustInterop.emitRustExpr struct (v79, v96, v102) v103 let v105 : string = "fable_library_rust::String_::fromString($0)" let v106 : string = Fable.Core.RustInterop.emitRustExpr v104 v105 let _v19 = v106 #endif #if FABLE_COMPILER_TYPESCRIPT let v107 : string = "\u001b[90m" let v108 : string = method11() let v109 : string = v107 + v5 let v110 : string = v109 + v108 let _v19 = v110 #endif #if FABLE_COMPILER_PYTHON let v111 : string = "\u001b[90m" let v112 : string = method11() let v113 : string = v111 + v5 let v114 : string = v113 + v112 let _v19 = v114 #endif #else let v115 : string = "\u001b[90m" let v116 : string = method11() let v117 : string = v115 + v5 let v118 : string = v117 + v116 let _v19 = v118 #endif let v119 : string = _v19 v119 and method13 () : string = let v0 : string = "" v0 and closure7 (v0 : Mut3, v1 : string) () : unit = let v2 : string = v0.l0 let v3 : string = v2 + v1 v0.l0 <- v3 () and method12 (v0 : int32, v1 : string) : string = let v2 : string = method13() let v3 : Mut3 = {l0 = v2} : Mut3 let v4 : string = "{ " let v5 : string = $"{v4}" let v8 : unit = () let v9 : (unit -> unit) = closure7(v3, v5) let v10 : unit = (fun () -> v9 (); v8) () let v13 : string = "port" let v14 : string = $"{v13}" let v17 : unit = () let v18 : (unit -> unit) = closure7(v3, v14) let v19 : unit = (fun () -> v18 (); v17) () let v22 : string = " = " let v23 : string = $"{v22}" let v26 : unit = () let v27 : (unit -> unit) = closure7(v3, v23) let v28 : unit = (fun () -> v27 (); v26) () let v31 : string = $"{v0}" let v34 : unit = () let v35 : (unit -> unit) = closure7(v3, v31) let v36 : unit = (fun () -> v35 (); v34) () let v39 : string = "; " let v40 : string = $"{v39}" let v43 : unit = () let v44 : (unit -> unit) = closure7(v3, v40) let v45 : unit = (fun () -> v44 (); v43) () let v48 : string = "ex" let v49 : string = $"{v48}" let v52 : unit = () let v53 : (unit -> unit) = closure7(v3, v49) let v54 : unit = (fun () -> v53 (); v52) () let v57 : string = $"{v22}" let v60 : unit = () let v61 : (unit -> unit) = closure7(v3, v57) let v62 : unit = (fun () -> v61 (); v60) () let v65 : string = $"{v1}" let v68 : unit = () let v69 : (unit -> unit) = closure7(v3, v65) let v70 : unit = (fun () -> v69 (); v68) () let v73 : string = " }" let v74 : string = $"{v73}" let v77 : unit = () let v78 : (unit -> unit) = closure7(v3, v74) let v79 : unit = (fun () -> v78 (); v77) () let v82 : string = v3.l0 v82 and method14 (v0 : string, v1 : string, v2 : string, v3 : int64, v4 : string) : string = let v5 : string = $"{v0} {v1} #{v3} %s{v2} / {v4}" let v8 : char list = [] let v9 : (char list -> (char [])) = List.toArray let v10 : (char []) = v9 v8 let v13 : string = v5.TrimStart v10 let v31 : char list = [] let v32 : char list = '/' :: v31 let v35 : char list = ' ' :: v32 let v38 : (char list -> (char [])) = List.toArray let v39 : (char []) = v38 v35 let v42 : string = v13.TrimEnd v39 v42 and closure8 (v0 : Mut0) () : unit = let v1 : int64 = v0.l0 let v2 : int64 = v1 + 1L v0.l0 <- v2 () and closure10 (v0 : string) () : unit = let v1 : (string -> unit) = System.Console.WriteLine v1 v0 and closure9 () (v0 : string) : unit = let v1 : unit = () let v2 : (unit -> unit) = closure10(v0) let v3 : unit = (fun () -> v2 (); v1) () () and method15 (v0 : string, v1 : Mut0, v2 : Mut1, v3 : Mut2, v4 : Mut3, v5 : Mut4, v6 : int64 option) : unit = let v7 : unit = () let v8 : (unit -> unit) = closure8(v1) let v9 : unit = (fun () -> v8 (); v7) () let v12 : (string -> unit) = closure9() let v13 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v14 : string = @"println!(""{}"", $0)" Fable.Core.RustInterop.emitRustExpr v0 v14 let _v13 = () #endif #if FABLE_COMPILER_RUST && WASM let v15 : string = @"println!(""{}"", $0)" Fable.Core.RustInterop.emitRustExpr v0 v15 let _v13 = () #endif #if FABLE_COMPILER_RUST && CONTRACT let v16 : string = v4.l0 let v17 : bool = v16 = "" let v25 : string = if v17 then v0 else let v18 : bool = v0 = "" if v18 then let v19 : string = v4.l0 v19 else let v20 : string = v4.l0 let v21 : string = "\n" let v22 : string = v20 + v21 let v23 : string = v22 + v0 v23 let v26 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v27 : string = "&*$0" let v28 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v25 v27 let _v26 = v28 #endif #if FABLE_COMPILER_RUST && WASM let v29 : string = "&*$0" let v30 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v25 v29 let _v26 = v30 #endif #if FABLE_COMPILER_RUST && CONTRACT let v31 : string = "&*$0" let v32 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v25 v31 let _v26 = v32 #endif #if FABLE_COMPILER_TYPESCRIPT let v33 : Ref<Str> = v25 |> unbox<Ref<Str>> let _v26 = v33 #endif #if FABLE_COMPILER_PYTHON let v36 : Ref<Str> = v25 |> unbox<Ref<Str>> let _v26 = v36 #endif #else let v39 : Ref<Str> = v25 |> unbox<Ref<Str>> let _v26 = v39 #endif let v42 : Ref<Str> = _v26 let v47 : string = $"$0.chars()" let v48 : Mut<_> = Fable.Core.RustInterop.emitRustExpr v42 v47 let v49 : string = "$0" let v50 : _ = Fable.Core.RustInterop.emitRustExpr v48 v49 let v51 : string = "$0.collect::<Vec<_>>()" let v52 : Vec<char> = Fable.Core.RustInterop.emitRustExpr v50 v51 let v53 : string = "$0.chunks(15000).map(|x| x.into_iter().map(|x| x.clone()).collect::<Vec<_>>()).collect::<Vec<_>>()" let v54 : Vec<Vec<char>> = Fable.Core.RustInterop.emitRustExpr v52 v53 let v55 : string = "true; let _vec_map : Vec<_> = $0.into_iter().map(|x| { //" let v56 : bool = Fable.Core.RustInterop.emitRustExpr v54 v55 let v57 : string = "x" let v58 : Vec<char> = Fable.Core.RustInterop.emitRustExpr () v57 let v59 : string = "String::from_iter($0)" let v60 : std_string_String = Fable.Core.RustInterop.emitRustExpr v58 v59 let v61 : string = "true; $0 }).collect::<Vec<_>>()" let v62 : bool = Fable.Core.RustInterop.emitRustExpr v60 v61 let v63 : string = "_vec_map" let v64 : Vec<std_string_String> = Fable.Core.RustInterop.emitRustExpr () v63 let v65 : string = "$0.len()" let v66 : unativeint = Fable.Core.RustInterop.emitRustExpr v64 v65 let v67 : (unativeint -> int32) = int32 let v68 : int32 = v67 v66 let v69 : string = "" let v70 : bool = v0 <> v69 let v74 : bool = if v70 then let v73 : bool = v68 <= 1 v73 else false if v74 then v4.l0 <- v25 () else v4.l0 <- v69 let v75 : string = "true; $0.into_iter().for_each(|x| { //" let v76 : bool = Fable.Core.RustInterop.emitRustExpr v64 v75 let v77 : string = "x" let v78 : std_string_String = Fable.Core.RustInterop.emitRustExpr () v77 let v79 : string = $"true; near_sdk::log!(\"{{}}\", $0)" let v80 : bool = Fable.Core.RustInterop.emitRustExpr v78 v79 let v81 : string = $"true" let v82 : bool = Fable.Core.RustInterop.emitRustExpr () v81 let v83 : string = "true; }); //" let v84 : bool = Fable.Core.RustInterop.emitRustExpr () v83 () let _v13 = () #endif #if FABLE_COMPILER_TYPESCRIPT v12 v0 let _v13 = () #endif #if FABLE_COMPILER_PYTHON v12 v0 let _v13 = () #endif #else v12 v0 let _v13 = () #endif _v13 let v85 : (string -> unit) = v2.l0 v85 v0 and closure5 (v0 : int32, v1 : string) () : unit = let v2 : unit = () let v3 : (unit -> unit) = closure0() let v4 : unit = (fun () -> v3 (); v2) () let struct (v18 : Mut0, v19 : Mut1, v20 : Mut2, v21 : Mut3, v22 : Mut4, v23 : int64 option) = TraceState.trace_state.Value let v36 : US0 = v22.l0 let v37 : bool = v20.l0 let v38 : bool = v37 = false let v41 : bool = if v38 then false else let v39 : int32 = [ US0_0, 0; US0_1, 1; US0_2, 2; US0_3, 3; US0_4, 4 ] |> Map |> Map.find v36 let v40 : bool = 0 >= v39 v40 if v41 then let v42 : unit = () let v43 : unit = (fun () -> v3 (); v42) () let struct (v57 : Mut0, v58 : Mut1, v59 : Mut2, v60 : Mut3, v61 : Mut4, v62 : int64 option) = TraceState.trace_state.Value let v75 : string = method6(v57, v58, v59, v60, v61, v62) let v76 : string = method10() let v77 : string = $"networking.test_port_open" let v78 : bool = v77 = "" let v83 : string = if v78 then let v79 : string = "" v79 else let v80 : int64 = v57.l0 let v81 : string = method12(v0, v1) method14(v75, v76, v77, v80, v81) let v84 : unit = () let v85 : unit = (fun () -> v3 (); v84) () let struct (v99 : Mut0, v100 : Mut1, v101 : Mut2, v102 : Mut3, v103 : Mut4, v104 : int64 option) = TraceState.trace_state.Value method15(v83, v99, v100, v101, v102, v103, v104) and closure4 (v0 : string) (v1 : int32) : Async<bool> = let v2 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v3 : Async<bool> = null |> unbox<Async<bool>> let _v2 = v3 #endif #if FABLE_COMPILER_RUST && WASM let v6 : Async<bool> = null |> unbox<Async<bool>> let _v2 = v6 #endif #if FABLE_COMPILER_RUST && CONTRACT let v9 : Async<bool> = null |> unbox<Async<bool>> let _v2 = v9 #endif #if FABLE_COMPILER_TYPESCRIPT let v12 : Async<bool> = null |> unbox<Async<bool>> let _v2 = v12 #endif #if FABLE_COMPILER_PYTHON let v15 : Async<bool> = null |> unbox<Async<bool>> let _v2 = v15 #endif #else let v18 : Async<bool> option = None let mutable _v18 = v18 async { let v19 : Async<System.Threading.CancellationToken> = Async.CancellationToken let! v19 = v19 let v20 : System.Threading.CancellationToken = v19 let v21 : System.Net.Sockets.TcpClient = new System.Net.Sockets.TcpClient () use v21 = v21 let v22 : System.Net.Sockets.TcpClient = v21 try let v23 : System.Threading.Tasks.ValueTask = v22.ConnectAsync (v0, v1, v20) let v24 : (unit -> System.Threading.Tasks.Task) = v23.AsTask let v25 : System.Threading.Tasks.Task = v24 () let v26 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v27 : Async<unit> = null |> unbox<Async<unit>> let _v26 = v27 #endif #if FABLE_COMPILER_RUST && WASM let v30 : Async<unit> = null |> unbox<Async<unit>> let _v26 = v30 #endif #if FABLE_COMPILER_RUST && CONTRACT let v33 : Async<unit> = null |> unbox<Async<unit>> let _v26 = v33 #endif #if FABLE_COMPILER_TYPESCRIPT let v36 : Async<unit> = null |> unbox<Async<unit>> let _v26 = v36 #endif #if FABLE_COMPILER_PYTHON let v39 : Async<unit> = null |> unbox<Async<unit>> let _v26 = v39 #endif #else let v42 : (System.Threading.Tasks.Task -> Async<unit>) = Async.AwaitTask let v43 : Async<unit> = v42 v25 let _v26 = v43 #endif let v44 : Async<unit> = _v26 do! v44 return true with ex -> let v49 : exn = ex let v50 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v51 : string = $"%A{v49}" let _v50 = v51 #endif #if FABLE_COMPILER_RUST && WASM let v54 : string = $"%A{v49}" let _v50 = v54 #endif #if FABLE_COMPILER_RUST && CONTRACT let v57 : string = $"%A{v49}" let _v50 = v57 #endif #if FABLE_COMPILER_TYPESCRIPT let v60 : string = $"%A{v49}" let _v50 = v60 #endif #if FABLE_COMPILER_PYTHON let v63 : string = $"%A{v49}" let _v50 = v63 #endif #else let v66 : string = $"{v49.GetType ()}: {v49.Message}" let _v50 = v66 #endif let v67 : string = _v50 let v72 : unit = () let v73 : (unit -> unit) = closure5(v1, v67) let v74 : unit = (fun () -> v73 (); v72) () return false (* let v190 : bool = *) } |> fun x -> _v18 <- Some x let v191 : Async<bool> = match _v18 with Some x -> x | None -> failwith "async.new_async_unit / _v18=None" let _v2 = v191 #endif let v192 : Async<bool> = _v2 v192 and closure3 () (v0 : string) : (int32 -> Async<bool>) = closure4(v0) and closure14 () (v0 : bool) : US5 = US5_0(v0) and closure15 () (v0 : exn) : US5 = US5_1(v0) and method16 (v0 : int32) : string = let v1 : string = method13() let v2 : Mut3 = {l0 = v1} : Mut3 let v3 : string = "{ " let v4 : string = $"{v3}" let v7 : unit = () let v8 : (unit -> unit) = closure7(v2, v4) let v9 : unit = (fun () -> v8 (); v7) () let v12 : string = "timeout" let v13 : string = $"{v12}" let v16 : unit = () let v17 : (unit -> unit) = closure7(v2, v13) let v18 : unit = (fun () -> v17 (); v16) () let v21 : string = " = " let v22 : string = $"{v21}" let v25 : unit = () let v26 : (unit -> unit) = closure7(v2, v22) let v27 : unit = (fun () -> v26 (); v25) () let v30 : string = $"{v0}" let v33 : unit = () let v34 : (unit -> unit) = closure7(v2, v30) let v35 : unit = (fun () -> v34 (); v33) () let v38 : string = " }" let v39 : string = $"{v38}" let v42 : unit = () let v43 : (unit -> unit) = closure7(v2, v39) let v44 : unit = (fun () -> v43 (); v42) () let v47 : string = v2.l0 v47 and closure16 (v0 : int32) () : unit = let v1 : unit = () let v2 : (unit -> unit) = closure0() let v3 : unit = (fun () -> v2 (); v1) () let struct (v17 : Mut0, v18 : Mut1, v19 : Mut2, v20 : Mut3, v21 : Mut4, v22 : int64 option) = TraceState.trace_state.Value let v35 : US0 = v21.l0 let v36 : bool = v19.l0 let v37 : bool = v36 = false let v40 : bool = if v37 then false else let v38 : int32 = [ US0_0, 0; US0_1, 1; US0_2, 2; US0_3, 3; US0_4, 4 ] |> Map |> Map.find v35 let v39 : bool = 0 >= v38 v39 if v40 then let v41 : unit = () let v42 : unit = (fun () -> v2 (); v41) () let struct (v56 : Mut0, v57 : Mut1, v58 : Mut2, v59 : Mut3, v60 : Mut4, v61 : int64 option) = TraceState.trace_state.Value let v74 : string = method6(v56, v57, v58, v59, v60, v61) let v75 : string = method10() let v76 : string = "async.run_with_timeout_async" let v77 : bool = v76 = "" let v82 : string = if v77 then let v78 : string = "" v78 else let v79 : int64 = v56.l0 let v80 : string = method16(v0) method14(v74, v75, v76, v79, v80) let v83 : unit = () let v84 : unit = (fun () -> v2 (); v83) () let struct (v98 : Mut0, v99 : Mut1, v100 : Mut2, v101 : Mut3, v102 : Mut4, v103 : int64 option) = TraceState.trace_state.Value method15(v82, v98, v99, v100, v101, v102, v103) and method17 () : string = let v0 : string = "Critical" let v1 : (unit -> string) = v0.ToLower let v2 : string = v1 () let v5 : string = v2.PadLeft (7, ' ') let v19 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v20 : string = "inline_colorization::color_bright_red" let v21 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v20 let v22 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v23 : string = "&*$0" let v24 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v5 v23 let _v22 = v24 #endif #if FABLE_COMPILER_RUST && WASM let v25 : string = "&*$0" let v26 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v5 v25 let _v22 = v26 #endif #if FABLE_COMPILER_RUST && CONTRACT let v27 : string = "&*$0" let v28 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v5 v27 let _v22 = v28 #endif #if FABLE_COMPILER_TYPESCRIPT let v29 : Ref<Str> = v5 |> unbox<Ref<Str>> let _v22 = v29 #endif #if FABLE_COMPILER_PYTHON let v32 : Ref<Str> = v5 |> unbox<Ref<Str>> let _v22 = v32 #endif #else let v35 : Ref<Str> = v5 |> unbox<Ref<Str>> let _v22 = v35 #endif let v38 : Ref<Str> = _v22 let v43 : string = "inline_colorization::color_reset" let v44 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v43 let v45 : string = $"format!(\"{{}}{{}}{{}}\", $0, $1, $2)" let v46 : std_string_String = Fable.Core.RustInterop.emitRustExpr struct (v21, v38, v44) v45 let v47 : string = "fable_library_rust::String_::fromString($0)" let v48 : string = Fable.Core.RustInterop.emitRustExpr v46 v47 let _v19 = v48 #endif #if FABLE_COMPILER_RUST && WASM let v49 : string = "inline_colorization::color_bright_red" let v50 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v49 let v51 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v52 : string = "&*$0" let v53 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v5 v52 let _v51 = v53 #endif #if FABLE_COMPILER_RUST && WASM let v54 : string = "&*$0" let v55 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v5 v54 let _v51 = v55 #endif #if FABLE_COMPILER_RUST && CONTRACT let v56 : string = "&*$0" let v57 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v5 v56 let _v51 = v57 #endif #if FABLE_COMPILER_TYPESCRIPT let v58 : Ref<Str> = v5 |> unbox<Ref<Str>> let _v51 = v58 #endif #if FABLE_COMPILER_PYTHON let v61 : Ref<Str> = v5 |> unbox<Ref<Str>> let _v51 = v61 #endif #else let v64 : Ref<Str> = v5 |> unbox<Ref<Str>> let _v51 = v64 #endif let v67 : Ref<Str> = _v51 let v72 : string = "inline_colorization::color_reset" let v73 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v72 let v74 : string = $"format!(\"{{}}{{}}{{}}\", $0, $1, $2)" let v75 : std_string_String = Fable.Core.RustInterop.emitRustExpr struct (v50, v67, v73) v74 let v76 : string = "fable_library_rust::String_::fromString($0)" let v77 : string = Fable.Core.RustInterop.emitRustExpr v75 v76 let _v19 = v77 #endif #if FABLE_COMPILER_RUST && CONTRACT let v78 : string = "inline_colorization::color_bright_red" let v79 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v78 let v80 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v81 : string = "&*$0" let v82 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v5 v81 let _v80 = v82 #endif #if FABLE_COMPILER_RUST && WASM let v83 : string = "&*$0" let v84 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v5 v83 let _v80 = v84 #endif #if FABLE_COMPILER_RUST && CONTRACT let v85 : string = "&*$0" let v86 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v5 v85 let _v80 = v86 #endif #if FABLE_COMPILER_TYPESCRIPT let v87 : Ref<Str> = v5 |> unbox<Ref<Str>> let _v80 = v87 #endif #if FABLE_COMPILER_PYTHON let v90 : Ref<Str> = v5 |> unbox<Ref<Str>> let _v80 = v90 #endif #else let v93 : Ref<Str> = v5 |> unbox<Ref<Str>> let _v80 = v93 #endif let v96 : Ref<Str> = _v80 let v101 : string = "inline_colorization::color_reset" let v102 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v101 let v103 : string = $"format!(\"{{}}{{}}{{}}\", $0, $1, $2)" let v104 : std_string_String = Fable.Core.RustInterop.emitRustExpr struct (v79, v96, v102) v103 let v105 : string = "fable_library_rust::String_::fromString($0)" let v106 : string = Fable.Core.RustInterop.emitRustExpr v104 v105 let _v19 = v106 #endif #if FABLE_COMPILER_TYPESCRIPT let v107 : string = "\u001b[91m" let v108 : string = method11() let v109 : string = v107 + v5 let v110 : string = v109 + v108 let _v19 = v110 #endif #if FABLE_COMPILER_PYTHON let v111 : string = "\u001b[91m" let v112 : string = method11() let v113 : string = v111 + v5 let v114 : string = v113 + v112 let _v19 = v114 #endif #else let v115 : string = "\u001b[91m" let v116 : string = method11() let v117 : string = v115 + v5 let v118 : string = v117 + v116 let _v19 = v118 #endif let v119 : string = _v19 v119 and method18 (v0 : int32, v1 : string) : string = let v2 : string = method13() let v3 : Mut3 = {l0 = v2} : Mut3 let v4 : string = "{ " let v5 : string = $"{v4}" let v8 : unit = () let v9 : (unit -> unit) = closure7(v3, v5) let v10 : unit = (fun () -> v9 (); v8) () let v13 : string = "timeout" let v14 : string = $"{v13}" let v17 : unit = () let v18 : (unit -> unit) = closure7(v3, v14) let v19 : unit = (fun () -> v18 (); v17) () let v22 : string = " = " let v23 : string = $"{v22}" let v26 : unit = () let v27 : (unit -> unit) = closure7(v3, v23) let v28 : unit = (fun () -> v27 (); v26) () let v31 : string = $"{v0}" let v34 : unit = () let v35 : (unit -> unit) = closure7(v3, v31) let v36 : unit = (fun () -> v35 (); v34) () let v39 : string = "; " let v40 : string = $"{v39}" let v43 : unit = () let v44 : (unit -> unit) = closure7(v3, v40) let v45 : unit = (fun () -> v44 (); v43) () let v48 : string = "ex" let v49 : string = $"{v48}" let v52 : unit = () let v53 : (unit -> unit) = closure7(v3, v49) let v54 : unit = (fun () -> v53 (); v52) () let v57 : string = $"{v22}" let v60 : unit = () let v61 : (unit -> unit) = closure7(v3, v57) let v62 : unit = (fun () -> v61 (); v60) () let v65 : string = $"{v1}" let v68 : unit = () let v69 : (unit -> unit) = closure7(v3, v65) let v70 : unit = (fun () -> v69 (); v68) () let v73 : string = " }" let v74 : string = $"{v73}" let v77 : unit = () let v78 : (unit -> unit) = closure7(v3, v74) let v79 : unit = (fun () -> v78 (); v77) () let v82 : string = v3.l0 v82 and closure17 (v0 : int32, v1 : exn) () : unit = let v2 : unit = () let v3 : (unit -> unit) = closure0() let v4 : unit = (fun () -> v3 (); v2) () let struct (v18 : Mut0, v19 : Mut1, v20 : Mut2, v21 : Mut3, v22 : Mut4, v23 : int64 option) = TraceState.trace_state.Value let v36 : US0 = v22.l0 let v37 : bool = v20.l0 let v38 : bool = v37 = false let v41 : bool = if v38 then false else let v39 : int32 = [ US0_0, 0; US0_1, 1; US0_2, 2; US0_3, 3; US0_4, 4 ] |> Map |> Map.find v36 let v40 : bool = 4 >= v39 v40 if v41 then let v42 : unit = () let v43 : unit = (fun () -> v3 (); v42) () let struct (v57 : Mut0, v58 : Mut1, v59 : Mut2, v60 : Mut3, v61 : Mut4, v62 : int64 option) = TraceState.trace_state.Value let v75 : string = method6(v57, v58, v59, v60, v61, v62) let v76 : string = method17() let v77 : string = $"async.run_with_timeout_async**" let v78 : bool = v77 = "" let v105 : string = if v78 then let v79 : string = "" v79 else let v80 : int64 = v57.l0 let v81 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v82 : string = $"%A{v1}" let _v81 = v82 #endif #if FABLE_COMPILER_RUST && WASM let v85 : string = $"%A{v1}" let _v81 = v85 #endif #if FABLE_COMPILER_RUST && CONTRACT let v88 : string = $"%A{v1}" let _v81 = v88 #endif #if FABLE_COMPILER_TYPESCRIPT let v91 : string = $"%A{v1}" let _v81 = v91 #endif #if FABLE_COMPILER_PYTHON let v94 : string = $"%A{v1}" let _v81 = v94 #endif #else let v97 : string = $"{v1.GetType ()}: {v1.Message}" let _v81 = v97 #endif let v98 : string = _v81 let v103 : string = method18(v0, v98) method14(v75, v76, v77, v80, v103) let v106 : unit = () let v107 : unit = (fun () -> v3 (); v106) () let struct (v121 : Mut0, v122 : Mut1, v123 : Mut2, v124 : Mut3, v125 : Mut4, v126 : int64 option) = TraceState.trace_state.Value method15(v105, v121, v122, v123, v124, v125, v126) and closure13 (v0 : int32, v1 : string) (v2 : int32) : Async<bool> = let v3 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v4 : Async<bool> = null |> unbox<Async<bool>> let _v3 = v4 #endif #if FABLE_COMPILER_RUST && WASM let v7 : Async<bool> = null |> unbox<Async<bool>> let _v3 = v7 #endif #if FABLE_COMPILER_RUST && CONTRACT let v10 : Async<bool> = null |> unbox<Async<bool>> let _v3 = v10 #endif #if FABLE_COMPILER_TYPESCRIPT let v13 : Async<bool> = null |> unbox<Async<bool>> let _v3 = v13 #endif #if FABLE_COMPILER_PYTHON let v16 : Async<bool> = null |> unbox<Async<bool>> let _v3 = v16 #endif #else let v19 : Async<bool> option = None let mutable _v19 = v19 async { let v20 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v21 : Async<bool> = null |> unbox<Async<bool>> let _v20 = v21 #endif #if FABLE_COMPILER_RUST && WASM let v24 : Async<bool> = null |> unbox<Async<bool>> let _v20 = v24 #endif #if FABLE_COMPILER_RUST && CONTRACT let v27 : Async<bool> = null |> unbox<Async<bool>> let _v20 = v27 #endif #if FABLE_COMPILER_TYPESCRIPT let v30 : Async<bool> = null |> unbox<Async<bool>> let _v20 = v30 #endif #if FABLE_COMPILER_PYTHON let v33 : Async<bool> = null |> unbox<Async<bool>> let _v20 = v33 #endif #else let v36 : Async<bool> option = None let mutable _v36 = v36 async { let v37 : Async<System.Threading.CancellationToken> = Async.CancellationToken let! v37 = v37 let v38 : System.Threading.CancellationToken = v37 let v39 : System.Net.Sockets.TcpClient = new System.Net.Sockets.TcpClient () use v39 = v39 let v40 : System.Net.Sockets.TcpClient = v39 try let v41 : System.Threading.Tasks.ValueTask = v40.ConnectAsync (v1, v2, v38) let v42 : (unit -> System.Threading.Tasks.Task) = v41.AsTask let v43 : System.Threading.Tasks.Task = v42 () let v44 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v45 : Async<unit> = null |> unbox<Async<unit>> let _v44 = v45 #endif #if FABLE_COMPILER_RUST && WASM let v48 : Async<unit> = null |> unbox<Async<unit>> let _v44 = v48 #endif #if FABLE_COMPILER_RUST && CONTRACT let v51 : Async<unit> = null |> unbox<Async<unit>> let _v44 = v51 #endif #if FABLE_COMPILER_TYPESCRIPT let v54 : Async<unit> = null |> unbox<Async<unit>> let _v44 = v54 #endif #if FABLE_COMPILER_PYTHON let v57 : Async<unit> = null |> unbox<Async<unit>> let _v44 = v57 #endif #else let v60 : (System.Threading.Tasks.Task -> Async<unit>) = Async.AwaitTask let v61 : Async<unit> = v60 v43 let _v44 = v61 #endif let v62 : Async<unit> = _v44 do! v62 return true with ex -> let v67 : exn = ex let v68 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v69 : string = $"%A{v67}" let _v68 = v69 #endif #if FABLE_COMPILER_RUST && WASM let v72 : string = $"%A{v67}" let _v68 = v72 #endif #if FABLE_COMPILER_RUST && CONTRACT let v75 : string = $"%A{v67}" let _v68 = v75 #endif #if FABLE_COMPILER_TYPESCRIPT let v78 : string = $"%A{v67}" let _v68 = v78 #endif #if FABLE_COMPILER_PYTHON let v81 : string = $"%A{v67}" let _v68 = v81 #endif #else let v84 : string = $"{v67.GetType ()}: {v67.Message}" let _v68 = v84 #endif let v85 : string = _v68 let v90 : unit = () let v91 : (unit -> unit) = closure5(v2, v85) let v92 : unit = (fun () -> v91 (); v90) () return false (* let v208 : bool = *) } |> fun x -> _v36 <- Some x let v209 : Async<bool> = match _v36 with Some x -> x | None -> failwith "async.new_async_unit / _v36=None" let _v20 = v209 #endif let v210 : Async<bool> = _v20 let v215 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v216 : Async<US4> = null |> unbox<Async<US4>> let _v215 = v216 #endif #if FABLE_COMPILER_RUST && WASM let v219 : Async<US4> = null |> unbox<Async<US4>> let _v215 = v219 #endif #if FABLE_COMPILER_RUST && CONTRACT let v222 : Async<US4> = null |> unbox<Async<US4>> let _v215 = v222 #endif #if FABLE_COMPILER_TYPESCRIPT let v225 : Async<US4> = null |> unbox<Async<US4>> let _v215 = v225 #endif #if FABLE_COMPILER_PYTHON let v228 : Async<US4> = null |> unbox<Async<US4>> let _v215 = v228 #endif #else let v231 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v232 : Async<US4> = null |> unbox<Async<US4>> let _v231 = v232 #endif #if FABLE_COMPILER_RUST && WASM let v235 : Async<US4> = null |> unbox<Async<US4>> let _v231 = v235 #endif #if FABLE_COMPILER_RUST && CONTRACT let v238 : Async<US4> = null |> unbox<Async<US4>> let _v231 = v238 #endif #if FABLE_COMPILER_TYPESCRIPT let v241 : Async<US4> = null |> unbox<Async<US4>> let _v231 = v241 #endif #if FABLE_COMPILER_PYTHON let v244 : Async<US4> = null |> unbox<Async<US4>> let _v231 = v244 #endif #else let v247 : Async<US4> option = None let mutable _v247 = v247 async { let v248 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v249 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>> let _v248 = v249 #endif #if FABLE_COMPILER_RUST && WASM let v252 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>> let _v248 = v252 #endif #if FABLE_COMPILER_RUST && CONTRACT let v255 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>> let _v248 = v255 #endif #if FABLE_COMPILER_TYPESCRIPT let v258 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>> let _v248 = v258 #endif #if FABLE_COMPILER_PYTHON let v261 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>> let _v248 = v261 #endif #else let v264 : Async<Async<bool>> = Async.StartChild (v210, v0) let _v248 = v264 #endif let v265 : Async<Async<bool>> = _v248 let! v265 = v265 let v270 : Async<bool> = v265 let v271 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v272 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>> let _v271 = v272 #endif #if FABLE_COMPILER_RUST && WASM let v275 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>> let _v271 = v275 #endif #if FABLE_COMPILER_RUST && CONTRACT let v278 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>> let _v271 = v278 #endif #if FABLE_COMPILER_TYPESCRIPT let v281 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>> let _v271 = v281 #endif #if FABLE_COMPILER_PYTHON let v284 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>> let _v271 = v284 #endif #else let v287 : (Async<bool> -> Async<Choice<bool, exn>>) = Async.Catch let v288 : Async<Choice<bool, exn>> = v287 v270 let _v271 = v288 #endif let v289 : Async<Choice<bool, exn>> = _v271 let v294 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v295 : Async<US5> = null |> unbox<Async<US5>> let _v294 = v295 #endif #if FABLE_COMPILER_RUST && WASM let v298 : Async<US5> = null |> unbox<Async<US5>> let _v294 = v298 #endif #if FABLE_COMPILER_RUST && CONTRACT let v301 : Async<US5> = null |> unbox<Async<US5>> let _v294 = v301 #endif #if FABLE_COMPILER_TYPESCRIPT let v304 : Async<US5> = null |> unbox<Async<US5>> let _v294 = v304 #endif #if FABLE_COMPILER_PYTHON let v307 : Async<US5> = null |> unbox<Async<US5>> let _v294 = v307 #endif #else let v310 : Async<US5> option = None let mutable _v310 = v310 async { let! v289 = v289 let v311 : Choice<bool, exn> = v289 let v312 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v313 : US5 = null |> unbox<US5> let _v312 = v313 #endif #if FABLE_COMPILER_RUST && WASM let v316 : US5 = null |> unbox<US5> let _v312 = v316 #endif #if FABLE_COMPILER_RUST && CONTRACT let v319 : US5 = null |> unbox<US5> let _v312 = v319 #endif #if FABLE_COMPILER_TYPESCRIPT let v322 : US5 = null |> unbox<US5> let _v312 = v322 #endif #if FABLE_COMPILER_PYTHON let v325 : US5 = null |> unbox<US5> let _v312 = v325 #endif #else let v328 : (bool -> US5) = closure14() let v329 : (exn -> US5) = closure15() let v330 : US5 = match v311 with Choice1Of2 x -> v328 x | Choice2Of2 x -> v329 x let _v312 = v330 #endif let v331 : US5 = _v312 return v331 } |> fun x -> _v310 <- Some x let v336 : Async<US5> = match _v310 with Some x -> x | None -> failwith "async.new_async_unit / _v310=None" let _v294 = v336 #endif let v337 : Async<US5> = _v294 let v342 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v343 : Async<US6> = null |> unbox<Async<US6>> let _v342 = v343 #endif #if FABLE_COMPILER_RUST && WASM let v346 : Async<US6> = null |> unbox<Async<US6>> let _v342 = v346 #endif #if FABLE_COMPILER_RUST && CONTRACT let v349 : Async<US6> = null |> unbox<Async<US6>> let _v342 = v349 #endif #if FABLE_COMPILER_TYPESCRIPT let v352 : Async<US6> = null |> unbox<Async<US6>> let _v342 = v352 #endif #if FABLE_COMPILER_PYTHON let v355 : Async<US6> = null |> unbox<Async<US6>> let _v342 = v355 #endif #else let v358 : Async<US6> option = None let mutable _v358 = v358 async { let! v337 = v337 let v359 : US5 = v337 let v365 : US6 = match v359 with | US5_0(v360) -> (* C1of2 *) US6_0(v360) | US5_1(v362) -> (* C2of2 *) US6_1(v362) return v365 } |> fun x -> _v358 <- Some x let v366 : Async<US6> = match _v358 with Some x -> x | None -> failwith "async.new_async_unit / _v358=None" let _v342 = v366 #endif let v367 : Async<US6> = _v342 let v372 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v373 : Async<US4> = null |> unbox<Async<US4>> let _v372 = v373 #endif #if FABLE_COMPILER_RUST && WASM let v376 : Async<US4> = null |> unbox<Async<US4>> let _v372 = v376 #endif #if FABLE_COMPILER_RUST && CONTRACT let v379 : Async<US4> = null |> unbox<Async<US4>> let _v372 = v379 #endif #if FABLE_COMPILER_TYPESCRIPT let v382 : Async<US4> = null |> unbox<Async<US4>> let _v372 = v382 #endif #if FABLE_COMPILER_PYTHON let v385 : Async<US4> = null |> unbox<Async<US4>> let _v372 = v385 #endif #else let v388 : Async<US4> option = None let mutable _v388 = v388 async { let! v367 = v367 let v389 : US6 = v367 let v662 : US4 = match v389 with | US6_1(v392) -> (* Error *) let v393 : string = $"%A{v392}" let v396 : string = "System.TimeoutException" let v397 : bool = v393.Contains v396 if v397 then let v400 : unit = () let v401 : (unit -> unit) = closure16(v0) let v402 : unit = (fun () -> v401 (); v400) () US4_1 else let v519 : unit = () let v520 : (unit -> unit) = closure17(v0, v392) let v521 : unit = (fun () -> v520 (); v519) () US4_1 | US6_0(v390) -> (* Ok *) US4_0(v390) return v662 } |> fun x -> _v388 <- Some x let v663 : Async<US4> = match _v388 with Some x -> x | None -> failwith "async.new_async_unit / _v388=None" let _v372 = v663 #endif let v664 : Async<US4> = _v372 return! v664 } |> fun x -> _v247 <- Some x let v669 : Async<US4> = match _v247 with Some x -> x | None -> failwith "async.new_async_unit / _v247=None" let _v231 = v669 #endif let v670 : Async<US4> = _v231 let _v215 = v670 #endif let v675 : Async<US4> = _v215 let! v675 = v675 let v680 : US4 = v675 let v683 : bool = match v680 with | US4_1 -> (* None *) false | US4_0(v681) -> (* Some *) v681 return v683 } |> fun x -> _v19 <- Some x let v684 : Async<bool> = match _v19 with Some x -> x | None -> failwith "async.new_async_unit / _v19=None" let _v3 = v684 #endif let v685 : Async<bool> = _v3 v685 and closure12 (v0 : int32) (v1 : string) : (int32 -> Async<bool>) = closure13(v0, v1) and closure11 () (v0 : int32) : (string -> (int32 -> Async<bool>)) = closure12(v0) and closure22 () (v0 : int32) : US7 = US7_0(v0) and method20 () : (int32 -> US7) = closure22() and method21 (v0 : int32, v1 : int64, v2 : int32 option, v3 : bool) : string = let v4 : string = method13() let v5 : Mut3 = {l0 = v4} : Mut3 let v6 : string = "{ " let v7 : string = $"{v6}" let v10 : unit = () let v11 : (unit -> unit) = closure7(v5, v7) let v12 : unit = (fun () -> v11 (); v10) () let v15 : string = "port" let v16 : string = $"{v15}" let v19 : unit = () let v20 : (unit -> unit) = closure7(v5, v16) let v21 : unit = (fun () -> v20 (); v19) () let v24 : string = " = " let v25 : string = $"{v24}" let v28 : unit = () let v29 : (unit -> unit) = closure7(v5, v25) let v30 : unit = (fun () -> v29 (); v28) () let v33 : string = $"{v0}" let v36 : unit = () let v37 : (unit -> unit) = closure7(v5, v33) let v38 : unit = (fun () -> v37 (); v36) () let v41 : string = "; " let v42 : string = $"{v41}" let v45 : unit = () let v46 : (unit -> unit) = closure7(v5, v42) let v47 : unit = (fun () -> v46 (); v45) () let v50 : string = "retry" let v51 : string = $"{v50}" let v54 : unit = () let v55 : (unit -> unit) = closure7(v5, v51) let v56 : unit = (fun () -> v55 (); v54) () let v59 : string = $"{v24}" let v62 : unit = () let v63 : (unit -> unit) = closure7(v5, v59) let v64 : unit = (fun () -> v63 (); v62) () let v67 : string = $"{v1}" let v70 : unit = () let v71 : (unit -> unit) = closure7(v5, v67) let v72 : unit = (fun () -> v71 (); v70) () let v75 : string = $"{v41}" let v78 : unit = () let v79 : (unit -> unit) = closure7(v5, v75) let v80 : unit = (fun () -> v79 (); v78) () let v83 : string = "timeout" let v84 : string = $"{v83}" let v87 : unit = () let v88 : (unit -> unit) = closure7(v5, v84) let v89 : unit = (fun () -> v88 (); v87) () let v92 : string = $"{v24}" let v95 : unit = () let v96 : (unit -> unit) = closure7(v5, v92) let v97 : unit = (fun () -> v96 (); v95) () let v100 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v101 : string = "format!(\"{:#?}\", $0)" let v102 : std_string_String = Fable.Core.RustInterop.emitRustExpr v2 v101 let v103 : string = "fable_library_rust::String_::fromString($0)" let v104 : string = Fable.Core.RustInterop.emitRustExpr v102 v103 let _v100 = v104 #endif #if FABLE_COMPILER_RUST && WASM let v105 : string = "format!(\"{:#?}\", $0)" let v106 : std_string_String = Fable.Core.RustInterop.emitRustExpr v2 v105 let v107 : string = "fable_library_rust::String_::fromString($0)" let v108 : string = Fable.Core.RustInterop.emitRustExpr v106 v107 let _v100 = v108 #endif #if FABLE_COMPILER_RUST && CONTRACT let v109 : string = "format!(\"{:#?}\", $0)" let v110 : std_string_String = Fable.Core.RustInterop.emitRustExpr v2 v109 let v111 : string = "fable_library_rust::String_::fromString($0)" let v112 : string = Fable.Core.RustInterop.emitRustExpr v110 v111 let _v100 = v112 #endif #if FABLE_COMPILER_TYPESCRIPT let v113 : string = $"%A{v2}" let _v100 = v113 #endif #if FABLE_COMPILER_PYTHON let v116 : string = $"%A{v2}" let _v100 = v116 #endif #else let v119 : string = $"%A{v2}" let _v100 = v119 #endif let v122 : string = _v100 let v127 : string = $"{v122}" let v130 : unit = () let v131 : (unit -> unit) = closure7(v5, v127) let v132 : unit = (fun () -> v131 (); v130) () let v135 : string = $"{v41}" let v138 : unit = () let v139 : (unit -> unit) = closure7(v5, v135) let v140 : unit = (fun () -> v139 (); v138) () let v143 : string = "status" let v144 : string = $"{v143}" let v147 : unit = () let v148 : (unit -> unit) = closure7(v5, v144) let v149 : unit = (fun () -> v148 (); v147) () let v152 : string = $"{v24}" let v155 : unit = () let v156 : (unit -> unit) = closure7(v5, v152) let v157 : unit = (fun () -> v156 (); v155) () let v162 : string = if v3 then let v160 : string = "true" v160 else let v161 : string = "false" v161 let v163 : string = $"{v162}" let v166 : unit = () let v167 : (unit -> unit) = closure7(v5, v163) let v168 : unit = (fun () -> v167 (); v166) () let v171 : string = " }" let v172 : string = $"{v171}" let v175 : unit = () let v176 : (unit -> unit) = closure7(v5, v172) let v177 : unit = (fun () -> v176 (); v175) () let v180 : string = v5.l0 v180 and method22 (v0 : string, v1 : string, v2 : int64, v3 : string) : string = let v4 : string = "networking.wait_for_port_access" let v5 : string = $"{v0} {v1} #{v2} %s{v4} / {v3}" let v8 : char list = [] let v9 : (char list -> (char [])) = List.toArray let v10 : (char []) = v9 v8 let v13 : string = v5.TrimStart v10 let v31 : char list = [] let v32 : char list = '/' :: v31 let v35 : char list = ' ' :: v32 let v38 : (char list -> (char [])) = List.toArray let v39 : (char []) = v38 v35 let v42 : string = v13.TrimEnd v39 v42 and closure23 (v0 : int32 option, v1 : bool, v2 : int32, v3 : int64) () : unit = let v4 : unit = () let v5 : (unit -> unit) = closure0() let v6 : unit = (fun () -> v5 (); v4) () let struct (v20 : Mut0, v21 : Mut1, v22 : Mut2, v23 : Mut3, v24 : Mut4, v25 : int64 option) = TraceState.trace_state.Value let v38 : US0 = v24.l0 let v39 : bool = v22.l0 let v40 : bool = v39 = false let v43 : bool = if v40 then false else let v41 : int32 = [ US0_0, 0; US0_1, 1; US0_2, 2; US0_3, 3; US0_4, 4 ] |> Map |> Map.find v38 let v42 : bool = 0 >= v41 v42 if v43 then let v44 : unit = () let v45 : unit = (fun () -> v5 (); v44) () let struct (v59 : Mut0, v60 : Mut1, v61 : Mut2, v62 : Mut3, v63 : Mut4, v64 : int64 option) = TraceState.trace_state.Value let v77 : string = method6(v59, v60, v61, v62, v63, v64) let v78 : string = method10() let v79 : int64 = v59.l0 let v80 : string = method21(v2, v3, v0, v1) let v81 : string = method22(v77, v78, v79, v80) let v82 : unit = () let v83 : unit = (fun () -> v5 (); v82) () let struct (v97 : Mut0, v98 : Mut1, v99 : Mut2, v100 : Mut3, v101 : Mut4, v102 : int64 option) = TraceState.trace_state.Value method15(v81, v97, v98, v99, v100, v101, v102) and method19 (v0 : int32 option, v1 : bool, v2 : string, v3 : int32, v4 : int64) : Async<int64> = let v5 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v6 : Async<int64> = null |> unbox<Async<int64>> let _v5 = v6 #endif #if FABLE_COMPILER_RUST && WASM let v9 : Async<int64> = null |> unbox<Async<int64>> let _v5 = v9 #endif #if FABLE_COMPILER_RUST && CONTRACT let v12 : Async<int64> = null |> unbox<Async<int64>> let _v5 = v12 #endif #if FABLE_COMPILER_TYPESCRIPT let v15 : Async<int64> = null |> unbox<Async<int64>> let _v5 = v15 #endif #if FABLE_COMPILER_PYTHON let v18 : Async<int64> = null |> unbox<Async<int64>> let _v5 = v18 #endif #else let v21 : Async<int64> option = None let mutable _v21 = v21 async { let v22 : (int32 -> US7) = method20() let v23 : US7 option = v0 |> Option.map v22 let v34 : US7 = US7_1 let v35 : US7 = v23 |> Option.defaultValue v34 let v923 : Async<bool> = match v35 with | US7_1 -> (* None *) let v39 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v40 : Async<bool> = null |> unbox<Async<bool>> let _v39 = v40 #endif #if FABLE_COMPILER_RUST && WASM let v43 : Async<bool> = null |> unbox<Async<bool>> let _v39 = v43 #endif #if FABLE_COMPILER_RUST && CONTRACT let v46 : Async<bool> = null |> unbox<Async<bool>> let _v39 = v46 #endif #if FABLE_COMPILER_TYPESCRIPT let v49 : Async<bool> = null |> unbox<Async<bool>> let _v39 = v49 #endif #if FABLE_COMPILER_PYTHON let v52 : Async<bool> = null |> unbox<Async<bool>> let _v39 = v52 #endif #else let v55 : Async<bool> option = None let mutable _v55 = v55 async { let v56 : Async<System.Threading.CancellationToken> = Async.CancellationToken let! v56 = v56 let v57 : System.Threading.CancellationToken = v56 let v58 : System.Net.Sockets.TcpClient = new System.Net.Sockets.TcpClient () use v58 = v58 let v59 : System.Net.Sockets.TcpClient = v58 try let v60 : System.Threading.Tasks.ValueTask = v59.ConnectAsync (v2, v3, v57) let v61 : (unit -> System.Threading.Tasks.Task) = v60.AsTask let v62 : System.Threading.Tasks.Task = v61 () let v63 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v64 : Async<unit> = null |> unbox<Async<unit>> let _v63 = v64 #endif #if FABLE_COMPILER_RUST && WASM let v67 : Async<unit> = null |> unbox<Async<unit>> let _v63 = v67 #endif #if FABLE_COMPILER_RUST && CONTRACT let v70 : Async<unit> = null |> unbox<Async<unit>> let _v63 = v70 #endif #if FABLE_COMPILER_TYPESCRIPT let v73 : Async<unit> = null |> unbox<Async<unit>> let _v63 = v73 #endif #if FABLE_COMPILER_PYTHON let v76 : Async<unit> = null |> unbox<Async<unit>> let _v63 = v76 #endif #else let v79 : (System.Threading.Tasks.Task -> Async<unit>) = Async.AwaitTask let v80 : Async<unit> = v79 v62 let _v63 = v80 #endif let v81 : Async<unit> = _v63 do! v81 return true with ex -> let v86 : exn = ex let v87 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v88 : string = $"%A{v86}" let _v87 = v88 #endif #if FABLE_COMPILER_RUST && WASM let v91 : string = $"%A{v86}" let _v87 = v91 #endif #if FABLE_COMPILER_RUST && CONTRACT let v94 : string = $"%A{v86}" let _v87 = v94 #endif #if FABLE_COMPILER_TYPESCRIPT let v97 : string = $"%A{v86}" let _v87 = v97 #endif #if FABLE_COMPILER_PYTHON let v100 : string = $"%A{v86}" let _v87 = v100 #endif #else let v103 : string = $"{v86.GetType ()}: {v86.Message}" let _v87 = v103 #endif let v104 : string = _v87 let v109 : unit = () let v110 : (unit -> unit) = closure5(v3, v104) let v111 : unit = (fun () -> v110 (); v109) () return false (* let v227 : bool = *) } |> fun x -> _v55 <- Some x let v228 : Async<bool> = match _v55 with Some x -> x | None -> failwith "async.new_async_unit / _v55=None" let _v39 = v228 #endif let v229 : Async<bool> = _v39 v229 | US7_0(v234) -> (* Some *) let v235 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v236 : Async<bool> = null |> unbox<Async<bool>> let _v235 = v236 #endif #if FABLE_COMPILER_RUST && WASM let v239 : Async<bool> = null |> unbox<Async<bool>> let _v235 = v239 #endif #if FABLE_COMPILER_RUST && CONTRACT let v242 : Async<bool> = null |> unbox<Async<bool>> let _v235 = v242 #endif #if FABLE_COMPILER_TYPESCRIPT let v245 : Async<bool> = null |> unbox<Async<bool>> let _v235 = v245 #endif #if FABLE_COMPILER_PYTHON let v248 : Async<bool> = null |> unbox<Async<bool>> let _v235 = v248 #endif #else let v251 : Async<bool> option = None let mutable _v251 = v251 async { let v252 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v253 : Async<bool> = null |> unbox<Async<bool>> let _v252 = v253 #endif #if FABLE_COMPILER_RUST && WASM let v256 : Async<bool> = null |> unbox<Async<bool>> let _v252 = v256 #endif #if FABLE_COMPILER_RUST && CONTRACT let v259 : Async<bool> = null |> unbox<Async<bool>> let _v252 = v259 #endif #if FABLE_COMPILER_TYPESCRIPT let v262 : Async<bool> = null |> unbox<Async<bool>> let _v252 = v262 #endif #if FABLE_COMPILER_PYTHON let v265 : Async<bool> = null |> unbox<Async<bool>> let _v252 = v265 #endif #else let v268 : Async<bool> option = None let mutable _v268 = v268 async { let v269 : Async<System.Threading.CancellationToken> = Async.CancellationToken let! v269 = v269 let v270 : System.Threading.CancellationToken = v269 let v271 : System.Net.Sockets.TcpClient = new System.Net.Sockets.TcpClient () use v271 = v271 let v272 : System.Net.Sockets.TcpClient = v271 try let v273 : System.Threading.Tasks.ValueTask = v272.ConnectAsync (v2, v3, v270) let v274 : (unit -> System.Threading.Tasks.Task) = v273.AsTask let v275 : System.Threading.Tasks.Task = v274 () let v276 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v277 : Async<unit> = null |> unbox<Async<unit>> let _v276 = v277 #endif #if FABLE_COMPILER_RUST && WASM let v280 : Async<unit> = null |> unbox<Async<unit>> let _v276 = v280 #endif #if FABLE_COMPILER_RUST && CONTRACT let v283 : Async<unit> = null |> unbox<Async<unit>> let _v276 = v283 #endif #if FABLE_COMPILER_TYPESCRIPT let v286 : Async<unit> = null |> unbox<Async<unit>> let _v276 = v286 #endif #if FABLE_COMPILER_PYTHON let v289 : Async<unit> = null |> unbox<Async<unit>> let _v276 = v289 #endif #else let v292 : (System.Threading.Tasks.Task -> Async<unit>) = Async.AwaitTask let v293 : Async<unit> = v292 v275 let _v276 = v293 #endif let v294 : Async<unit> = _v276 do! v294 return true with ex -> let v299 : exn = ex let v300 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v301 : string = $"%A{v299}" let _v300 = v301 #endif #if FABLE_COMPILER_RUST && WASM let v304 : string = $"%A{v299}" let _v300 = v304 #endif #if FABLE_COMPILER_RUST && CONTRACT let v307 : string = $"%A{v299}" let _v300 = v307 #endif #if FABLE_COMPILER_TYPESCRIPT let v310 : string = $"%A{v299}" let _v300 = v310 #endif #if FABLE_COMPILER_PYTHON let v313 : string = $"%A{v299}" let _v300 = v313 #endif #else let v316 : string = $"{v299.GetType ()}: {v299.Message}" let _v300 = v316 #endif let v317 : string = _v300 let v322 : unit = () let v323 : (unit -> unit) = closure5(v3, v317) let v324 : unit = (fun () -> v323 (); v322) () return false (* let v440 : bool = *) } |> fun x -> _v268 <- Some x let v441 : Async<bool> = match _v268 with Some x -> x | None -> failwith "async.new_async_unit / _v268=None" let _v252 = v441 #endif let v442 : Async<bool> = _v252 let v447 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v448 : Async<US4> = null |> unbox<Async<US4>> let _v447 = v448 #endif #if FABLE_COMPILER_RUST && WASM let v451 : Async<US4> = null |> unbox<Async<US4>> let _v447 = v451 #endif #if FABLE_COMPILER_RUST && CONTRACT let v454 : Async<US4> = null |> unbox<Async<US4>> let _v447 = v454 #endif #if FABLE_COMPILER_TYPESCRIPT let v457 : Async<US4> = null |> unbox<Async<US4>> let _v447 = v457 #endif #if FABLE_COMPILER_PYTHON let v460 : Async<US4> = null |> unbox<Async<US4>> let _v447 = v460 #endif #else let v463 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v464 : Async<US4> = null |> unbox<Async<US4>> let _v463 = v464 #endif #if FABLE_COMPILER_RUST && WASM let v467 : Async<US4> = null |> unbox<Async<US4>> let _v463 = v467 #endif #if FABLE_COMPILER_RUST && CONTRACT let v470 : Async<US4> = null |> unbox<Async<US4>> let _v463 = v470 #endif #if FABLE_COMPILER_TYPESCRIPT let v473 : Async<US4> = null |> unbox<Async<US4>> let _v463 = v473 #endif #if FABLE_COMPILER_PYTHON let v476 : Async<US4> = null |> unbox<Async<US4>> let _v463 = v476 #endif #else let v479 : Async<US4> option = None let mutable _v479 = v479 async { let v480 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v481 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>> let _v480 = v481 #endif #if FABLE_COMPILER_RUST && WASM let v484 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>> let _v480 = v484 #endif #if FABLE_COMPILER_RUST && CONTRACT let v487 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>> let _v480 = v487 #endif #if FABLE_COMPILER_TYPESCRIPT let v490 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>> let _v480 = v490 #endif #if FABLE_COMPILER_PYTHON let v493 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>> let _v480 = v493 #endif #else let v496 : Async<Async<bool>> = Async.StartChild (v442, v234) let _v480 = v496 #endif let v497 : Async<Async<bool>> = _v480 let! v497 = v497 let v502 : Async<bool> = v497 let v503 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v504 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>> let _v503 = v504 #endif #if FABLE_COMPILER_RUST && WASM let v507 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>> let _v503 = v507 #endif #if FABLE_COMPILER_RUST && CONTRACT let v510 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>> let _v503 = v510 #endif #if FABLE_COMPILER_TYPESCRIPT let v513 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>> let _v503 = v513 #endif #if FABLE_COMPILER_PYTHON let v516 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>> let _v503 = v516 #endif #else let v519 : (Async<bool> -> Async<Choice<bool, exn>>) = Async.Catch let v520 : Async<Choice<bool, exn>> = v519 v502 let _v503 = v520 #endif let v521 : Async<Choice<bool, exn>> = _v503 let v526 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v527 : Async<US5> = null |> unbox<Async<US5>> let _v526 = v527 #endif #if FABLE_COMPILER_RUST && WASM let v530 : Async<US5> = null |> unbox<Async<US5>> let _v526 = v530 #endif #if FABLE_COMPILER_RUST && CONTRACT let v533 : Async<US5> = null |> unbox<Async<US5>> let _v526 = v533 #endif #if FABLE_COMPILER_TYPESCRIPT let v536 : Async<US5> = null |> unbox<Async<US5>> let _v526 = v536 #endif #if FABLE_COMPILER_PYTHON let v539 : Async<US5> = null |> unbox<Async<US5>> let _v526 = v539 #endif #else let v542 : Async<US5> option = None let mutable _v542 = v542 async { let! v521 = v521 let v543 : Choice<bool, exn> = v521 let v544 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v545 : US5 = null |> unbox<US5> let _v544 = v545 #endif #if FABLE_COMPILER_RUST && WASM let v548 : US5 = null |> unbox<US5> let _v544 = v548 #endif #if FABLE_COMPILER_RUST && CONTRACT let v551 : US5 = null |> unbox<US5> let _v544 = v551 #endif #if FABLE_COMPILER_TYPESCRIPT let v554 : US5 = null |> unbox<US5> let _v544 = v554 #endif #if FABLE_COMPILER_PYTHON let v557 : US5 = null |> unbox<US5> let _v544 = v557 #endif #else let v560 : (bool -> US5) = closure14() let v561 : (exn -> US5) = closure15() let v562 : US5 = match v543 with Choice1Of2 x -> v560 x | Choice2Of2 x -> v561 x let _v544 = v562 #endif let v563 : US5 = _v544 return v563 } |> fun x -> _v542 <- Some x let v568 : Async<US5> = match _v542 with Some x -> x | None -> failwith "async.new_async_unit / _v542=None" let _v526 = v568 #endif let v569 : Async<US5> = _v526 let v574 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v575 : Async<US6> = null |> unbox<Async<US6>> let _v574 = v575 #endif #if FABLE_COMPILER_RUST && WASM let v578 : Async<US6> = null |> unbox<Async<US6>> let _v574 = v578 #endif #if FABLE_COMPILER_RUST && CONTRACT let v581 : Async<US6> = null |> unbox<Async<US6>> let _v574 = v581 #endif #if FABLE_COMPILER_TYPESCRIPT let v584 : Async<US6> = null |> unbox<Async<US6>> let _v574 = v584 #endif #if FABLE_COMPILER_PYTHON let v587 : Async<US6> = null |> unbox<Async<US6>> let _v574 = v587 #endif #else let v590 : Async<US6> option = None let mutable _v590 = v590 async { let! v569 = v569 let v591 : US5 = v569 let v597 : US6 = match v591 with | US5_0(v592) -> (* C1of2 *) US6_0(v592) | US5_1(v594) -> (* C2of2 *) US6_1(v594) return v597 } |> fun x -> _v590 <- Some x let v598 : Async<US6> = match _v590 with Some x -> x | None -> failwith "async.new_async_unit / _v590=None" let _v574 = v598 #endif let v599 : Async<US6> = _v574 let v604 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v605 : Async<US4> = null |> unbox<Async<US4>> let _v604 = v605 #endif #if FABLE_COMPILER_RUST && WASM let v608 : Async<US4> = null |> unbox<Async<US4>> let _v604 = v608 #endif #if FABLE_COMPILER_RUST && CONTRACT let v611 : Async<US4> = null |> unbox<Async<US4>> let _v604 = v611 #endif #if FABLE_COMPILER_TYPESCRIPT let v614 : Async<US4> = null |> unbox<Async<US4>> let _v604 = v614 #endif #if FABLE_COMPILER_PYTHON let v617 : Async<US4> = null |> unbox<Async<US4>> let _v604 = v617 #endif #else let v620 : Async<US4> option = None let mutable _v620 = v620 async { let! v599 = v599 let v621 : US6 = v599 let v894 : US4 = match v621 with | US6_1(v624) -> (* Error *) let v625 : string = $"%A{v624}" let v628 : string = "System.TimeoutException" let v629 : bool = v625.Contains v628 if v629 then let v632 : unit = () let v633 : (unit -> unit) = closure16(v234) let v634 : unit = (fun () -> v633 (); v632) () US4_1 else let v751 : unit = () let v752 : (unit -> unit) = closure17(v234, v624) let v753 : unit = (fun () -> v752 (); v751) () US4_1 | US6_0(v622) -> (* Ok *) US4_0(v622) return v894 } |> fun x -> _v620 <- Some x let v895 : Async<US4> = match _v620 with Some x -> x | None -> failwith "async.new_async_unit / _v620=None" let _v604 = v895 #endif let v896 : Async<US4> = _v604 return! v896 } |> fun x -> _v479 <- Some x let v901 : Async<US4> = match _v479 with Some x -> x | None -> failwith "async.new_async_unit / _v479=None" let _v463 = v901 #endif let v902 : Async<US4> = _v463 let _v447 = v902 #endif let v907 : Async<US4> = _v447 let! v907 = v907 let v912 : US4 = v907 let v915 : bool = match v912 with | US4_1 -> (* None *) false | US4_0(v913) -> (* Some *) v913 return v915 } |> fun x -> _v251 <- Some x let v916 : Async<bool> = match _v251 with Some x -> x | None -> failwith "async.new_async_unit / _v251=None" let _v235 = v916 #endif let v917 : Async<bool> = _v235 v917 let! v923 = v923 let v924 : bool = v923 let v925 : bool = v924 = v1 if v925 then return v4 (* () else *) else let v926 : int64 = v4 % 100L let v927 : bool = v926 = 0L if v927 then let v928 : unit = () let v929 : (unit -> unit) = closure23(v0, v1, v3, v4) let v930 : unit = (fun () -> v929 (); v928) () () let v1042 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v1043 : Async<unit> = null |> unbox<Async<unit>> let _v1042 = v1043 #endif #if FABLE_COMPILER_RUST && WASM let v1046 : Async<unit> = null |> unbox<Async<unit>> let _v1042 = v1046 #endif #if FABLE_COMPILER_RUST && CONTRACT let v1049 : Async<unit> = null |> unbox<Async<unit>> let _v1042 = v1049 #endif #if FABLE_COMPILER_TYPESCRIPT let v1052 : Async<unit> = null |> unbox<Async<unit>> let _v1042 = v1052 #endif #if FABLE_COMPILER_PYTHON let v1055 : Async<unit> = null |> unbox<Async<unit>> let _v1042 = v1055 #endif #else let v1058 : (int32 -> Async<unit>) = Async.Sleep let v1059 : Async<unit> = v1058 10 let _v1042 = v1059 #endif let v1060 : Async<unit> = _v1042 do! v1060 let v1065 : int64 = v4 + 1L let v1066 : Async<int64> = method19(v0, v1, v2, v3, v1065) return! v1066 (* () *) } |> fun x -> _v21 <- Some x let v1067 : Async<int64> = match _v21 with Some x -> x | None -> failwith "async.new_async_unit / _v21=None" let _v5 = v1067 #endif let v1068 : Async<int64> = _v5 v1068 and closure21 (v0 : int32 option, v1 : bool, v2 : string) (v3 : int32) : Async<int64> = let v4 : int64 = 0L method19(v0, v1, v2, v3, v4) and closure20 (v0 : int32 option, v1 : bool) (v2 : string) : (int32 -> Async<int64>) = closure21(v0, v1, v2) and closure19 (v0 : int32 option) (v1 : bool) : (string -> (int32 -> Async<int64>)) = closure20(v0, v1) and closure18 () (v0 : int32 option) : (bool -> (string -> (int32 -> Async<int64>))) = closure19(v0) and method23 (v0 : int32 option, v1 : string, v2 : int32) : Async<int32> = let v3 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v4 : Async<int32> = null |> unbox<Async<int32>> let _v3 = v4 #endif #if FABLE_COMPILER_RUST && WASM let v7 : Async<int32> = null |> unbox<Async<int32>> let _v3 = v7 #endif #if FABLE_COMPILER_RUST && CONTRACT let v10 : Async<int32> = null |> unbox<Async<int32>> let _v3 = v10 #endif #if FABLE_COMPILER_TYPESCRIPT let v13 : Async<int32> = null |> unbox<Async<int32>> let _v3 = v13 #endif #if FABLE_COMPILER_PYTHON let v16 : Async<int32> = null |> unbox<Async<int32>> let _v3 = v16 #endif #else let v19 : Async<int32> option = None let mutable _v19 = v19 async { let v20 : (int32 -> US7) = method20() let v21 : US7 option = v0 |> Option.map v20 let v32 : US7 = US7_1 let v33 : US7 = v21 |> Option.defaultValue v32 let v921 : Async<bool> = match v33 with | US7_1 -> (* None *) let v37 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v38 : Async<bool> = null |> unbox<Async<bool>> let _v37 = v38 #endif #if FABLE_COMPILER_RUST && WASM let v41 : Async<bool> = null |> unbox<Async<bool>> let _v37 = v41 #endif #if FABLE_COMPILER_RUST && CONTRACT let v44 : Async<bool> = null |> unbox<Async<bool>> let _v37 = v44 #endif #if FABLE_COMPILER_TYPESCRIPT let v47 : Async<bool> = null |> unbox<Async<bool>> let _v37 = v47 #endif #if FABLE_COMPILER_PYTHON let v50 : Async<bool> = null |> unbox<Async<bool>> let _v37 = v50 #endif #else let v53 : Async<bool> option = None let mutable _v53 = v53 async { let v54 : Async<System.Threading.CancellationToken> = Async.CancellationToken let! v54 = v54 let v55 : System.Threading.CancellationToken = v54 let v56 : System.Net.Sockets.TcpClient = new System.Net.Sockets.TcpClient () use v56 = v56 let v57 : System.Net.Sockets.TcpClient = v56 try let v58 : System.Threading.Tasks.ValueTask = v57.ConnectAsync (v1, v2, v55) let v59 : (unit -> System.Threading.Tasks.Task) = v58.AsTask let v60 : System.Threading.Tasks.Task = v59 () let v61 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v62 : Async<unit> = null |> unbox<Async<unit>> let _v61 = v62 #endif #if FABLE_COMPILER_RUST && WASM let v65 : Async<unit> = null |> unbox<Async<unit>> let _v61 = v65 #endif #if FABLE_COMPILER_RUST && CONTRACT let v68 : Async<unit> = null |> unbox<Async<unit>> let _v61 = v68 #endif #if FABLE_COMPILER_TYPESCRIPT let v71 : Async<unit> = null |> unbox<Async<unit>> let _v61 = v71 #endif #if FABLE_COMPILER_PYTHON let v74 : Async<unit> = null |> unbox<Async<unit>> let _v61 = v74 #endif #else let v77 : (System.Threading.Tasks.Task -> Async<unit>) = Async.AwaitTask let v78 : Async<unit> = v77 v60 let _v61 = v78 #endif let v79 : Async<unit> = _v61 do! v79 return true with ex -> let v84 : exn = ex let v85 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v86 : string = $"%A{v84}" let _v85 = v86 #endif #if FABLE_COMPILER_RUST && WASM let v89 : string = $"%A{v84}" let _v85 = v89 #endif #if FABLE_COMPILER_RUST && CONTRACT let v92 : string = $"%A{v84}" let _v85 = v92 #endif #if FABLE_COMPILER_TYPESCRIPT let v95 : string = $"%A{v84}" let _v85 = v95 #endif #if FABLE_COMPILER_PYTHON let v98 : string = $"%A{v84}" let _v85 = v98 #endif #else let v101 : string = $"{v84.GetType ()}: {v84.Message}" let _v85 = v101 #endif let v102 : string = _v85 let v107 : unit = () let v108 : (unit -> unit) = closure5(v2, v102) let v109 : unit = (fun () -> v108 (); v107) () return false (* let v225 : bool = *) } |> fun x -> _v53 <- Some x let v226 : Async<bool> = match _v53 with Some x -> x | None -> failwith "async.new_async_unit / _v53=None" let _v37 = v226 #endif let v227 : Async<bool> = _v37 v227 | US7_0(v232) -> (* Some *) let v233 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v234 : Async<bool> = null |> unbox<Async<bool>> let _v233 = v234 #endif #if FABLE_COMPILER_RUST && WASM let v237 : Async<bool> = null |> unbox<Async<bool>> let _v233 = v237 #endif #if FABLE_COMPILER_RUST && CONTRACT let v240 : Async<bool> = null |> unbox<Async<bool>> let _v233 = v240 #endif #if FABLE_COMPILER_TYPESCRIPT let v243 : Async<bool> = null |> unbox<Async<bool>> let _v233 = v243 #endif #if FABLE_COMPILER_PYTHON let v246 : Async<bool> = null |> unbox<Async<bool>> let _v233 = v246 #endif #else let v249 : Async<bool> option = None let mutable _v249 = v249 async { let v250 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v251 : Async<bool> = null |> unbox<Async<bool>> let _v250 = v251 #endif #if FABLE_COMPILER_RUST && WASM let v254 : Async<bool> = null |> unbox<Async<bool>> let _v250 = v254 #endif #if FABLE_COMPILER_RUST && CONTRACT let v257 : Async<bool> = null |> unbox<Async<bool>> let _v250 = v257 #endif #if FABLE_COMPILER_TYPESCRIPT let v260 : Async<bool> = null |> unbox<Async<bool>> let _v250 = v260 #endif #if FABLE_COMPILER_PYTHON let v263 : Async<bool> = null |> unbox<Async<bool>> let _v250 = v263 #endif #else let v266 : Async<bool> option = None let mutable _v266 = v266 async { let v267 : Async<System.Threading.CancellationToken> = Async.CancellationToken let! v267 = v267 let v268 : System.Threading.CancellationToken = v267 let v269 : System.Net.Sockets.TcpClient = new System.Net.Sockets.TcpClient () use v269 = v269 let v270 : System.Net.Sockets.TcpClient = v269 try let v271 : System.Threading.Tasks.ValueTask = v270.ConnectAsync (v1, v2, v268) let v272 : (unit -> System.Threading.Tasks.Task) = v271.AsTask let v273 : System.Threading.Tasks.Task = v272 () let v274 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v275 : Async<unit> = null |> unbox<Async<unit>> let _v274 = v275 #endif #if FABLE_COMPILER_RUST && WASM let v278 : Async<unit> = null |> unbox<Async<unit>> let _v274 = v278 #endif #if FABLE_COMPILER_RUST && CONTRACT let v281 : Async<unit> = null |> unbox<Async<unit>> let _v274 = v281 #endif #if FABLE_COMPILER_TYPESCRIPT let v284 : Async<unit> = null |> unbox<Async<unit>> let _v274 = v284 #endif #if FABLE_COMPILER_PYTHON let v287 : Async<unit> = null |> unbox<Async<unit>> let _v274 = v287 #endif #else let v290 : (System.Threading.Tasks.Task -> Async<unit>) = Async.AwaitTask let v291 : Async<unit> = v290 v273 let _v274 = v291 #endif let v292 : Async<unit> = _v274 do! v292 return true with ex -> let v297 : exn = ex let v298 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v299 : string = $"%A{v297}" let _v298 = v299 #endif #if FABLE_COMPILER_RUST && WASM let v302 : string = $"%A{v297}" let _v298 = v302 #endif #if FABLE_COMPILER_RUST && CONTRACT let v305 : string = $"%A{v297}" let _v298 = v305 #endif #if FABLE_COMPILER_TYPESCRIPT let v308 : string = $"%A{v297}" let _v298 = v308 #endif #if FABLE_COMPILER_PYTHON let v311 : string = $"%A{v297}" let _v298 = v311 #endif #else let v314 : string = $"{v297.GetType ()}: {v297.Message}" let _v298 = v314 #endif let v315 : string = _v298 let v320 : unit = () let v321 : (unit -> unit) = closure5(v2, v315) let v322 : unit = (fun () -> v321 (); v320) () return false (* let v438 : bool = *) } |> fun x -> _v266 <- Some x let v439 : Async<bool> = match _v266 with Some x -> x | None -> failwith "async.new_async_unit / _v266=None" let _v250 = v439 #endif let v440 : Async<bool> = _v250 let v445 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v446 : Async<US4> = null |> unbox<Async<US4>> let _v445 = v446 #endif #if FABLE_COMPILER_RUST && WASM let v449 : Async<US4> = null |> unbox<Async<US4>> let _v445 = v449 #endif #if FABLE_COMPILER_RUST && CONTRACT let v452 : Async<US4> = null |> unbox<Async<US4>> let _v445 = v452 #endif #if FABLE_COMPILER_TYPESCRIPT let v455 : Async<US4> = null |> unbox<Async<US4>> let _v445 = v455 #endif #if FABLE_COMPILER_PYTHON let v458 : Async<US4> = null |> unbox<Async<US4>> let _v445 = v458 #endif #else let v461 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v462 : Async<US4> = null |> unbox<Async<US4>> let _v461 = v462 #endif #if FABLE_COMPILER_RUST && WASM let v465 : Async<US4> = null |> unbox<Async<US4>> let _v461 = v465 #endif #if FABLE_COMPILER_RUST && CONTRACT let v468 : Async<US4> = null |> unbox<Async<US4>> let _v461 = v468 #endif #if FABLE_COMPILER_TYPESCRIPT let v471 : Async<US4> = null |> unbox<Async<US4>> let _v461 = v471 #endif #if FABLE_COMPILER_PYTHON let v474 : Async<US4> = null |> unbox<Async<US4>> let _v461 = v474 #endif #else let v477 : Async<US4> option = None let mutable _v477 = v477 async { let v478 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v479 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>> let _v478 = v479 #endif #if FABLE_COMPILER_RUST && WASM let v482 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>> let _v478 = v482 #endif #if FABLE_COMPILER_RUST && CONTRACT let v485 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>> let _v478 = v485 #endif #if FABLE_COMPILER_TYPESCRIPT let v488 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>> let _v478 = v488 #endif #if FABLE_COMPILER_PYTHON let v491 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>> let _v478 = v491 #endif #else let v494 : Async<Async<bool>> = Async.StartChild (v440, v232) let _v478 = v494 #endif let v495 : Async<Async<bool>> = _v478 let! v495 = v495 let v500 : Async<bool> = v495 let v501 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v502 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>> let _v501 = v502 #endif #if FABLE_COMPILER_RUST && WASM let v505 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>> let _v501 = v505 #endif #if FABLE_COMPILER_RUST && CONTRACT let v508 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>> let _v501 = v508 #endif #if FABLE_COMPILER_TYPESCRIPT let v511 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>> let _v501 = v511 #endif #if FABLE_COMPILER_PYTHON let v514 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>> let _v501 = v514 #endif #else let v517 : (Async<bool> -> Async<Choice<bool, exn>>) = Async.Catch let v518 : Async<Choice<bool, exn>> = v517 v500 let _v501 = v518 #endif let v519 : Async<Choice<bool, exn>> = _v501 let v524 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v525 : Async<US5> = null |> unbox<Async<US5>> let _v524 = v525 #endif #if FABLE_COMPILER_RUST && WASM let v528 : Async<US5> = null |> unbox<Async<US5>> let _v524 = v528 #endif #if FABLE_COMPILER_RUST && CONTRACT let v531 : Async<US5> = null |> unbox<Async<US5>> let _v524 = v531 #endif #if FABLE_COMPILER_TYPESCRIPT let v534 : Async<US5> = null |> unbox<Async<US5>> let _v524 = v534 #endif #if FABLE_COMPILER_PYTHON let v537 : Async<US5> = null |> unbox<Async<US5>> let _v524 = v537 #endif #else let v540 : Async<US5> option = None let mutable _v540 = v540 async { let! v519 = v519 let v541 : Choice<bool, exn> = v519 let v542 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v543 : US5 = null |> unbox<US5> let _v542 = v543 #endif #if FABLE_COMPILER_RUST && WASM let v546 : US5 = null |> unbox<US5> let _v542 = v546 #endif #if FABLE_COMPILER_RUST && CONTRACT let v549 : US5 = null |> unbox<US5> let _v542 = v549 #endif #if FABLE_COMPILER_TYPESCRIPT let v552 : US5 = null |> unbox<US5> let _v542 = v552 #endif #if FABLE_COMPILER_PYTHON let v555 : US5 = null |> unbox<US5> let _v542 = v555 #endif #else let v558 : (bool -> US5) = closure14() let v559 : (exn -> US5) = closure15() let v560 : US5 = match v541 with Choice1Of2 x -> v558 x | Choice2Of2 x -> v559 x let _v542 = v560 #endif let v561 : US5 = _v542 return v561 } |> fun x -> _v540 <- Some x let v566 : Async<US5> = match _v540 with Some x -> x | None -> failwith "async.new_async_unit / _v540=None" let _v524 = v566 #endif let v567 : Async<US5> = _v524 let v572 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v573 : Async<US6> = null |> unbox<Async<US6>> let _v572 = v573 #endif #if FABLE_COMPILER_RUST && WASM let v576 : Async<US6> = null |> unbox<Async<US6>> let _v572 = v576 #endif #if FABLE_COMPILER_RUST && CONTRACT let v579 : Async<US6> = null |> unbox<Async<US6>> let _v572 = v579 #endif #if FABLE_COMPILER_TYPESCRIPT let v582 : Async<US6> = null |> unbox<Async<US6>> let _v572 = v582 #endif #if FABLE_COMPILER_PYTHON let v585 : Async<US6> = null |> unbox<Async<US6>> let _v572 = v585 #endif #else let v588 : Async<US6> option = None let mutable _v588 = v588 async { let! v567 = v567 let v589 : US5 = v567 let v595 : US6 = match v589 with | US5_0(v590) -> (* C1of2 *) US6_0(v590) | US5_1(v592) -> (* C2of2 *) US6_1(v592) return v595 } |> fun x -> _v588 <- Some x let v596 : Async<US6> = match _v588 with Some x -> x | None -> failwith "async.new_async_unit / _v588=None" let _v572 = v596 #endif let v597 : Async<US6> = _v572 let v602 : unit = () #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v603 : Async<US4> = null |> unbox<Async<US4>> let _v602 = v603 #endif #if FABLE_COMPILER_RUST && WASM let v606 : Async<US4> = null |> unbox<Async<US4>> let _v602 = v606 #endif #if FABLE_COMPILER_RUST && CONTRACT let v609 : Async<US4> = null |> unbox<Async<US4>> let _v602 = v609 #endif #if FABLE_COMPILER_TYPESCRIPT let v612 : Async<US4> = null |> unbox<Async<US4>> let _v602 = v612 #endif #if FABLE_COMPILER_PYTHON let v615 : Async<US4> = null |> unbox<Async<US4>> let _v602 = v615 #endif #else let v618 : Async<US4> option = None let mutable _v618 = v618 async { let! v597 = v597 let v619 : US6 = v597 let v892 : US4 = match v619 with | US6_1(v622) -> (* Error *) let v623 : string = $"%A{v622}" let v626 : string = "System.TimeoutException" let v627 : bool = v623.Contains v626 if v627 then let v630 : unit = () let v631 : (unit -> unit) = closure16(v232) let v632 : unit = (fun () -> v631 (); v630) () US4_1 else let v749 : unit = () let v750 : (unit -> unit) = closure17(v232, v622) let v751 : unit = (fun () -> v750 (); v749) () US4_1 | US6_0(v620) -> (* Ok *) US4_0(v620) return v892 } |> fun x -> _v618 <- Some x let v893 : Async<US4> = match _v618 with Some x -> x | None -> failwith "async.new_async_unit / _v618=None" let _v602 = v893 #endif let v894 : Async<US4> = _v602 return! v894 } |> fun x -> _v477 <- Some x let v899 : Async<US4> = match _v477 with Some x -> x | None -> failwith "async.new_async_unit / _v477=None" let _v461 = v899 #endif let v900 : Async<US4> = _v461 let _v445 = v900 #endif let v905 : Async<US4> = _v445 let! v905 = v905 let v910 : US4 = v905 let v913 : bool = match v910 with | US4_1 -> (* None *) false | US4_0(v911) -> (* Some *) v911 return v913 } |> fun x -> _v249 <- Some x let v914 : Async<bool> = match _v249 with Some x -> x | None -> failwith "async.new_async_unit / _v249=None" let _v233 = v914 #endif let v915 : Async<bool> = _v233 v915 let! v921 = v921 let v922 : bool = v921 let v923 : bool = v922 = false if v923 then return v2 (* () else *) else let v924 : int32 = v2 + 1 let v925 : Async<int32> = method23(v0, v1, v924) return! v925 (* () *) } |> fun x -> _v19 <- Some x let v926 : Async<int32> = match _v19 with Some x -> x | None -> failwith "async.new_async_unit / _v19=None" let _v3 = v926 #endif let v927 : Async<int32> = _v3 v927 and closure26 (v0 : int32 option, v1 : string) (v2 : int32) : Async<int32> = method23(v0, v1, v2) and closure25 (v0 : int32 option) (v1 : string) : (int32 -> Async<int32>) = closure26(v0, v1) and closure24 () (v0 : int32 option) : (string -> (int32 -> Async<int32>)) = closure25(v0) let v0 : unit = () let v1 : (unit -> unit) = closure0() let v2 : unit = (fun () -> v1 (); v0) () let v16 : (string -> (int32 -> Async<bool>)) = closure3() let test_port_open x = v16 x let v17 : (int32 -> (string -> (int32 -> Async<bool>))) = closure11() let test_port_open_timeout x = v17 x let v18 : (int32 option -> (bool -> (string -> (int32 -> Async<int64>)))) = closure18() let wait_for_port_access x = v18 x let v19 : (int32 option -> (string -> (int32 -> Async<int32>))) = closure24() let get_available_port x = v19 x () 00:00:00 debug #1 writeDibCode / output: Fs / path: DirTreeHtml.dib 00:00:00 debug #2 parseDibCode / output: Fs / file: DirTreeHtml.dib 00:00:00 debug #1 persistCodeProject / packages: [Argu; Falco.Markup; FSharp.Control.AsyncSeq; ... ] / modules: [lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / name: DirTreeHtml / hash: / code.Length: 4638 00:00:00 debug #2 buildProject / fullPath: C:\home\git\polyglot\target\Builder\DirTreeHtml\DirTreeHtml.fsproj 00:00:01 debug #1 runtime.execute_with_options_async / { options = { command = dotnet publish "C:\home\git\polyglot\target/Builder\DirTreeHtml\DirTreeHtml.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\dir-tree-html\dist" --runtime linux-x64; cancellation_token = None; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = Some "C:\home\git\polyglot\target\Builder\DirTreeHtml" } } 00:00:01 verbose #2 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET 00:00:02 verbose #3 > Determining projects to restore... 00:00:03 verbose #4 > Restored C:\home\git\polyglot\target\Builder\DirTreeHtml\DirTreeHtml.fsproj (in 698 ms). 00:00:03 verbose #5 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\Builder\DirTreeHtml\DirTreeHtml.fsproj] 00:00:22 verbose #6 > DirTreeHtml -> C:\home\git\polyglot\target\Builder\DirTreeHtml\bin\Release\net9.0\linux-x64\DirTreeHtml.dll 00:00:23 verbose #7 > DirTreeHtml -> C:\home\git\polyglot\apps\dir-tree-html\dist\ 00:00:23 debug #8 runtime.execute_with_options_async / { exit_code = 0; output_length = 703 } 00:00:23 debug #9 runtime.execute_with_options_async / { options = { command = dotnet publish "C:\home\git\polyglot\target/Builder\DirTreeHtml\DirTreeHtml.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\dir-tree-html\dist" --runtime win-x64; cancellation_token = None; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = Some "C:\home\git\polyglot\target\Builder\DirTreeHtml" } } 00:00:24 verbose #10 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET 00:00:24 verbose #11 > Determining projects to restore... 00:00:25 verbose #12 > Restored C:\home\git\polyglot\target\Builder\DirTreeHtml\DirTreeHtml.fsproj (in 579 ms). 00:00:26 verbose #13 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\Builder\DirTreeHtml\DirTreeHtml.fsproj] 00:00:41 verbose #14 > DirTreeHtml -> C:\home\git\polyglot\target\Builder\DirTreeHtml\bin\Release\net9.0\win-x64\DirTreeHtml.dll 00:00:42 verbose #15 > DirTreeHtml -> C:\home\git\polyglot\apps\dir-tree-html\dist\ 00:00:43 debug #16 runtime.execute_with_options_async / { exit_code = 0; output_length = 701 }
In [ ]:
{ pwsh ../lib/spiral/build.ps1 -sequential 1 } | Invoke-Block
00:00:00 verbose #1 async.run_with_timeout_async / { timeout = 180 } 00:00:01 debug #1 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path parsing.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:01 verbose #2 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "parsing.dib", "--retries", "3"])) } 00:00:01 verbose #3 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:00:01 verbose #4 > "repl", 00:00:01 verbose #5 > "--exit-after-run", 00:00:01 verbose #6 > "--run", 00:00:01 verbose #7 > "c:/home/git/polyglot/lib/spiral/parsing.dib", 00:00:01 verbose #8 > "--output-path", 00:00:01 verbose #9 > "c:/home/git/polyglot/lib/spiral/parsing.dib.ipynb", 00:00:01 verbose #10 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/parsing.dib" --output-path "c:/home/git/polyglot/lib/spiral/parsing.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:00:03 verbose #11 > > 00:00:03 verbose #12 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:03 verbose #13 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:03 verbose #14 > > │ # parsing │ 00:00:03 verbose #15 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:07 verbose #16 > > 00:00:07 verbose #17 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:07 verbose #18 > > open rust.rust_operators 00:00:07 verbose #19 > > open sm'_operators 00:00:09 verbose #20 > > 00:00:09 verbose #21 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:09 verbose #22 > > //// test 00:00:09 verbose #23 > > 00:00:09 verbose #24 > > open testing 00:00:09 verbose #25 > > 00:00:09 verbose #26 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:09 verbose #27 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:09 verbose #28 > > │ ## fparsec │ 00:00:09 verbose #29 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:09 verbose #30 > > 00:00:09 verbose #31 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:09 verbose #32 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:09 verbose #33 > > │ <div><div></div><div><strong>Installing │ 00:00:09 verbose #34 > > │ Packages</strong><ul><li><span>FParsec</span></li></ul></div><div></div></di │ 00:00:09 verbose #35 > > │ v> │ 00:00:09 verbose #36 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:10 verbose #37 > > 00:00:10 verbose #38 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:10 verbose #39 > > │ <div><div></div><div><strong>Installing │ 00:00:10 verbose #40 > > │ Packages</strong><ul><li><span>FParsec.</span></li></ul></div><div></div></d │ 00:00:10 verbose #41 > > │ iv> │ 00:00:10 verbose #42 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:10 verbose #43 > > 00:00:10 verbose #44 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:10 verbose #45 > > │ <div><div></div><div><strong>Installing │ 00:00:10 verbose #46 > > │ Packages</strong><ul><li><span>FParsec..</span></li></ul></div><div></div></ │ 00:00:10 verbose #47 > > │ div> │ 00:00:10 verbose #48 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:11 verbose #49 > > 00:00:11 verbose #50 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:11 verbose #51 > > │ <div><div></div><div><strong>Installing │ 00:00:11 verbose #52 > > │ Packages</strong><ul><li><span>FParsec...</span></li></ul></div><div></div>< │ 00:00:11 verbose #53 > > │ /div> │ 00:00:11 verbose #54 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:11 verbose #55 > > 00:00:11 verbose #56 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:11 verbose #57 > > │ <div><div></div><div><strong>Installing │ 00:00:11 verbose #58 > > │ Packages</strong><ul><li><span>FParsec....</span></li></ul></div><div></div> │ 00:00:11 verbose #59 > > │ </div> │ 00:00:11 verbose #60 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:12 verbose #61 > > 00:00:12 verbose #62 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:12 verbose #63 > > │ <div><div></div><div><strong>Installing │ 00:00:12 verbose #64 > > │ Packages</strong><ul><li><span>FParsec.....</span></li></ul></div><div></div │ 00:00:12 verbose #65 > > │ ></div> │ 00:00:12 verbose #66 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:12 verbose #67 > > 00:00:12 verbose #68 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:12 verbose #69 > > │ <div><div></div><div><strong>Installing │ 00:00:12 verbose #70 > > │ Packages</strong><ul><li><span>FParsec......</span></li></ul></div><div></di │ 00:00:12 verbose #71 > > │ v></div> │ 00:00:12 verbose #72 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:13 verbose #73 > > 00:00:13 verbose #74 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:13 verbose #75 > > │ <div><div></div><div><strong>Installing │ 00:00:13 verbose #76 > > │ Packages</strong><ul><li><span>FParsec.......</span></li></ul></div><div></d │ 00:00:13 verbose #77 > > │ iv></div> │ 00:00:13 verbose #78 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:13 verbose #79 > > 00:00:13 verbose #80 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:13 verbose #81 > > │ <div><div></div><div><strong>Installing │ 00:00:13 verbose #82 > > │ Packages</strong><ul><li><span>FParsec........</span></li></ul></div><div></ │ 00:00:13 verbose #83 > > │ div></div> │ 00:00:13 verbose #84 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:14 verbose #85 > > 00:00:14 verbose #86 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:14 verbose #87 > > │ <div><div></div><div><strong>Installing │ 00:00:14 verbose #88 > > │ Packages</strong><ul><li><span>FParsec.........</span></li></ul></div><div>< │ 00:00:14 verbose #89 > > │ /div></div> │ 00:00:14 verbose #90 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:14 verbose #91 > > 00:00:14 verbose #92 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:14 verbose #93 > > │ <div><div></div><div><strong>Installing │ 00:00:14 verbose #94 > > │ Packages</strong><ul><li><span>FParsec..........</span></li></ul></div><div> │ 00:00:14 verbose #95 > > │ </div></div> │ 00:00:14 verbose #96 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:15 verbose #97 > > 00:00:15 verbose #98 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:15 verbose #99 > > │ <div><div></div><div><strong>Installing │ 00:00:15 verbose #100 > > │ Packages</strong><ul><li><span>FParsec...........</span></li></ul></div><div │ 00:00:15 verbose #101 > > │ ></div></div> │ 00:00:15 verbose #102 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:15 verbose #103 > > 00:00:15 verbose #104 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:15 verbose #105 > > │ <div><div></div><div><strong>Installing │ 00:00:15 verbose #106 > > │ Packages</strong><ul><li><span>FParsec............</span></li></ul></div><di │ 00:00:15 verbose #107 > > │ v></div></div> │ 00:00:15 verbose #108 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:16 verbose #109 > > 00:00:16 verbose #110 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:16 verbose #111 > > │ <div><div></div><div><strong>Installing │ 00:00:16 verbose #112 > > │ Packages</strong><ul><li><span>FParsec.............</span></li></ul></div><d │ 00:00:16 verbose #113 > > │ iv></div></div> │ 00:00:16 verbose #114 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:16 verbose #115 > > 00:00:16 verbose #116 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:16 verbose #117 > > │ <div><div></div><div><strong>Installing │ 00:00:16 verbose #118 > > │ Packages</strong><ul><li><span>FParsec..............</span></li></ul></div>< │ 00:00:16 verbose #119 > > │ div></div></div> │ 00:00:16 verbose #120 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:17 verbose #121 > > 00:00:17 verbose #122 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:17 verbose #123 > > │ <div><div></div><div><strong>Installing │ 00:00:17 verbose #124 > > │ Packages</strong><ul><li><span>FParsec...............</span></li></ul></div> │ 00:00:17 verbose #125 > > │ <div></div></div> │ 00:00:17 verbose #126 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:17 verbose #127 > > 00:00:17 verbose #128 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:17 verbose #129 > > │ <div><div></div><div><strong>Installing │ 00:00:17 verbose #130 > > │ Packages</strong><ul><li><span>FParsec................</span></li></ul></div │ 00:00:17 verbose #131 > > │ ><div></div></div> │ 00:00:17 verbose #132 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:18 verbose #133 > > 00:00:18 verbose #134 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:18 verbose #135 > > │ <div><div></div><div><strong>Installing │ 00:00:18 verbose #136 > > │ Packages</strong><ul><li><span>FParsec.................</span></li></ul></di │ 00:00:18 verbose #137 > > │ v><div></div></div> │ 00:00:18 verbose #138 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:18 verbose #139 > > 00:00:18 verbose #140 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:18 verbose #141 > > │ <div><div></div><div><strong>Installing │ 00:00:18 verbose #142 > > │ Packages</strong><ul><li><span>FParsec..................</span></li></ul></d │ 00:00:18 verbose #143 > > │ iv><div></div></div> │ 00:00:18 verbose #144 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:19 verbose #145 > > 00:00:19 verbose #146 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:19 verbose #147 > > │ <div><div></div><div><strong>Installing │ 00:00:19 verbose #148 > > │ Packages</strong><ul><li><span>FParsec...................</span></li></ul></ │ 00:00:19 verbose #149 > > │ div><div></div></div> │ 00:00:19 verbose #150 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:19 verbose #151 > > 00:00:19 verbose #152 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:19 verbose #153 > > │ <div><div></div><div><strong>Installing │ 00:00:19 verbose #154 > > │ Packages</strong><ul><li><span>FParsec....................</span></li></ul>< │ 00:00:19 verbose #155 > > │ /div><div></div></div> │ 00:00:19 verbose #156 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:20 verbose #157 > > 00:00:20 verbose #158 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:20 verbose #159 > > │ <div><div></div><div><strong>Installing │ 00:00:20 verbose #160 > > │ Packages</strong><ul><li><span>FParsec.....................</span></li></ul> │ 00:00:20 verbose #161 > > │ </div><div></div></div> │ 00:00:20 verbose #162 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:20 verbose #163 > > 00:00:20 verbose #164 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:20 verbose #165 > > │ <div><div></div><div><strong>Installing │ 00:00:20 verbose #166 > > │ Packages</strong><ul><li><span>FParsec......................</span></li></ul │ 00:00:20 verbose #167 > > │ ></div><div></div></div> │ 00:00:20 verbose #168 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:21 verbose #169 > > 00:00:21 verbose #170 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:21 verbose #171 > > │ <div><div></div><div><strong>Installing │ 00:00:21 verbose #172 > > │ Packages</strong><ul><li><span>FParsec.......................</span></li></u │ 00:00:21 verbose #173 > > │ l></div><div></div></div> │ 00:00:21 verbose #174 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:21 verbose #175 > > 00:00:21 verbose #176 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:21 verbose #177 > > │ <div><div></div><div><strong>Installing │ 00:00:21 verbose #178 > > │ Packages</strong><ul><li><span>FParsec........................</span></li></ │ 00:00:21 verbose #179 > > │ ul></div><div></div></div> │ 00:00:21 verbose #180 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:22 verbose #181 > > 00:00:22 verbose #182 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:22 verbose #183 > > │ <div><div></div><div><strong>Installing │ 00:00:22 verbose #184 > > │ Packages</strong><ul><li><span>FParsec.........................</span></li>< │ 00:00:22 verbose #185 > > │ /ul></div><div></div></div> │ 00:00:22 verbose #186 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:23 verbose #187 > > 00:00:23 verbose #188 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:23 verbose #189 > > │ <div><div></div><div><strong>Installing │ 00:00:23 verbose #190 > > │ Packages</strong><ul><li><span>FParsec..........................</span></li> │ 00:00:23 verbose #191 > > │ </ul></div><div></div></div> │ 00:00:23 verbose #192 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:23 verbose #193 > > 00:00:23 verbose #194 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:23 verbose #195 > > │ <div><div></div><div><strong>Installing │ 00:00:23 verbose #196 > > │ Packages</strong><ul><li><span>FParsec...........................</span></li │ 00:00:23 verbose #197 > > │ ></ul></div><div></div></div> │ 00:00:23 verbose #198 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:24 verbose #199 > > 00:00:24 verbose #200 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:24 verbose #201 > > │ <div><div></div><div><strong>Installing │ 00:00:24 verbose #202 > > │ Packages</strong><ul><li><span>FParsec............................</span></l │ 00:00:24 verbose #203 > > │ i></ul></div><div></div></div> │ 00:00:24 verbose #204 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:24 verbose #205 > > 00:00:24 verbose #206 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:24 verbose #207 > > │ <div><div></div><div><strong>Installing │ 00:00:24 verbose #208 > > │ Packages</strong><ul><li><span>FParsec.............................</span></ │ 00:00:24 verbose #209 > > │ li></ul></div><div></div></div> │ 00:00:24 verbose #210 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:25 verbose #211 > > 00:00:25 verbose #212 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:25 verbose #213 > > │ <div><div></div><div><strong>Installing │ 00:00:25 verbose #214 > > │ Packages</strong><ul><li><span>FParsec..............................</span>< │ 00:00:25 verbose #215 > > │ /li></ul></div><div></div></div> │ 00:00:25 verbose #216 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:25 verbose #217 > > 00:00:25 verbose #218 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:25 verbose #219 > > │ <div><div></div><div><strong>Installing │ 00:00:25 verbose #220 > > │ Packages</strong><ul><li><span>FParsec...............................</span> │ 00:00:25 verbose #221 > > │ </li></ul></div><div></div></div> │ 00:00:25 verbose #222 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:26 verbose #223 > > 00:00:26 verbose #224 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:26 verbose #225 > > │ <div><div></div><div><strong>Installing │ 00:00:26 verbose #226 > > │ Packages</strong><ul><li><span>FParsec................................</span │ 00:00:26 verbose #227 > > │ ></li></ul></div><div></div></div> │ 00:00:26 verbose #228 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:26 verbose #229 > > 00:00:26 verbose #230 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:26 verbose #231 > > │ <div><div></div><div><strong>Installing │ 00:00:26 verbose #232 > > │ Packages</strong><ul><li><span>FParsec.................................</spa │ 00:00:26 verbose #233 > > │ n></li></ul></div><div></div></div> │ 00:00:26 verbose #234 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:27 verbose #235 > > 00:00:27 verbose #236 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:27 verbose #237 > > │ <div><div></div><div><strong>Installing │ 00:00:27 verbose #238 > > │ Packages</strong><ul><li><span>FParsec..................................</sp │ 00:00:27 verbose #239 > > │ an></li></ul></div><div></div></div> │ 00:00:27 verbose #240 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:27 verbose #241 > > 00:00:27 verbose #242 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:27 verbose #243 > > │ <div><div></div><div><strong>Installing │ 00:00:27 verbose #244 > > │ Packages</strong><ul><li><span>FParsec...................................</s │ 00:00:27 verbose #245 > > │ pan></li></ul></div><div></div></div> │ 00:00:27 verbose #246 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:28 verbose #247 > > 00:00:28 verbose #248 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:28 verbose #249 > > │ <div><div></div><div><strong>Installing │ 00:00:28 verbose #250 > > │ Packages</strong><ul><li><span>FParsec....................................</ │ 00:00:28 verbose #251 > > │ span></li></ul></div><div></div></div> │ 00:00:28 verbose #252 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:28 verbose #253 > > 00:00:28 verbose #254 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:28 verbose #255 > > │ <div><div></div><div><strong>Installing │ 00:00:28 verbose #256 > > │ Packages</strong><ul><li><span>FParsec.....................................< │ 00:00:28 verbose #257 > > │ /span></li></ul></div><div></div></div> │ 00:00:28 verbose #258 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:28 verbose #259 > > 00:00:28 verbose #260 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:28 verbose #261 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:28 verbose #262 > > │ Package added: fsharp.core,4.3.4 │ 00:00:28 verbose #263 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:28 verbose #264 > > 00:00:28 verbose #265 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:28 verbose #266 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:28 verbose #267 > > │ Package added: FParsec,1.1.1 │ 00:00:28 verbose #268 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:28 verbose #269 > > 00:00:28 verbose #270 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:28 verbose #271 > > │ <div><div></div><div></div><div><strong>Installed │ 00:00:28 verbose #272 > > │ Packages</strong><ul><li><span>FParsec, 1.1.1</span></li></ul></div></div> │ 00:00:28 verbose #273 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:29 verbose #274 > > 00:00:29 verbose #275 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:29 verbose #276 > > //// test 00:00:29 verbose #277 > > 00:00:29 verbose #278 > > nominal position_ = $'FParsec.Position' 00:00:29 verbose #279 > > nominal parser_error_ = $'FParsec.Error.ParserError' 00:00:29 verbose #280 > > 00:00:29 verbose #281 > > nominal reply_ t = $'FParsec.Reply<`t>' 00:00:29 verbose #282 > > 00:00:29 verbose #283 > > nominal char_stream_ t = $'FParsec.CharStream<`t>' 00:00:29 verbose #284 > > 00:00:29 verbose #285 > > // nominal parser t u = char_stream u -> reply t 00:00:29 verbose #286 > > nominal parser_ t u = $'FParsec.Primitives.Parser<`t, `u>' 00:00:29 verbose #287 > > 00:00:29 verbose #288 > > inl p_char_ forall t. (x : char) : parser_ char t = 00:00:29 verbose #289 > > x |> $'FParsec.CharParsers.pchar' 00:00:29 verbose #290 > > 00:00:29 verbose #291 > > inl p_string_ forall t. (x : string) : parser_ string t = 00:00:29 verbose #292 > > x |> $'FParsec.CharParsers.pstring' 00:00:29 verbose #293 > > 00:00:29 verbose #294 > > inl (>>.$) forall t u v. (a : parser_ t v) (b : parser_ u v) : parser_ u v = 00:00:29 verbose #295 > > b |> $'FParsec.Primitives.(>>.)' a 00:00:29 verbose #296 > > 00:00:29 verbose #297 > > inl (.>>$) forall t u v. (a : parser_ t v) (b : parser_ u v) : parser_ t v = 00:00:29 verbose #298 > > b |> $'FParsec.Primitives.(.>>)' a 00:00:29 verbose #299 > > 00:00:29 verbose #300 > > inl (.>>.$) forall t u v. (a : parser_ t v) (b : parser_ u v) : parser_ (pair t 00:00:29 verbose #301 > > u) v = 00:00:29 verbose #302 > > b |> $'FParsec.Primitives.(.>>.)' a 00:00:29 verbose #303 > > 00:00:29 verbose #304 > > inl (>>%$) forall t u v. (a : parser_ t v) (b : u) : parser_ u v = 00:00:29 verbose #305 > > b |> $'FParsec.Primitives.(>>%)' a 00:00:29 verbose #306 > > 00:00:29 verbose #307 > > inl (>>=$) forall t u v. (a : parser_ t v) (b : t -> parser_ u v) : parser_ u v 00:00:29 verbose #308 > > = 00:00:29 verbose #309 > > b |> $'FParsec.Primitives.(>>=)' a 00:00:29 verbose #310 > > 00:00:29 verbose #311 > > inl (|>>$) forall t u v. (a : parser_ t v) (b : t -> u) : parser_ u v = 00:00:29 verbose #312 > > inl b = fun x => x |> b 00:00:29 verbose #313 > > b |> $'FParsec.Primitives.(|>>)' a 00:00:29 verbose #314 > > 00:00:29 verbose #315 > > inl any_char_ () : parser_ char _ = 00:00:29 verbose #316 > > $'FParsec.CharParsers.anyChar' 00:00:29 verbose #317 > > 00:00:29 verbose #318 > > inl any_string_ () : parser_ string _ = 00:00:29 verbose #319 > > $'FParsec.CharParsers.anyString' 00:00:29 verbose #320 > > 00:00:29 verbose #321 > > inl any_string__ (n : i32) : parser_ string _ = 00:00:29 verbose #322 > > n |> $'FParsec.CharParsers.anyString' 00:00:29 verbose #323 > > 00:00:29 verbose #324 > > inl eof_ () : parser_ () _ = 00:00:29 verbose #325 > > $'FParsec.CharParsers.eof' 00:00:29 verbose #326 > > 00:00:29 verbose #327 > > inl spaces_ () : parser_ () () = 00:00:29 verbose #328 > > $'FParsec.CharParsers.spaces' 00:00:29 verbose #329 > > 00:00:29 verbose #330 > > inl spaces1_ () : parser_ () () = 00:00:29 verbose #331 > > $'FParsec.CharParsers.spaces1' 00:00:29 verbose #332 > > 00:00:29 verbose #333 > > inl (<|>$) forall t u. (a : parser_ t u) (b : parser_ t u) : parser_ t u = 00:00:29 verbose #334 > > b |> $'FParsec.Primitives.(<|>)' a 00:00:29 verbose #335 > > 00:00:29 verbose #336 > > inl many_satisfy_ forall t. (x : char -> bool) : parser_ string t = 00:00:29 verbose #337 > > x |> $'FParsec.CharParsers.manySatisfy' 00:00:29 verbose #338 > > 00:00:29 verbose #339 > > inl satisfy_ forall t. (x : char -> bool) : parser_ char t = 00:00:29 verbose #340 > > x |> $'FParsec.CharParsers.satisfy' 00:00:29 verbose #341 > > 00:00:29 verbose #342 > > inl none_of_ (x : list char) : parser_ char () = 00:00:29 verbose #343 > > x 00:00:29 verbose #344 > > |> listm'.box 00:00:29 verbose #345 > > |> listm'.to_array' 00:00:29 verbose #346 > > |> $'FParsec.CharParsers.noneOf' 00:00:29 verbose #347 > > 00:00:29 verbose #348 > > inl any_of_ (x : list char) : parser_ char () = 00:00:29 verbose #349 > > x 00:00:29 verbose #350 > > |> listm'.box 00:00:29 verbose #351 > > |> listm'.to_array' 00:00:29 verbose #352 > > |> $'FParsec.CharParsers.anyOf' 00:00:29 verbose #353 > > 00:00:29 verbose #354 > > inl skip_any_of_ (x : list char) : parser_ () () = 00:00:29 verbose #355 > > x 00:00:29 verbose #356 > > |> listm'.box 00:00:29 verbose #357 > > |> listm'.to_array' 00:00:29 verbose #358 > > |> $'FParsec.CharParsers.skipAnyOf' 00:00:29 verbose #359 > > 00:00:29 verbose #360 > > inl between_ forall t u v x. (a : parser_ t x) (b : parser_ u x) (c : parser_ v 00:00:29 verbose #361 > > x) : parser_ v x = 00:00:29 verbose #362 > > c |> $'FParsec.Primitives.between' a b 00:00:29 verbose #363 > > 00:00:29 verbose #364 > > inl many_chars_ forall t. (x : parser_ char t) : parser_ string t = 00:00:29 verbose #365 > > x |> $'FParsec.CharParsers.manyChars' 00:00:29 verbose #366 > > 00:00:29 verbose #367 > > inl many1_chars_ forall t. (x : parser_ char t) : parser_ string t = 00:00:29 verbose #368 > > x |> $'FParsec.CharParsers.many1Chars' 00:00:29 verbose #369 > > 00:00:29 verbose #370 > > inl many_strings_ forall t. (x : parser_ string t) : parser_ string t = 00:00:29 verbose #371 > > x |> $'FParsec.CharParsers.manyStrings' 00:00:29 verbose #372 > > 00:00:29 verbose #373 > > inl skip_any_string_ forall t. (n : i32) : parser_ () t = 00:00:29 verbose #374 > > n |> $'FParsec.CharParsers.skipAnyString' 00:00:29 verbose #375 > > 00:00:29 verbose #376 > > inl many1_strings_ forall t. (x : parser_ string t) : parser_ string t = 00:00:29 verbose #377 > > x |> $'FParsec.CharParsers.many1Strings' 00:00:29 verbose #378 > > 00:00:29 verbose #379 > > inl opt_ forall t u. (a : parser_ t u) : parser_ (optionm'.option' t) u = 00:00:29 verbose #380 > > a |> $'FParsec.Primitives.opt' 00:00:29 verbose #381 > > 00:00:29 verbose #382 > > inl choice_ forall t u. (a : list (parser_ t u)) : parser_ t u = 00:00:29 verbose #383 > > a 00:00:29 verbose #384 > > |> listm'.box 00:00:29 verbose #385 > > |> seq.of_list' 00:00:29 verbose #386 > > |> $'FParsec.Primitives.choice' 00:00:29 verbose #387 > > 00:00:29 verbose #388 > > inl delay_ forall t u. (fn : () -> parser_ t u) : parser_ t u = 00:00:29 verbose #389 > > fn |> $'FParsec.Primitives.parse.Delay' 00:00:29 verbose #390 > > 00:00:29 verbose #391 > > inl peek_ forall t u. (a : parser_ t u) : parser_ char u = 00:00:29 verbose #392 > > $'!a.Peek ()' 00:00:29 verbose #393 > > 00:00:29 verbose #394 > > inl not_followed_by_ forall t u. (a : parser_ t u) : parser_ () u = 00:00:29 verbose #395 > > a |> $'FParsec.Primitives.notFollowedBy' 00:00:29 verbose #396 > > 00:00:29 verbose #397 > > inl sep_by_ forall t u v. (a : parser_ t v) (b : parser_ u v) : parser_ 00:00:29 verbose #398 > > (listm'.list' t) v = 00:00:29 verbose #399 > > b |> $'FParsec.Primitives.sepBy' a 00:00:29 verbose #400 > > 00:00:29 verbose #401 > > inl sep_by1_ forall t u v. (a : parser_ t v) (b : parser_ u v) : parser_ 00:00:29 verbose #402 > > (listm'.list' t) v = 00:00:29 verbose #403 > > b |> $'FParsec.Primitives.sepBy1' a 00:00:29 verbose #404 > > 00:00:29 verbose #405 > > inl sep_end_by_ forall t u v. (a : parser_ t v) (b : parser_ u v) : parser_ 00:00:29 verbose #406 > > (listm'.list' t) v = 00:00:29 verbose #407 > > b |> $'FParsec.Primitives.sepEndBy' a 00:00:29 verbose #408 > > 00:00:29 verbose #409 > > inl many_ forall t u. (a : parser_ t u) : parser_ (listm'.list' t) u = 00:00:29 verbose #410 > > a |> $'FParsec.Primitives.many' 00:00:29 verbose #411 > > 00:00:29 verbose #412 > > inl many1_ forall t u. (a : parser_ t u) : parser_ (listm'.list' t) u = 00:00:29 verbose #413 > > a |> $'FParsec.Primitives.many1' 00:00:29 verbose #414 > > 00:00:29 verbose #415 > > inl many1_satisfy_ forall t. (x : char -> bool) : parser_ string t = 00:00:29 verbose #416 > > x |> $'FParsec.CharParsers.many1Satisfy' 00:00:29 verbose #417 > > 00:00:29 verbose #418 > > nominal parser_result'_ t u = $'FParsec.CharParsers.ParserResult<`t, `u>' 00:00:29 verbose #419 > > 00:00:29 verbose #420 > > inl run_ forall t. (parser : parser_ t ()) (x : string) : parser_result'_ t () = 00:00:29 verbose #421 > > x |> $'FParsec.CharParsers.run' parser 00:00:29 verbose #422 > > 00:00:29 verbose #423 > > union parser_result_ t u = 00:00:29 verbose #424 > > | Success : t * u * position_ 00:00:29 verbose #425 > > | Failure : string * parser_error_ * u 00:00:29 verbose #426 > > 00:00:29 verbose #427 > > inl parser_result_ forall t u. = function 00:00:29 verbose #428 > > | Success (a, b, c) => $'`(parser_result'_ t u).Success (!a, !b, !c)' : 00:00:29 verbose #429 > > parser_result'_ t u 00:00:29 verbose #430 > > | Failure (a, b, c) => $'`(parser_result'_ t u).Failure (!a, !b, !c)' : 00:00:29 verbose #431 > > parser_result'_ t u 00:00:29 verbose #432 > > 00:00:29 verbose #433 > > inl parser_result'_ forall t u. (x : parser_result'_ t u) : parser_result_ t u = 00:00:29 verbose #434 > > $'let mutable _!x = None ' 00:00:29 verbose #435 > > $'match !x with' 00:00:29 verbose #436 > > $'| FParsec.CharParsers.Success (a, b, c) -> (' : () 00:00:29 verbose #437 > > $'(fun () ->' 00:00:29 verbose #438 > > $'(fun () ->' 00:00:29 verbose #439 > > (Success ((dyn $'a'), dyn $'b', dyn $'c') : _ t u) |> emit_unit 00:00:29 verbose #440 > > $')' 00:00:29 verbose #441 > > $'|> fun x -> x ()' 00:00:29 verbose #442 > > $') () ) | FParsec.CharParsers.Failure (a, b, c) -> (' : () 00:00:29 verbose #443 > > $'(fun () ->' 00:00:29 verbose #444 > > $'(fun () ->' 00:00:29 verbose #445 > > (Failure ((dyn $'a'), dyn $'b', dyn $'c') : _ t u) |> emit_unit 00:00:29 verbose #446 > > $')' 00:00:29 verbose #447 > > $'|> fun x -> x ()' 00:00:29 verbose #448 > > $') () )' : () 00:00:29 verbose #449 > > $'|> fun x -> _!x <- Some x' 00:00:29 verbose #450 > > $'match _!x with Some x -> x | None -> failwith "??? / _!x=None"' 00:00:29 verbose #451 > > 00:00:29 verbose #452 > > inl parse_ parser input : result _ _ = 00:00:29 verbose #453 > > match input |> run_ parser |> parser_result'_ with 00:00:29 verbose #454 > > | Success (result, b, c) => Ok (result, c) 00:00:29 verbose #455 > > | Failure (error_msg, b, c) => Error (error_msg, b) 00:00:29 verbose #456 > > 00:00:29 verbose #457 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:29 verbose #458 > > //// test 00:00:29 verbose #459 > > 00:00:29 verbose #460 > > inl split_args (args : string) : result (array_base (string * position_)) 00:00:29 verbose #461 > > (string * parser_error_) = 00:00:29 verbose #462 > > inl esc = [[ '\\'; '`' ]] 00:00:29 verbose #463 > > inl quotes = [[ '"' ]] 00:00:29 verbose #464 > > inl special = esc ++ quotes 00:00:29 verbose #465 > > inl p_esc_char c = 00:00:29 verbose #466 > > p_char_ c >>.$ any_char_ () |>>$ fun c' => $'$"{!c}{!c'}"' 00:00:29 verbose #467 > > inl p_word = special |> none_of_ |>>$ sm'.obj_to_string 00:00:29 verbose #468 > > inl p_plain = special ++ [[ ' ' ]] |> none_of_ |> many1_chars_ 00:00:29 verbose #469 > > inl p_text = p_word |> many1_strings_ 00:00:29 verbose #470 > > inl p_esc = esc |> listm.map p_esc_char |> choice_ 00:00:29 verbose #471 > > inl p_quoted = (p_word <|>$ p_esc) |> many_ |>>$ (seq.of_list' >> sm'.concat 00:00:29 verbose #472 > > "") 00:00:29 verbose #473 > > inl p_quoted_all = p_quoted |> between_ (p_char_ '"') (p_char_ '"') 00:00:29 verbose #474 > > inl p_esc_root = p_esc |>>$ (fun _ => "") >>.$ (p_word |> many_) |>>$ 00:00:29 verbose #475 > > (seq.of_list' >> sm'.concat "") 00:00:29 verbose #476 > > inl p_content = p_plain <|>$ p_quoted_all <|>$ p_esc_root 00:00:29 verbose #477 > > inl p_args = spaces1_ () |> sep_by_ p_content 00:00:29 verbose #478 > > args 00:00:29 verbose #479 > > |> parse_ p_args 00:00:29 verbose #480 > > |> resultm.map fun (a', b') => 00:00:29 verbose #481 > > ( 00:00:29 verbose #482 > > ( 00:00:29 verbose #483 > > a' 00:00:29 verbose #484 > > |> listm'.to_array' 00:00:29 verbose #485 > > |> a 00:00:29 verbose #486 > > |> am.map fun x => x, b' 00:00:29 verbose #487 > > |> fun (a x : _ i32 _) => x 00:00:29 verbose #488 > > ) 00:00:29 verbose #489 > > ) 00:00:29 verbose #490 > > 00:00:29 verbose #491 > > [[ 00:00:29 verbose #492 > > "a b c", 00:00:29 verbose #493 > > ;[[ "a"; "b"; "c" ]] 00:00:29 verbose #494 > > 00:00:29 verbose #495 > > "e f \"g h\" i", 00:00:29 verbose #496 > > ;[[ "e"; "f"; "g h"; "i" ]] 00:00:29 verbose #497 > > 00:00:29 verbose #498 > > "\"j k\" \"l\" \"m\"", 00:00:29 verbose #499 > > ;[[ "j k"; "l"; "m" ]] 00:00:29 verbose #500 > > 00:00:29 verbose #501 > > "s -t \"u \`\"v\`\" w\"", 00:00:29 verbose #502 > > ;[[ "s"; "-t"; "u \`\"v\`\" w" ]] 00:00:29 verbose #503 > > 00:00:29 verbose #504 > > "n -o \"p \\\"q\\\" r\"", 00:00:29 verbose #505 > > ;[[ "n"; "-o"; "p \\\"q\\\" r" ]] 00:00:29 verbose #506 > > 00:00:29 verbose #507 > > "r -s \"t \\\"u\\\"\"", 00:00:29 verbose #508 > > ;[[ "r"; "-s"; "t \\\"u\\\"" ]] 00:00:29 verbose #509 > > 00:00:29 verbose #510 > > $'$"x -y \\\"$z -a \'(b=\\\\\\"c-id=)[[a-fA-F0-9]]{{8}}\', {{ \`$_[[1]] + 00:00:29 verbose #511 > > \`$d++ }}\\\""', 00:00:29 verbose #512 > > ;[[ "x"; "-y"; "$z -a '(b=\\\"c-id=)[[a-fA-F0-9]]{8}', { `$_[[1]] + `$d++ }" 00:00:29 verbose #513 > > ]] 00:00:29 verbose #514 > > 00:00:29 verbose #515 > > "e -f \"$g -h '(i=`\"j-id=)[[a-fA-F0-9]]{8}', { `$_[[1]] + `$k++ }\"", 00:00:29 verbose #516 > > ;[[ "e"; "-f"; "$g -h '(i=`\"j-id=)[[a-fA-F0-9]]{8}', { `$_[[1]] + `$k++ }" 00:00:29 verbose #517 > > ]] 00:00:29 verbose #518 > > 00:00:29 verbose #519 > > $'$"--l \\\\\\"\'\'\' m \'\'\'\\\\\\" "', 00:00:29 verbose #520 > > ;[[ "--l"; "''' m '''" ]] 00:00:29 verbose #521 > > 00:00:29 verbose #522 > > $'$"n --o --p q --r \\\"s:/t u/v.w\\\" --x \\\"y:/z.a\\\" --b c.d 00:00:29 verbose #523 > > \\\"\\\\e{{f-g}}\\\" h.i \\\"j (k)\\\""', 00:00:29 verbose #524 > > ;[[ "n"; "--o"; "--p"; "q"; "--r"; "s:/t u/v.w"; "--x"; "y:/z.a"; "--b"; 00:00:29 verbose #525 > > "c.d"; "\\e{f-g}"; "h.i"; "j (k)" ]] 00:00:29 verbose #526 > > 00:00:29 verbose #527 > > $'\@$"l ""m n:\\o.p"""', 00:00:29 verbose #528 > > ;[[ "l"; "m n:\\o.p" ]] 00:00:29 verbose #529 > > ]] 00:00:29 verbose #530 > > |> listm.rev 00:00:29 verbose #531 > > |> listm.map fun input, expected => 00:00:29 verbose #532 > > input 00:00:29 verbose #533 > > |> split_args 00:00:29 verbose #534 > > |> fun x => 00:00:29 verbose #535 > > try 00:00:29 verbose #536 > > fun () => 00:00:29 verbose #537 > > ($'$"\ninput: {!input}"' : string) 00:00:29 verbose #538 > > |> console.write_line 00:00:29 verbose #539 > > x 00:00:29 verbose #540 > > |> resultm.get 00:00:29 verbose #541 > > |> am'.map_base fst 00:00:29 verbose #542 > > |> _assert_eq' expected 00:00:29 verbose #543 > > false 00:00:29 verbose #544 > > fun ex => 00:00:29 verbose #545 > > ($'$"error / expected: %A{!expected} / ex: %A{!ex}"' : string) 00:00:29 verbose #546 > > |> console.write_line 00:00:29 verbose #547 > > Some true 00:00:29 verbose #548 > > |> optionm.value 00:00:29 verbose #549 > > |> listm'.filter id 00:00:29 verbose #550 > > |> function 00:00:29 verbose #551 > > | [[]] => () 00:00:29 verbose #552 > > | x => failwith $'$"{!x}"' 00:00:33 verbose #553 > > 00:00:33 verbose #554 > > ╭─[ 3.78s - stdout ]───────────────────────────────────────────────────────────╮ 00:00:33 verbose #555 > > │ │ 00:00:33 verbose #556 > > │ input: a b c │ 00:00:33 verbose #557 > > │ __assert_eq' / actual: [|"a"; "b"; "c"|] / expected: [|"a"; "b"; "c"|] │ 00:00:33 verbose #558 > > │ │ 00:00:33 verbose #559 > > │ input: e f "g h" i │ 00:00:33 verbose #560 > > │ __assert_eq' / actual: [|"e"; "f"; "g h"; "i"|] / expected: [|"e"; "f"; "g │ 00:00:33 verbose #561 > > │ h"; "i"|] │ 00:00:33 verbose #562 > > │ │ 00:00:33 verbose #563 > > │ input: "j k" "l" "m" │ 00:00:33 verbose #564 > > │ __assert_eq' / actual: [|"j k"; "l"; "m"|] / expected: [|"j k"; "l"; "m"|] │ 00:00:33 verbose #565 > > │ │ 00:00:33 verbose #566 > > │ input: s -t "u `"v`" w" │ 00:00:33 verbose #567 > > │ __assert_eq' / actual: [|"s"; "-t"; "u `"v`" w"|] / expected: [|"s"; "-t"; │ 00:00:33 verbose #568 > > │ "u `"v`" w"|] │ 00:00:33 verbose #569 > > │ │ 00:00:33 verbose #570 > > │ input: n -o "p \"q\" r" │ 00:00:33 verbose #571 > > │ __assert_eq' / actual: [|"n"; "-o"; "p \"q\" r"|] / expected: [|"n"; "-o"; │ 00:00:33 verbose #572 > > │ "p \"q\" r"|] │ 00:00:33 verbose #573 > > │ │ 00:00:33 verbose #574 > > │ input: r -s "t \"u\"" │ 00:00:33 verbose #575 > > │ __assert_eq' / actual: [|"r"; "-s"; "t \"u\""|] / expected: [|"r"; "-s"; "t │ 00:00:33 verbose #576 > > │ \"u\""|] │ 00:00:33 verbose #577 > > │ │ 00:00:33 verbose #578 > > │ input: x -y "$z -a '(b=\"c-id=)[a-fA-F0-9]{8}', { `$_[1] + `$d++ }" │ 00:00:33 verbose #579 > > │ __assert_eq' / actual: [|"x"; "-y"; "$z -a '(b=\"c-id=)[a-fA-F0-9]{8}', { │ 00:00:33 verbose #580 > > │ `$_[1] + `$d++ }"|] / expected: [|"x"; "-y"; "$z -a '(b=\"c-id=)[ │ 00:00:33 verbose #581 > > │ a-fA-F0-9]{8}', { `$_[1] + `$d++ }"|] │ 00:00:33 verbose #582 > > │ │ 00:00:33 verbose #583 > > │ input: e -f "$g -h '(i=`"j-id=)[a-fA-F0-9]{8}', { `$_[1] + `$k++ }" │ 00:00:33 verbose #584 > > │ __assert_eq' / actual: [|"e"; "-f"; "$g -h '(i=`"j-id=)[a-fA-F0-9]{8}', { │ 00:00:33 verbose #585 > > │ `$_[1] + `$k++ }"|] / expected: [|"e"; "-f"; "$g -h '(i=`"j-id=)[ │ 00:00:33 verbose #586 > > │ a-fA-F0-9]{8}', { `$_[1] + `$k++ }"|] │ 00:00:33 verbose #587 > > │ │ 00:00:33 verbose #588 > > │ input: --l \"''' m '''\" │ 00:00:33 verbose #589 > > │ __assert_eq' / actual: [|"--l"; "''' m '''"|] / expected: [|"--l"; "''' m │ 00:00:33 verbose #590 > > │ '''"|] │ 00:00:33 verbose #591 > > │ │ 00:00:33 verbose #592 > > │ input: n --o --p q --r "s:/t u/v.w" --x "y:/z.a" --b c.d "\e{f-g}" h.i "j │ 00:00:33 verbose #593 > > │ (k)" │ 00:00:33 verbose #594 > > │ __assert_eq' / actual: [|"n"; "--o"; "--p"; "q"; "--r"; "s:/t u/v.w"; "--x"; │ 00:00:33 verbose #595 > > │ "y:/z.a"; "--b"; "c.d"; │ 00:00:33 verbose #596 > > │ "\e{f-g}"; "h.i"; "j (k)"|] / expected: [|"n"; "--o"; "--p"; "q"; "--r"; │ 00:00:33 verbose #597 > > │ "s:/t u/v.w"; "--x"; "y:/z.a"; "--b"; "c.d"; │ 00:00:33 verbose #598 > > │ "\e{f-g}"; "h.i"; "j (k)"|] │ 00:00:33 verbose #599 > > │ │ 00:00:33 verbose #600 > > │ input: l "m n:\o.p" │ 00:00:33 verbose #601 > > │ __assert_eq' / actual: [|"l"; "m n:\o.p"|] / expected: [|"l"; "m n:\o.p"|] │ 00:00:33 verbose #602 > > │ │ 00:00:33 verbose #603 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:33 verbose #604 > > 00:00:33 verbose #605 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:33 verbose #606 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:33 verbose #607 > > │ ## parsing │ 00:00:33 verbose #608 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:33 verbose #609 > > 00:00:33 verbose #610 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:33 verbose #611 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:33 verbose #612 > > │ ### range │ 00:00:33 verbose #613 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:33 verbose #614 > > 00:00:33 verbose #615 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:33 verbose #616 > > type range = 00:00:33 verbose #617 > > { 00:00:33 verbose #618 > > from : int 00:00:33 verbose #619 > > to : int 00:00:33 verbose #620 > > } 00:00:34 verbose #621 > > 00:00:34 verbose #622 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:34 verbose #623 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:34 verbose #624 > > │ ### position │ 00:00:34 verbose #625 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:34 verbose #626 > > 00:00:34 verbose #627 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:34 verbose #628 > > type position = 00:00:34 verbose #629 > > { 00:00:34 verbose #630 > > line : int 00:00:34 verbose #631 > > col : int 00:00:34 verbose #632 > > } 00:00:34 verbose #633 > > 00:00:34 verbose #634 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:34 verbose #635 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:34 verbose #636 > > │ ### parser_state │ 00:00:34 verbose #637 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:34 verbose #638 > > 00:00:34 verbose #639 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:34 verbose #640 > > nominal parser_state = 00:00:34 verbose #641 > > { 00:00:34 verbose #642 > > line_text : sm'.string_builder 00:00:34 verbose #643 > > position : position 00:00:34 verbose #644 > > } 00:00:34 verbose #645 > > 00:00:34 verbose #646 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:34 verbose #647 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:34 verbose #648 > > │ ### parser │ 00:00:34 verbose #649 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:34 verbose #650 > > 00:00:34 verbose #651 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:34 verbose #652 > > type parser t = string * parser_state -> result (t * string * parser_state) 00:00:34 verbose #653 > > string 00:00:35 verbose #654 > > 00:00:35 verbose #655 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:35 verbose #656 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:35 verbose #657 > > │ ### parse │ 00:00:35 verbose #658 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:35 verbose #659 > > 00:00:35 verbose #660 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:35 verbose #661 > > inl parse forall t. (p : parser t) (input : string) : result (t * string * 00:00:35 verbose #662 > > parser_state) string = 00:00:35 verbose #663 > > inl input = 00:00:35 verbose #664 > > input 00:00:35 verbose #665 > > |> optionm'.of_obj 00:00:35 verbose #666 > > |> optionm'.default_value' "" 00:00:35 verbose #667 > > p (input, { line_text = "" |> sm'.string_builder; position = { line = 1; col 00:00:35 verbose #668 > > = 1 } } |> parser_state) 00:00:35 verbose #669 > > 00:00:35 verbose #670 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:35 verbose #671 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:35 verbose #672 > > │ ### inc │ 00:00:35 verbose #673 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:35 verbose #674 > > 00:00:35 verbose #675 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:35 verbose #676 > > inl inc c (parser_state s) = 00:00:35 verbose #677 > > match c with 00:00:35 verbose #678 > > | '\n' => { line = s.position.line + 1; col = 1 } 00:00:35 verbose #679 > > | _ => { s.position with col = s.position.col + 1 }.position 00:00:36 verbose #680 > > 00:00:36 verbose #681 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:36 verbose #682 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:36 verbose #683 > > │ ### update │ 00:00:36 verbose #684 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:36 verbose #685 > > 00:00:36 verbose #686 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:36 verbose #687 > > inl update result s = 00:00:36 verbose #688 > > (s, result |> sm'.to_char_array |> a |> (fun x => x : _ int _) |> 00:00:36 verbose #689 > > am'.to_list' |> listm'.unbox) 00:00:36 verbose #690 > > ||> listm.fold fun (parser_state s) c => 00:00:36 verbose #691 > > { s with 00:00:36 verbose #692 > > position = s |> parser_state |> inc c 00:00:36 verbose #693 > > line_text = 00:00:36 verbose #694 > > match c with 00:00:36 verbose #695 > > | '\n' => s.line_text |> sm'.builder_clear 00:00:36 verbose #696 > > | c => s.line_text |> sm'.builder_append (sm'.obj_to_string c) 00:00:36 verbose #697 > > } |> parser_state 00:00:37 verbose #698 > > 00:00:37 verbose #699 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:37 verbose #700 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:37 verbose #701 > > │ ### any_char │ 00:00:37 verbose #702 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:37 verbose #703 > > 00:00:37 verbose #704 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:37 verbose #705 > > inl any_char () : parser char = function 00:00:37 verbose #706 > > | "", s => Error $'$"parsing.any_char / unexpected end of input / s: 00:00:37 verbose #707 > > %A{!s}"' 00:00:37 verbose #708 > > | x, s => 00:00:37 verbose #709 > > inl first_char = x |> sm'.index 0i32 00:00:37 verbose #710 > > inl rest = x |> sm'.range (am'.Start 1i32) (am'.End id) 00:00:37 verbose #711 > > in Ok (first_char, rest, s |> update (sm'.obj_to_string first_char)) 00:00:37 verbose #712 > > 00:00:37 verbose #713 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:37 verbose #714 > > //// test 00:00:37 verbose #715 > > 00:00:37 verbose #716 > > "abc" 00:00:37 verbose #717 > > |> parse (any_char ()) 00:00:37 verbose #718 > > |> resultm.get 00:00:37 verbose #719 > > |> sm'.format_debug 00:00:37 verbose #720 > > |> _assert_eq ( 00:00:37 verbose #721 > > ('a', "bc", { line_text = "a" |> sm'.string_builder; position = { line = 00:00:37 verbose #722 > > 1i32; col = 2i32 } }) 00:00:37 verbose #723 > > |> sm'.format_debug 00:00:37 verbose #724 > > ) 00:00:38 verbose #725 > > 00:00:38 verbose #726 > > ╭─[ 718.43ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:38 verbose #727 > > │ __assert_eq / actual: "struct ('a', "bc", a, 1, 2)" / expected: "struct │ 00:00:38 verbose #728 > > │ ('a', "bc", a, 1, 2)" │ 00:00:38 verbose #729 > > │ │ 00:00:38 verbose #730 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:38 verbose #731 > > 00:00:38 verbose #732 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:38 verbose #733 > > //// test 00:00:38 verbose #734 > > 00:00:38 verbose #735 > > "abc" 00:00:38 verbose #736 > > |> parse_ (any_char_ ()) 00:00:38 verbose #737 > > |> resultm.get 00:00:38 verbose #738 > > |> sm'.format_debug 00:00:38 verbose #739 > > |> _assert_eq' (('a', ($'FParsec.Position (null, 0, 1, 2)' : position_)) |> 00:00:38 verbose #740 > > sm'.format_debug) 00:00:38 verbose #741 > > 00:00:38 verbose #742 > > ╭─[ 575.27ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:38 verbose #743 > > │ __assert_eq' / actual: "struct ('a', (Ln: 1, Col: 2))" / expected: "struct │ 00:00:38 verbose #744 > > │ ('a', (Ln: 1, Col: 2))" │ 00:00:38 verbose #745 > > │ │ 00:00:38 verbose #746 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:38 verbose #747 > > 00:00:38 verbose #748 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:38 verbose #749 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:38 verbose #750 > > │ ### p_char │ 00:00:38 verbose #751 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:38 verbose #752 > > 00:00:38 verbose #753 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:38 verbose #754 > > inl p_char (c : char) : parser char = function 00:00:38 verbose #755 > > | "", s => Error $'$"parsing.p_char / unexpected end of input / s: %A{!s}"' 00:00:38 verbose #756 > > | input, parser_state ({ line_text position = { line col } } as s) => 00:00:38 verbose #757 > > inl first_char = input |> sm'.index 0i32 00:00:38 verbose #758 > > if first_char = c 00:00:38 verbose #759 > > then Ok ( 00:00:38 verbose #760 > > first_char, 00:00:38 verbose #761 > > input |> sm'.range (am'.Start 1i32) (am'.End id), 00:00:38 verbose #762 > > s |> parser_state |> update (sm'.obj_to_string first_char) 00:00:38 verbose #763 > > ) 00:00:38 verbose #764 > > else 00:00:38 verbose #765 > > inl message : string = 00:00:38 verbose #766 > > inl rest = 00:00:38 verbose #767 > > input 00:00:38 verbose #768 > > |> sm'.range 00:00:38 verbose #769 > > (am'.Start 0i32) 00:00:38 verbose #770 > > (am'.End fun l => 00:00:38 verbose #771 > > match (input |> sm'.index_of "\n") - 1 with 00:00:38 verbose #772 > > | -2 => l 00:00:38 verbose #773 > > | l => l 00:00:38 verbose #774 > > ) 00:00:38 verbose #775 > > $'$"parsing.p_char / expected: \'{!c}\' / line: {!line} / col: 00:00:38 verbose #776 > > {!col}\n{!line_text}{!rest}"' 00:00:38 verbose #777 > > inl pointer_line = (sm'.replicate (col - 1) " ") +. "^" 00:00:38 verbose #778 > > $'$"{!message}\n{!pointer_line}\n"' |> Error 00:00:39 verbose #779 > > 00:00:39 verbose #780 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:39 verbose #781 > > //// test 00:00:39 verbose #782 > > 00:00:39 verbose #783 > > "abc" 00:00:39 verbose #784 > > |> parse (p_char 'a') 00:00:39 verbose #785 > > |> resultm.get 00:00:39 verbose #786 > > |> sm'.format_debug 00:00:39 verbose #787 > > |> _assert_eq ( 00:00:39 verbose #788 > > ('a', "bc", { line_text = "a" |> sm'.string_builder; position = { line = 00:00:39 verbose #789 > > 1i32; col = 2i32 } }) 00:00:39 verbose #790 > > |> sm'.format_debug 00:00:39 verbose #791 > > ) 00:00:39 verbose #792 > > 00:00:39 verbose #793 > > ╭─[ 660.88ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:39 verbose #794 > > │ __assert_eq / actual: "struct ('a', "bc", a, 1, 2)" / expected: "struct │ 00:00:39 verbose #795 > > │ ('a', "bc", a, 1, 2)" │ 00:00:39 verbose #796 > > │ │ 00:00:39 verbose #797 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:39 verbose #798 > > 00:00:39 verbose #799 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:39 verbose #800 > > //// test 00:00:39 verbose #801 > > 00:00:39 verbose #802 > > "abc" 00:00:39 verbose #803 > > |> parse_ (p_char_ 'a') 00:00:39 verbose #804 > > |> resultm.get 00:00:39 verbose #805 > > |> sm'.format_debug 00:00:39 verbose #806 > > |> _assert_eq' (('a', ($'FParsec.Position (null, 0, 1, 2)' : position_)) |> 00:00:39 verbose #807 > > sm'.format_debug) 00:00:40 verbose #808 > > 00:00:40 verbose #809 > > ╭─[ 520.35ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:40 verbose #810 > > │ __assert_eq' / actual: "struct ('a', (Ln: 1, Col: 2))" / expected: "struct │ 00:00:40 verbose #811 > > │ ('a', (Ln: 1, Col: 2))" │ 00:00:40 verbose #812 > > │ │ 00:00:40 verbose #813 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:40 verbose #814 > > 00:00:40 verbose #815 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:40 verbose #816 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:40 verbose #817 > > │ ### any_string │ 00:00:40 verbose #818 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:40 verbose #819 > > 00:00:40 verbose #820 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:40 verbose #821 > > inl any_string length : parser string = fun input, s => 00:00:40 verbose #822 > > if sm'.length input < length 00:00:40 verbose #823 > > then Error $'$"parsing.any_string / unexpected end of input / s: %A{!s}"' 00:00:40 verbose #824 > > else 00:00:40 verbose #825 > > inl result = input |> sm'.range (am'.Start 0i32) (am'.End fun _ => 00:00:40 verbose #826 > > length - 1) 00:00:40 verbose #827 > > inl rest = input |> sm'.range (am'.Start length) (am'.End id) 00:00:40 verbose #828 > > Ok (result, rest, s |> update result) 00:00:40 verbose #829 > > 00:00:40 verbose #830 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:40 verbose #831 > > //// test 00:00:40 verbose #832 > > 00:00:40 verbose #833 > > "abcdef" 00:00:40 verbose #834 > > |> parse (any_string 3i32) 00:00:40 verbose #835 > > |> resultm.get 00:00:40 verbose #836 > > |> sm'.format_debug 00:00:40 verbose #837 > > |> _assert_eq ( 00:00:40 verbose #838 > > ("abc", "def", { line_text = "abc" |> sm'.string_builder; position = { line 00:00:40 verbose #839 > > = 1i32; col = 4i32 } }) 00:00:40 verbose #840 > > |> sm'.format_debug 00:00:40 verbose #841 > > ) 00:00:41 verbose #842 > > 00:00:41 verbose #843 > > ╭─[ 587.59ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:41 verbose #844 > > │ __assert_eq / actual: "struct ("abc", "def", abc, 1, 4)" / expected: "struct │ 00:00:41 verbose #845 > > │ ("abc", "def", abc, 1, 4)" │ 00:00:41 verbose #846 > > │ │ 00:00:41 verbose #847 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:41 verbose #848 > > 00:00:41 verbose #849 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:41 verbose #850 > > //// test 00:00:41 verbose #851 > > 00:00:41 verbose #852 > > "abcdef" 00:00:41 verbose #853 > > |> parse_ (any_string__ 3) 00:00:41 verbose #854 > > |> resultm.get 00:00:41 verbose #855 > > |> sm'.obj_to_string 00:00:41 verbose #856 > > |> _assert_eq' (("abc", ($'FParsec.Position (null, 0, 1, 4)' : position_)) |> 00:00:41 verbose #857 > > sm'.obj_to_string) 00:00:42 verbose #858 > > 00:00:42 verbose #859 > > ╭─[ 520.97ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:42 verbose #860 > > │ __assert_eq' / actual: "(abc, (Ln: 1, Col: 4))" / expected: "(abc, (Ln: 1, │ 00:00:42 verbose #861 > > │ Col: 4))" │ 00:00:42 verbose #862 > > │ │ 00:00:42 verbose #863 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:42 verbose #864 > > 00:00:42 verbose #865 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:42 verbose #866 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:42 verbose #867 > > │ ### skip_any_string │ 00:00:42 verbose #868 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:42 verbose #869 > > 00:00:42 verbose #870 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:42 verbose #871 > > inl skip_any_string length : parser () = fun input, s => 00:00:42 verbose #872 > > if sm'.length input < length 00:00:42 verbose #873 > > then Error $'$"parsing.skip_any_string / unexpected end of input / s: 00:00:42 verbose #874 > > %A{!s}"' 00:00:42 verbose #875 > > else Ok ( 00:00:42 verbose #876 > > (), 00:00:42 verbose #877 > > input |> sm'.range (am'.Start length) (am'.End id), 00:00:42 verbose #878 > > s |> update (input |> sm'.range (am'.Start 0i32) (am'.End fun _ => 00:00:42 verbose #879 > > length - 1)) 00:00:42 verbose #880 > > ) 00:00:42 verbose #881 > > 00:00:42 verbose #882 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:42 verbose #883 > > //// test 00:00:42 verbose #884 > > 00:00:42 verbose #885 > > "abcdef" 00:00:42 verbose #886 > > |> parse (skip_any_string 3i32) 00:00:42 verbose #887 > > |> resultm.get 00:00:42 verbose #888 > > |> sm'.format_debug 00:00:42 verbose #889 > > |> _assert_eq ( 00:00:42 verbose #890 > > ((), "def", { line_text = "abc" |> sm'.string_builder; position = { line = 00:00:42 verbose #891 > > 1i32; col = 4i32 } }) 00:00:42 verbose #892 > > |> sm'.format_debug 00:00:42 verbose #893 > > ) 00:00:43 verbose #894 > > 00:00:43 verbose #895 > > ╭─[ 554.32ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:43 verbose #896 > > │ __assert_eq / actual: "struct ("def", abc, 1, 4)" / expected: "struct │ 00:00:43 verbose #897 > > │ ("def", abc, 1, 4)" │ 00:00:43 verbose #898 > > │ │ 00:00:43 verbose #899 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:43 verbose #900 > > 00:00:43 verbose #901 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:43 verbose #902 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:43 verbose #903 > > │ ### (>>.) │ 00:00:43 verbose #904 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:43 verbose #905 > > 00:00:43 verbose #906 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:43 verbose #907 > > inl (>>.) forall t u. (a : parser t) (b : parser u) : parser u = fun input, s => 00:00:43 verbose #908 > > match a (input, s) with 00:00:43 verbose #909 > > | Ok (_, rest, s) => b (rest, s) 00:00:43 verbose #910 > > | Error e => Error e 00:00:43 verbose #911 > > 00:00:43 verbose #912 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:43 verbose #913 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:43 verbose #914 > > │ ### (>>.) │ 00:00:43 verbose #915 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:43 verbose #916 > > 00:00:43 verbose #917 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:43 verbose #918 > > inl (.>>) forall t u. (a : parser t) (b : parser u) : parser t = fun input, s => 00:00:43 verbose #919 > > match a (input, s) with 00:00:43 verbose #920 > > | Ok (result, rest, s) => 00:00:43 verbose #921 > > match b (rest, s) with 00:00:43 verbose #922 > > | Ok (_, rest, s) => Ok (result, rest, s) 00:00:43 verbose #923 > > | Error e => Error e 00:00:43 verbose #924 > > | Error e => Error e 00:00:44 verbose #925 > > 00:00:44 verbose #926 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:44 verbose #927 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:44 verbose #928 > > │ ### (.>>.) │ 00:00:44 verbose #929 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:44 verbose #930 > > 00:00:44 verbose #931 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:44 verbose #932 > > inl (.>>.) forall t u. (a : parser t) (b : parser u) : parser (t * u) = fun 00:00:44 verbose #933 > > input, s => 00:00:44 verbose #934 > > match a (input, s) with 00:00:44 verbose #935 > > | Ok (result_a, rest, s) => 00:00:44 verbose #936 > > match b (rest, s) with 00:00:44 verbose #937 > > | Ok (result_b, rest, s) => Ok ((result_a, result_b), rest, s) 00:00:44 verbose #938 > > | Error e => Error e 00:00:44 verbose #939 > > | Error e => Error e 00:00:44 verbose #940 > > 00:00:44 verbose #941 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:44 verbose #942 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:44 verbose #943 > > │ ### (>>%) │ 00:00:44 verbose #944 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:44 verbose #945 > > 00:00:44 verbose #946 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:44 verbose #947 > > inl (>>%) forall t u. (a : parser t) (b : u) : parser u = fun input, s => 00:00:44 verbose #948 > > match a (input, s) with 00:00:44 verbose #949 > > | Ok (_, rest, s) => Ok (b, rest, s) 00:00:44 verbose #950 > > | Error e => Error e 00:00:44 verbose #951 > > 00:00:44 verbose #952 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:44 verbose #953 > > //// test 00:00:44 verbose #954 > > 00:00:44 verbose #955 > > "abc" 00:00:44 verbose #956 > > |> parse (p_char 'a' >>. p_char 'b') 00:00:44 verbose #957 > > |> resultm.get 00:00:44 verbose #958 > > |> sm'.format_debug 00:00:44 verbose #959 > > |> _assert_eq ( 00:00:44 verbose #960 > > ('b', "c", { line_text = "ab" |> sm'.string_builder; position = { line = 00:00:44 verbose #961 > > 1i32; col = 3i32 } }) 00:00:44 verbose #962 > > |> sm'.format_debug 00:00:44 verbose #963 > > ) 00:00:44 verbose #964 > > 00:00:44 verbose #965 > > "abc\ndef\nghi" 00:00:44 verbose #966 > > |> parse (skip_any_string 5i32 >>. p_char 'a') 00:00:44 verbose #967 > > |> _assert_eq (Error "parsing.p_char / expected: 'a' / line: 2 / col: 2\ndef\n 00:00:44 verbose #968 > > ^\n") 00:00:45 verbose #969 > > 00:00:45 verbose #970 > > ╭─[ 894.07ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:45 verbose #971 > > │ __assert_eq / actual: "struct ('b', "c", ab, 1, 3)" / expected: "struct │ 00:00:45 verbose #972 > > │ ('b', "c", ab, 1, 3)" │ 00:00:45 verbose #973 > > │ __assert_eq / actual: US0_1 "parsing.p_char / expected: 'a' / line: 2 / col: │ 00:00:45 verbose #974 > > │ 2 │ 00:00:45 verbose #975 > > │ def │ 00:00:45 verbose #976 > > │ ^ │ 00:00:45 verbose #977 > > │ " / expected: US0_1 "parsing.p_char / expected: 'a' / line: 2 / col: 2 │ 00:00:45 verbose #978 > > │ def │ 00:00:45 verbose #979 > > │ ^ │ 00:00:45 verbose #980 > > │ " │ 00:00:45 verbose #981 > > │ │ 00:00:45 verbose #982 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:45 verbose #983 > > 00:00:45 verbose #984 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:45 verbose #985 > > //// test 00:00:45 verbose #986 > > 00:00:45 verbose #987 > > "abc" 00:00:45 verbose #988 > > |> parse_ (p_char_ 'a' >>.$ p_char_ 'b') 00:00:45 verbose #989 > > |> resultm.get 00:00:45 verbose #990 > > |> sm'.obj_to_string 00:00:45 verbose #991 > > |> _assert_eq' (('b', ($'FParsec.Position (null, 0, 1, 3)' : position_)) |> 00:00:45 verbose #992 > > sm'.obj_to_string) 00:00:46 verbose #993 > > 00:00:46 verbose #994 > > ╭─[ 539.73ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:46 verbose #995 > > │ __assert_eq' / actual: "(b, (Ln: 1, Col: 3))" / expected: "(b, (Ln: 1, Col: │ 00:00:46 verbose #996 > > │ 3))" │ 00:00:46 verbose #997 > > │ │ 00:00:46 verbose #998 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:46 verbose #999 > > 00:00:46 verbose #1000 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:46 verbose #1001 > > //// test 00:00:46 verbose #1002 > > 00:00:46 verbose #1003 > > "abc\ndef\nghi" 00:00:46 verbose #1004 > > |> parse_ (skip_any_string_ 5 >>.$ p_char_ 'a') 00:00:46 verbose #1005 > > |> resultm.unwrap_err 00:00:46 verbose #1006 > > |> sm'.obj_to_string 00:00:46 verbose #1007 > > |> sm'.replace "\r\n" "\n" 00:00:46 verbose #1008 > > |> _assert_eq "(Error in Ln: 2 Col: 2\ndef\n ^\nExpecting: 'a'\n, Error in Ln: 2 00:00:46 verbose #1009 > > Col: 2\nExpecting: 'a'\n)" 00:00:47 verbose #1010 > > 00:00:47 verbose #1011 > > ╭─[ 605.33ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:47 verbose #1012 > > │ __assert_eq / actual: "(Error in Ln: 2 Col: 2 │ 00:00:47 verbose #1013 > > │ def │ 00:00:47 verbose #1014 > > │ ^ │ 00:00:47 verbose #1015 > > │ Expecting: 'a' │ 00:00:47 verbose #1016 > > │ , Error in Ln: 2 Col: 2 │ 00:00:47 verbose #1017 > > │ Expecting: 'a' │ 00:00:47 verbose #1018 > > │ )" / expected: "(Error in Ln: 2 Col: 2 │ 00:00:47 verbose #1019 > > │ def │ 00:00:47 verbose #1020 > > │ ^ │ 00:00:47 verbose #1021 > > │ Expecting: 'a' │ 00:00:47 verbose #1022 > > │ , Error in Ln: 2 Col: 2 │ 00:00:47 verbose #1023 > > │ Expecting: 'a' │ 00:00:47 verbose #1024 > > │ )" │ 00:00:47 verbose #1025 > > │ │ 00:00:47 verbose #1026 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:47 verbose #1027 > > 00:00:47 verbose #1028 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:47 verbose #1029 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:47 verbose #1030 > > │ ### none_of │ 00:00:47 verbose #1031 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:47 verbose #1032 > > 00:00:47 verbose #1033 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:47 verbose #1034 > > inl none_of (chars : list char) : parser char = function 00:00:47 verbose #1035 > > | "", s => 00:00:47 verbose #1036 > > inl chars = chars |> listm'.box |> listm'.to_array' 00:00:47 verbose #1037 > > Error $'$"parsing.none_of / unexpected end of input / chars: %A{!chars} 00:00:47 verbose #1038 > > / s: %A{!s}"' 00:00:47 verbose #1039 > > | x, s => 00:00:47 verbose #1040 > > inl first_char = x |> sm'.index 0i32 00:00:47 verbose #1041 > > inl rest = x |> sm'.range (am'.Start 1i32) (am'.End id) 00:00:47 verbose #1042 > > if chars |> listm'.exists' ((=) first_char) |> not 00:00:47 verbose #1043 > > then Ok (first_char, rest, s |> update (sm'.obj_to_string first_char)) 00:00:47 verbose #1044 > > else 00:00:47 verbose #1045 > > inl chars = chars |> listm'.box |> listm'.to_array' 00:00:47 verbose #1046 > > Error $'$"parsing.none_of / unexpected char: \'{!first_char}\' 00:00:47 verbose #1047 > > chars: %A{!chars} / s: %A{!s}"' 00:00:47 verbose #1048 > > 00:00:47 verbose #1049 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:47 verbose #1050 > > //// test 00:00:47 verbose #1051 > > 00:00:47 verbose #1052 > > "abc" 00:00:47 verbose #1053 > > |> parse (none_of [['a'; 'b'; 'c']]) 00:00:47 verbose #1054 > > |> _assert_eq (Error "parsing.none_of / unexpected char: \'a\' / chars: [[|'a'; 00:00:47 verbose #1055 > > 'b'; 'c'|]] / s: struct (, 1, 1)") 00:00:47 verbose #1056 > > 00:00:47 verbose #1057 > > "def" 00:00:47 verbose #1058 > > |> parse (none_of [['a'; 'b'; 'c']]) 00:00:47 verbose #1059 > > |> resultm.get 00:00:47 verbose #1060 > > |> sm'.format_debug 00:00:47 verbose #1061 > > |> _assert_eq ( 00:00:47 verbose #1062 > > ('d', "ef", { line_text = "d" |> sm'.string_builder; position = { line = 00:00:47 verbose #1063 > > 1i32; col = 2i32 } }) 00:00:47 verbose #1064 > > |> sm'.format_debug 00:00:47 verbose #1065 > > ) 00:00:48 verbose #1066 > > 00:00:48 verbose #1067 > > ╭─[ 854.79ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:48 verbose #1068 > > │ __assert_eq / actual: US0_1 │ 00:00:48 verbose #1069 > > │ "parsing.none_of / unexpected char: 'a' / chars: [|'a'; 'b'; 'c'|] / s: │ 00:00:48 verbose #1070 > > │ struct (, 1, 1)" / expected: US0_1 │ 00:00:48 verbose #1071 > > │ "parsing.none_of / unexpected char: 'a' / chars: [|'a'; 'b'; 'c'|] / s: │ 00:00:48 verbose #1072 > > │ struct (, 1, 1)" │ 00:00:48 verbose #1073 > > │ __assert_eq / actual: "struct ('d', "ef", d, 1, 2)" / expected: "struct │ 00:00:48 verbose #1074 > > │ ('d', "ef", d, 1, 2)" │ 00:00:48 verbose #1075 > > │ │ 00:00:48 verbose #1076 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:48 verbose #1077 > > 00:00:48 verbose #1078 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:48 verbose #1079 > > //// test 00:00:48 verbose #1080 > > 00:00:48 verbose #1081 > > "abc" 00:00:48 verbose #1082 > > |> parse_ (none_of_ [['a'; 'b'; 'c']]) 00:00:48 verbose #1083 > > |> resultm.unwrap_err 00:00:48 verbose #1084 > > |> sm'.obj_to_string 00:00:48 verbose #1085 > > |> sm'.replace "\r\n" "\n" 00:00:48 verbose #1086 > > |> _assert_eq ($'"(Error in Ln: 1 Col: 1\nabc\n^\nExpecting: any char not in 00:00:48 verbose #1087 > > ‘abc’\n, Error in Ln: 1 Col: 1\nExpecting: any char not in ‘abc’\n)"') 00:00:48 verbose #1088 > > 00:00:48 verbose #1089 > > "def" 00:00:48 verbose #1090 > > |> parse_ (none_of_ [['a'; 'b'; 'c']]) 00:00:48 verbose #1091 > > |> resultm.get 00:00:48 verbose #1092 > > |> sm'.obj_to_string 00:00:48 verbose #1093 > > |> _assert_eq' (('d', ($'FParsec.Position (null, 0, 1, 2)' : position_)) |> 00:00:48 verbose #1094 > > sm'.obj_to_string) 00:00:48 verbose #1095 > > 00:00:48 verbose #1096 > > ╭─[ 599.17ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:48 verbose #1097 > > │ __assert_eq / actual: "(Error in Ln: 1 Col: 1 │ 00:00:48 verbose #1098 > > │ abc │ 00:00:48 verbose #1099 > > │ ^ │ 00:00:48 verbose #1100 > > │ Expecting: any char not in ‘abc’ │ 00:00:48 verbose #1101 > > │ , Error in Ln: 1 Col: 1 │ 00:00:48 verbose #1102 > > │ Expecting: any char not in ‘abc’ │ 00:00:48 verbose #1103 > > │ )" / expected: "(Error in Ln: 1 Col: 1 │ 00:00:48 verbose #1104 > > │ abc │ 00:00:48 verbose #1105 > > │ ^ │ 00:00:48 verbose #1106 > > │ Expecting: any char not in ‘abc’ │ 00:00:48 verbose #1107 > > │ , Error in Ln: 1 Col: 1 │ 00:00:48 verbose #1108 > > │ Expecting: any char not in ‘abc’ │ 00:00:48 verbose #1109 > > │ )" │ 00:00:48 verbose #1110 > > │ __assert_eq' / actual: "(d, (Ln: 1, Col: 2))" / expected: "(d, (Ln: 1, Col: │ 00:00:48 verbose #1111 > > │ 2))" │ 00:00:48 verbose #1112 > > │ │ 00:00:48 verbose #1113 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:48 verbose #1114 > > 00:00:48 verbose #1115 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:48 verbose #1116 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:48 verbose #1117 > > │ ### (<|>) │ 00:00:48 verbose #1118 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:48 verbose #1119 > > 00:00:48 verbose #1120 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:48 verbose #1121 > > inl (<|>) forall t. (a : parser t) (b : parser t) : parser t = fun input, s => 00:00:48 verbose #1122 > > match a (input, s) with 00:00:48 verbose #1123 > > | Ok _ as result => result 00:00:48 verbose #1124 > > | Error _ => b (input, s) 00:00:49 verbose #1125 > > 00:00:49 verbose #1126 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:49 verbose #1127 > > //// test 00:00:49 verbose #1128 > > 00:00:49 verbose #1129 > > "abc" 00:00:49 verbose #1130 > > |> parse (p_char 'a' <|> p_char 'b') 00:00:49 verbose #1131 > > |> resultm.get 00:00:49 verbose #1132 > > |> sm'.format_debug 00:00:49 verbose #1133 > > |> _assert_eq ( 00:00:49 verbose #1134 > > ('a', "bc", { line_text = "a" |> sm'.string_builder; position = { line = 00:00:49 verbose #1135 > > 1i32; col = 2i32 } }) 00:00:49 verbose #1136 > > |> sm'.format_debug 00:00:49 verbose #1137 > > ) 00:00:49 verbose #1138 > > 00:00:49 verbose #1139 > > "cba" 00:00:49 verbose #1140 > > |> parse (p_char 'a' <|> p_char 'b') 00:00:49 verbose #1141 > > |> _assert_eq (Error "parsing.p_char / expected: 'b' / line: 1 / col: 00:00:49 verbose #1142 > > 1\ncba\n^\n") 00:00:50 verbose #1143 > > 00:00:50 verbose #1144 > > ╭─[ 735.22ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:50 verbose #1145 > > │ __assert_eq / actual: "struct ('a', "bc", a, 1, 2)" / expected: "struct │ 00:00:50 verbose #1146 > > │ ('a', "bc", a, 1, 2)" │ 00:00:50 verbose #1147 > > │ __assert_eq / actual: US0_1 "parsing.p_char / expected: 'b' / line: 1 / col: │ 00:00:50 verbose #1148 > > │ 1 │ 00:00:50 verbose #1149 > > │ cba │ 00:00:50 verbose #1150 > > │ ^ │ 00:00:50 verbose #1151 > > │ " / expected: US0_1 "parsing.p_char / expected: 'b' / line: 1 / col: 1 │ 00:00:50 verbose #1152 > > │ cba │ 00:00:50 verbose #1153 > > │ ^ │ 00:00:50 verbose #1154 > > │ " │ 00:00:50 verbose #1155 > > │ │ 00:00:50 verbose #1156 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:50 verbose #1157 > > 00:00:50 verbose #1158 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:50 verbose #1159 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:50 verbose #1160 > > │ ### (|>>) │ 00:00:50 verbose #1161 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:50 verbose #1162 > > 00:00:50 verbose #1163 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:50 verbose #1164 > > inl (|>>) p f : parser _ = fun input => 00:00:50 verbose #1165 > > match p input with 00:00:50 verbose #1166 > > | Ok (result, rest) => Ok (f result, rest) 00:00:50 verbose #1167 > > | Error e => Error e 00:00:50 verbose #1168 > > 00:00:50 verbose #1169 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:50 verbose #1170 > > //// test 00:00:50 verbose #1171 > > 00:00:50 verbose #1172 > > "abc" 00:00:50 verbose #1173 > > |> parse (p_char 'a' |>> sm'.char_to_upper) 00:00:50 verbose #1174 > > |> resultm.get 00:00:50 verbose #1175 > > |> sm'.format_debug 00:00:50 verbose #1176 > > |> _assert_eq ( 00:00:50 verbose #1177 > > ('A', "bc", { line_text = "a" |> sm'.string_builder; position = { line = 00:00:50 verbose #1178 > > 1i32; col = 2i32 } }) 00:00:50 verbose #1179 > > |> sm'.format_debug 00:00:50 verbose #1180 > > ) 00:00:51 verbose #1181 > > 00:00:51 verbose #1182 > > ╭─[ 616.42ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:51 verbose #1183 > > │ __assert_eq / actual: "struct ('A', "bc", a, 1, 2)" / expected: "struct │ 00:00:51 verbose #1184 > > │ ('A', "bc", a, 1, 2)" │ 00:00:51 verbose #1185 > > │ │ 00:00:51 verbose #1186 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:51 verbose #1187 > > 00:00:51 verbose #1188 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:51 verbose #1189 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:51 verbose #1190 > > │ ### many │ 00:00:51 verbose #1191 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:51 verbose #1192 > > 00:00:51 verbose #1193 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:51 verbose #1194 > > inl many p : parser (list _) = fun input => 00:00:51 verbose #1195 > > let rec loop acc input = 00:00:51 verbose #1196 > > match p input with 00:00:51 verbose #1197 > > | Ok (result, rest) => loop (result :: acc) rest 00:00:51 verbose #1198 > > | Error _ => Ok (listm.rev acc, input) 00:00:51 verbose #1199 > > loop [[]] input 00:00:51 verbose #1200 > > 00:00:51 verbose #1201 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:51 verbose #1202 > > //// test 00:00:51 verbose #1203 > > 00:00:51 verbose #1204 > > "aaabbc" 00:00:51 verbose #1205 > > |> parse (many (p_char 'a' <|> p_char 'b')) 00:00:51 verbose #1206 > > |> resultm.get 00:00:51 verbose #1207 > > |> sm'.format_debug 00:00:51 verbose #1208 > > |> _assert_eq ( 00:00:51 verbose #1209 > > ([['a'; 'a'; 'a'; 'b'; 'b']], "c", { line_text = "aaabb" |> 00:00:51 verbose #1210 > > sm'.string_builder; position = { line = 1i32; col = 6i32 } }) 00:00:51 verbose #1211 > > |> sm'.format_debug 00:00:51 verbose #1212 > > ) 00:00:52 verbose #1213 > > 00:00:52 verbose #1214 > > ╭─[ 741.64ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:52 verbose #1215 > > │ __assert_eq / actual: "struct (UH0_1 ('a', UH0_1 ('a', UH0_1 ('a', UH0_1 │ 00:00:52 verbose #1216 > > │ ('b', UH0_1 ('b', UH0_0))))), │ 00:00:52 verbose #1217 > > │ "c", aaabb, 1, 6)" / expected: "struct (UH0_1 ('a', UH0_1 ('a', │ 00:00:52 verbose #1218 > > │ UH0_1 ('a', UH0_1 ('b', UH0_1 ('b', UH0_0))))), │ 00:00:52 verbose #1219 > > │ "c", aaabb, 1, 6)" │ 00:00:52 verbose #1220 > > │ │ 00:00:52 verbose #1221 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:52 verbose #1222 > > 00:00:52 verbose #1223 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:52 verbose #1224 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:52 verbose #1225 > > │ ### many1_chars │ 00:00:52 verbose #1226 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:52 verbose #1227 > > 00:00:52 verbose #1228 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:52 verbose #1229 > > inl many1_chars p : parser string = fun input => 00:00:52 verbose #1230 > > match p input with 00:00:52 verbose #1231 > > | Error e => Error e 00:00:52 verbose #1232 > > | Ok (first_result, rest) => 00:00:52 verbose #1233 > > let rec loop acc input = 00:00:52 verbose #1234 > > match p input with 00:00:52 verbose #1235 > > | Ok (result, rest) => loop (acc +. sm'.obj_to_string result) rest 00:00:52 verbose #1236 > > | Error _ => Ok (acc, input) 00:00:52 verbose #1237 > > loop (sm'.obj_to_string first_result) rest 00:00:53 verbose #1238 > > 00:00:53 verbose #1239 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:53 verbose #1240 > > //// test 00:00:53 verbose #1241 > > 00:00:53 verbose #1242 > > "aaabbc" 00:00:53 verbose #1243 > > |> parse (many1_chars (p_char 'a' <|> p_char 'b')) 00:00:53 verbose #1244 > > |> resultm.get 00:00:53 verbose #1245 > > |> sm'.format_debug 00:00:53 verbose #1246 > > |> _assert_eq ( 00:00:53 verbose #1247 > > ("aaabb", "c", { line_text = "aaabb" |> sm'.string_builder; position = { 00:00:53 verbose #1248 > > line = 1i32; col = 6i32 } }) 00:00:53 verbose #1249 > > |> sm'.format_debug 00:00:53 verbose #1250 > > ) 00:00:53 verbose #1251 > > 00:00:53 verbose #1252 > > ╭─[ 854.48ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:53 verbose #1253 > > │ __assert_eq / actual: "struct ("aaabb", "c", aaabb, 1, 6)" / expected: │ 00:00:53 verbose #1254 > > │ "struct ("aaabb", "c", aaabb, 1, 6)" │ 00:00:53 verbose #1255 > > │ │ 00:00:53 verbose #1256 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:53 verbose #1257 > > 00:00:53 verbose #1258 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:53 verbose #1259 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:53 verbose #1260 > > │ ### many_chars │ 00:00:53 verbose #1261 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:53 verbose #1262 > > 00:00:53 verbose #1263 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:53 verbose #1264 > > inl many_chars p : parser string = fun input => 00:00:53 verbose #1265 > > match many1_chars p input with 00:00:53 verbose #1266 > > | Ok (result, rest) => Ok (result, rest) 00:00:53 verbose #1267 > > | Error e => Ok ("", input) 00:00:54 verbose #1268 > > 00:00:54 verbose #1269 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:54 verbose #1270 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:54 verbose #1271 > > │ ### many_chars_till │ 00:00:54 verbose #1272 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:54 verbose #1273 > > 00:00:54 verbose #1274 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:54 verbose #1275 > > inl many_chars_till p end_p : parser string = fun input => 00:00:54 verbose #1276 > > match end_p input with 00:00:54 verbose #1277 > > | Ok _ => Ok ("", input) 00:00:54 verbose #1278 > > | Error _ => 00:00:54 verbose #1279 > > match many_chars p input with 00:00:54 verbose #1280 > > | Ok (result, rest) => Ok (result, rest) 00:00:54 verbose #1281 > > | Error e => Error e 00:00:54 verbose #1282 > > 00:00:54 verbose #1283 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:54 verbose #1284 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:54 verbose #1285 > > │ ### many1 │ 00:00:54 verbose #1286 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:54 verbose #1287 > > 00:00:54 verbose #1288 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:54 verbose #1289 > > inl many1 p : parser (list _) = fun input => 00:00:54 verbose #1290 > > match p input with 00:00:54 verbose #1291 > > | Error e => Error e 00:00:54 verbose #1292 > > | Ok (first_result, rest) => 00:00:54 verbose #1293 > > let rec loop acc input = 00:00:54 verbose #1294 > > match p input with 00:00:54 verbose #1295 > > | Ok (result, rest) => loop (result :: acc) rest 00:00:54 verbose #1296 > > | Error _ => Ok (listm.rev acc, input) 00:00:54 verbose #1297 > > loop [[ first_result ]] rest 00:00:55 verbose #1298 > > 00:00:55 verbose #1299 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:55 verbose #1300 > > //// test 00:00:55 verbose #1301 > > 00:00:55 verbose #1302 > > "aaabbc" 00:00:55 verbose #1303 > > |> parse (many1 (p_char 'a' <|> p_char 'b')) 00:00:55 verbose #1304 > > |> resultm.get 00:00:55 verbose #1305 > > |> sm'.format_debug 00:00:55 verbose #1306 > > |> _assert_eq ( 00:00:55 verbose #1307 > > ([['a'; 'a'; 'a'; 'b'; 'b']], "c", { line_text = "aaabb" |> 00:00:55 verbose #1308 > > sm'.string_builder; position = { line = 1i32; col = 6i32 } }) 00:00:55 verbose #1309 > > |> sm'.format_debug 00:00:55 verbose #1310 > > ) 00:00:55 verbose #1311 > > 00:00:55 verbose #1312 > > "bcc" 00:00:55 verbose #1313 > > |> parse (many1 (p_char 'a' <|> p_char 'b')) 00:00:55 verbose #1314 > > |> resultm.get 00:00:55 verbose #1315 > > |> sm'.format_debug 00:00:55 verbose #1316 > > |> _assert_eq ( 00:00:55 verbose #1317 > > ([['b']], "cc", { line_text = "b" |> sm'.string_builder; position = { line = 00:00:55 verbose #1318 > > 1i32; col = 2i32 } }) 00:00:55 verbose #1319 > > |> sm'.format_debug 00:00:55 verbose #1320 > > ) 00:00:55 verbose #1321 > > 00:00:55 verbose #1322 > > "cba" 00:00:55 verbose #1323 > > |> parse (many1 (p_char 'a' <|> p_char 'b')) 00:00:55 verbose #1324 > > |> _assert_eq (Error "parsing.p_char / expected: 'b' / line: 1 / col: 00:00:55 verbose #1325 > > 1\ncba\n^\n") 00:00:56 verbose #1326 > > 00:00:56 verbose #1327 > > ╭─[ 944.06ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:56 verbose #1328 > > │ __assert_eq / actual: "struct (UH0_1 ('a', UH0_1 ('a', UH0_1 ('a', UH0_1 │ 00:00:56 verbose #1329 > > │ ('b', UH0_1 ('b', UH0_0))))), │ 00:00:56 verbose #1330 > > │ "c", aaabb, 1, 6)" / expected: "struct (UH0_1 ('a', UH0_1 ('a', │ 00:00:56 verbose #1331 > > │ UH0_1 ('a', UH0_1 ('b', UH0_1 ('b', UH0_0))))), │ 00:00:56 verbose #1332 > > │ "c", aaabb, 1, 6)" │ 00:00:56 verbose #1333 > > │ __assert_eq / actual: "struct (UH0_1 ('b', UH0_0), "cc", b, 1, 2)" / │ 00:00:56 verbose #1334 > > │ expected: "struct (UH0_1 ('b', UH0_0), "cc", b, 1, 2)" │ 00:00:56 verbose #1335 > > │ __assert_eq / actual: US1_1 "parsing.p_char / expected: 'b' / line: 1 / col: │ 00:00:56 verbose #1336 > > │ 1 │ 00:00:56 verbose #1337 > > │ cba │ 00:00:56 verbose #1338 > > │ ^ │ 00:00:56 verbose #1339 > > │ " / expected: US1_1 "parsing.p_char / expected: 'b' / line: 1 / col: 1 │ 00:00:56 verbose #1340 > > │ cba │ 00:00:56 verbose #1341 > > │ ^ │ 00:00:56 verbose #1342 > > │ " │ 00:00:56 verbose #1343 > > │ │ 00:00:56 verbose #1344 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:56 verbose #1345 > > 00:00:56 verbose #1346 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:56 verbose #1347 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:56 verbose #1348 > > │ ### many1_strings │ 00:00:56 verbose #1349 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:56 verbose #1350 > > 00:00:56 verbose #1351 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:56 verbose #1352 > > inl many1_strings p : parser string = fun input => 00:00:56 verbose #1353 > > match many1 p input with 00:00:56 verbose #1354 > > | Ok (results, rest) => 00:00:56 verbose #1355 > > Ok (results |> listm.map sm'.obj_to_string |> listm'.box |> seq.of_list' 00:00:56 verbose #1356 > > |> sm'.concat "", rest) 00:00:56 verbose #1357 > > | Error e => Error e 00:00:56 verbose #1358 > > 00:00:56 verbose #1359 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:56 verbose #1360 > > //// test 00:00:56 verbose #1361 > > 00:00:56 verbose #1362 > > "aaabbc" 00:00:56 verbose #1363 > > |> parse (many1_strings (p_char 'a' <|> p_char 'b')) 00:00:56 verbose #1364 > > |> resultm.get 00:00:56 verbose #1365 > > |> sm'.format_debug 00:00:56 verbose #1366 > > |> _assert_eq ( 00:00:56 verbose #1367 > > ("aaabb", "c", { line_text = "aaabb" |> sm'.string_builder; position = { 00:00:56 verbose #1368 > > line = 1i32; col = 6i32 } }) 00:00:56 verbose #1369 > > |> sm'.format_debug 00:00:56 verbose #1370 > > ) 00:00:57 verbose #1371 > > 00:00:57 verbose #1372 > > ╭─[ 775.45ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:57 verbose #1373 > > │ __assert_eq / actual: "struct ("aaabb", "c", aaabb, 1, 6)" / expected: │ 00:00:57 verbose #1374 > > │ "struct ("aaabb", "c", aaabb, 1, 6)" │ 00:00:57 verbose #1375 > > │ │ 00:00:57 verbose #1376 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:57 verbose #1377 > > 00:00:57 verbose #1378 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:57 verbose #1379 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:57 verbose #1380 > > │ ### many_strings │ 00:00:57 verbose #1381 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:57 verbose #1382 > > 00:00:57 verbose #1383 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:57 verbose #1384 > > inl many_strings p : parser string = fun input => 00:00:57 verbose #1385 > > match many p input with 00:00:57 verbose #1386 > > | Ok (results, rest) => 00:00:57 verbose #1387 > > Ok (results |> listm.map sm'.obj_to_string |> listm'.box |> seq.of_list' 00:00:57 verbose #1388 > > |> sm'.concat "", rest) 00:00:57 verbose #1389 > > | Error e => Ok ("", input) 00:00:58 verbose #1390 > > 00:00:58 verbose #1391 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:58 verbose #1392 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:58 verbose #1393 > > │ ### choice │ 00:00:58 verbose #1394 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:58 verbose #1395 > > 00:00:58 verbose #1396 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:58 verbose #1397 > > inl choice parsers : parser _ = fun input => 00:00:58 verbose #1398 > > let rec loop = function 00:00:58 verbose #1399 > > | [[]] => Error "choice / no parsers succeeded" 00:00:58 verbose #1400 > > | p :: ps => 00:00:58 verbose #1401 > > match p input with 00:00:58 verbose #1402 > > | Ok _ as result => result 00:00:58 verbose #1403 > > | Error _ => loop ps 00:00:58 verbose #1404 > > loop parsers 00:00:58 verbose #1405 > > 00:00:58 verbose #1406 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:58 verbose #1407 > > //// test 00:00:58 verbose #1408 > > 00:00:58 verbose #1409 > > "bca" 00:00:58 verbose #1410 > > |> parse (choice [[p_char 'a'; p_char 'b'; p_char 'c']]) 00:00:58 verbose #1411 > > |> resultm.get 00:00:58 verbose #1412 > > |> sm'.format_debug 00:00:58 verbose #1413 > > |> _assert_eq ( 00:00:58 verbose #1414 > > ('b', "ca", { line_text = "b" |> sm'.string_builder; position = { line = 00:00:58 verbose #1415 > > 1i32; col = 2i32 } }) 00:00:58 verbose #1416 > > |> sm'.format_debug 00:00:58 verbose #1417 > > ) 00:00:58 verbose #1418 > > 00:00:58 verbose #1419 > > "cba" 00:00:58 verbose #1420 > > |> parse (choice [[p_char 'a'; p_char 'b'; p_char 'c']]) 00:00:58 verbose #1421 > > |> resultm.get 00:00:58 verbose #1422 > > |> sm'.format_debug 00:00:58 verbose #1423 > > |> _assert_eq ( 00:00:58 verbose #1424 > > ('c', "ba", { line_text = "c" |> sm'.string_builder; position = { line = 00:00:58 verbose #1425 > > 1i32; col = 2i32 } }) 00:00:58 verbose #1426 > > |> sm'.format_debug 00:00:58 verbose #1427 > > ) 00:00:59 verbose #1428 > > 00:00:59 verbose #1429 > > ╭─[ 734.54ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:59 verbose #1430 > > │ __assert_eq / actual: "struct ('b', "ca", b, 1, 2)" / expected: "struct │ 00:00:59 verbose #1431 > > │ ('b', "ca", b, 1, 2)" │ 00:00:59 verbose #1432 > > │ __assert_eq / actual: "struct ('c', "ba", c, 1, 2)" / expected: "struct │ 00:00:59 verbose #1433 > > │ ('c', "ba", c, 1, 2)" │ 00:00:59 verbose #1434 > > │ │ 00:00:59 verbose #1435 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:59 verbose #1436 > > 00:00:59 verbose #1437 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:59 verbose #1438 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:59 verbose #1439 > > │ ### between │ 00:00:59 verbose #1440 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:59 verbose #1441 > > 00:00:59 verbose #1442 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:59 verbose #1443 > > inl between p_open p_close p_content : parser _ = fun input => 00:00:59 verbose #1444 > > match p_open input with 00:00:59 verbose #1445 > > | Ok (_, rest1) => 00:00:59 verbose #1446 > > match p_content rest1 with 00:00:59 verbose #1447 > > | Ok (result, rest2) => 00:00:59 verbose #1448 > > match p_close rest2 with 00:00:59 verbose #1449 > > | Ok (_, rest3) => Ok (result, rest3) 00:00:59 verbose #1450 > > | Error e => Error $'$"between / expected closing delimiter / e: 00:00:59 verbose #1451 > > %A{!e} / input: %A{!input} / rest1: %A{!rest1} / rest2: %A{!rest2}"' 00:00:59 verbose #1452 > > | Error _ => Error "between / expected content" 00:00:59 verbose #1453 > > | Error e => Error e 00:01:00 verbose #1454 > > 00:01:00 verbose #1455 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:00 verbose #1456 > > //// test 00:01:00 verbose #1457 > > 00:01:00 verbose #1458 > > "[[aaabb]]" 00:01:00 verbose #1459 > > |> parse (between (p_char '[[') (p_char ']]') (many1_chars (p_char 'a' <|> 00:01:00 verbose #1460 > > p_char 'b'))) 00:01:00 verbose #1461 > > |> resultm.get 00:01:00 verbose #1462 > > |> sm'.format_debug 00:01:00 verbose #1463 > > |> _assert_eq ( 00:01:00 verbose #1464 > > ("aaabb", "", { line_text = "[[aaabb]]" |> sm'.string_builder; position = { 00:01:00 verbose #1465 > > line = 1i32; col = 8i32 } }) 00:01:00 verbose #1466 > > |> sm'.format_debug 00:01:00 verbose #1467 > > ) 00:01:00 verbose #1468 > > 00:01:00 verbose #1469 > > "[[aaabb" 00:01:00 verbose #1470 > > |> parse (between (p_char '[[') (p_char ']]') (many1_chars (p_char 'a' <|> 00:01:00 verbose #1471 > > p_char 'b'))) 00:01:00 verbose #1472 > > |> resultm.unwrap_err 00:01:00 verbose #1473 > > |> sm'.format_debug 00:01:00 verbose #1474 > > |> _assert_eq "\"between / expected closing delimiter / e: \"parsing.p_char 00:01:00 verbose #1475 > > unexpected end of input / s: struct ([[aaabb, 1, 7)\" / input: struct 00:01:00 verbose #1476 > > (\"[[aaabb\", [[aaabb, 1, 1) / rest1: struct (\"aaabb\", [[aaabb, 1, 2) / rest2: 00:01:00 verbose #1477 > > struct (\"\", [[aaabb, 1, 7)\"" 00:01:01 verbose #1478 > > 00:01:01 verbose #1479 > > ╭─[ 1.00s - stdout ]───────────────────────────────────────────────────────────╮ 00:01:01 verbose #1480 > > │ __assert_eq / actual: "struct ("aaabb", "", [aaabb], 1, 8)" / expected: │ 00:01:01 verbose #1481 > > │ "struct ("aaabb", "", [aaabb], 1, 8)" │ 00:01:01 verbose #1482 > > │ __assert_eq / actual: ""between / expected closing delimiter / e: │ 00:01:01 verbose #1483 > > │ "parsing.p_char / unexpected end of input / s: struct ([aaabb, 1, 7)" / │ 00:01:01 verbose #1484 > > │ input: struct ("[aaabb", [aaabb, 1, 1) / rest1: struct ("aaabb", [aaabb, 1, │ 00:01:01 verbose #1485 > > │ 2) / rest2: struct ("", [aaabb, 1, 7)"" / expected: ""between / expected │ 00:01:01 verbose #1486 > > │ closing delimiter / e: "parsing.p_char / unexpected end of input / s: struct │ 00:01:01 verbose #1487 > > │ ([aaabb, 1, 7)" / input: struct ("[aaabb", [aaabb, 1, 1) / rest1: struct │ 00:01:01 verbose #1488 > > │ ("aaabb", [aaabb, 1, 2) / rest2: struct ("", [aaabb, 1, 7)"" │ 00:01:01 verbose #1489 > > │ │ 00:01:01 verbose #1490 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:01 verbose #1491 > > 00:01:01 verbose #1492 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:01 verbose #1493 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:01 verbose #1494 > > │ ### sep_by │ 00:01:01 verbose #1495 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:01 verbose #1496 > > 00:01:01 verbose #1497 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:01 verbose #1498 > > inl sep_by p sep : parser (list _) = fun input, s => 00:01:01 verbose #1499 > > let rec loop acc input s = 00:01:01 verbose #1500 > > match p (input, s) with 00:01:01 verbose #1501 > > | Error _ => Ok (acc |> listm.rev, input, s) 00:01:01 verbose #1502 > > | Ok (result, rest, s) => 00:01:01 verbose #1503 > > match sep (rest, s) with 00:01:01 verbose #1504 > > | Error _ => Ok ((result :: acc) |> listm.rev, rest, s) 00:01:01 verbose #1505 > > | Ok (_, rest, s) => loop (result :: acc) rest s 00:01:01 verbose #1506 > > loop [[]] input s 00:01:01 verbose #1507 > > 00:01:01 verbose #1508 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:01 verbose #1509 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:01 verbose #1510 > > │ ### span │ 00:01:01 verbose #1511 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:01 verbose #1512 > > 00:01:01 verbose #1513 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:01 verbose #1514 > > inl span pred str = 00:01:01 verbose #1515 > > let rec loop i = 00:01:01 verbose #1516 > > if i >= sm'.length str 00:01:01 verbose #1517 > > then i 00:01:01 verbose #1518 > > elif pred (str |> sm'.index i) 00:01:01 verbose #1519 > > then loop (i + 1) 00:01:01 verbose #1520 > > else i 00:01:01 verbose #1521 > > loop 0 00:01:02 verbose #1522 > > 00:01:02 verbose #1523 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:02 verbose #1524 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:02 verbose #1525 > > │ ### spaces1 │ 00:01:02 verbose #1526 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:02 verbose #1527 > > 00:01:02 verbose #1528 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:02 verbose #1529 > > inl spaces1 () : parser () = fun input, s => 00:01:02 verbose #1530 > > match input |> span fun c => c = ' ' with 00:01:02 verbose #1531 > > | 0i32 => Error "spaces1 / expected at least one space" 00:01:02 verbose #1532 > > | n => Ok ((), input |> sm'.range (am'.Start n) (am'.End id), s) 00:01:02 verbose #1533 > > 00:01:02 verbose #1534 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:02 verbose #1535 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:02 verbose #1536 > > │ ### spaces │ 00:01:02 verbose #1537 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:02 verbose #1538 > > 00:01:02 verbose #1539 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:02 verbose #1540 > > inl spaces () : parser () = fun input, s => 00:01:02 verbose #1541 > > input 00:01:02 verbose #1542 > > |> span fun c => c = ' ' 00:01:02 verbose #1543 > > |> fun (n : i32) => Ok ((), input |> sm'.range (am'.Start n) (am'.End id), 00:01:02 verbose #1544 > > s) 00:01:03 verbose #1545 > > 00:01:03 verbose #1546 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:03 verbose #1547 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:03 verbose #1548 > > │ ### p_digit │ 00:01:03 verbose #1549 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:03 verbose #1550 > > 00:01:03 verbose #1551 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:03 verbose #1552 > > inl p_digit () : parser char = fun input, s => 00:01:03 verbose #1553 > > match input |> sm'.index 0i32 with 00:01:03 verbose #1554 > > | ('0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9') as c => 00:01:03 verbose #1555 > > Ok (c, input |> sm'.range (am'.Start 1i32) (am'.End id), s) 00:01:03 verbose #1556 > > | c => Error $'$"p_digit / unexpected char: {!c}"' 00:01:03 verbose #1557 > > 00:01:03 verbose #1558 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:03 verbose #1559 > > //// test 00:01:03 verbose #1560 > > 00:01:03 verbose #1561 > > "1 2 3" 00:01:03 verbose #1562 > > |> parse (sep_by (p_digit ()) (spaces1 ())) 00:01:03 verbose #1563 > > |> resultm.get 00:01:03 verbose #1564 > > |> sm'.format_debug 00:01:03 verbose #1565 > > |> _assert_eq ( 00:01:03 verbose #1566 > > ([['1'; '2'; '3']], "", { line_text = "" |> sm'.string_builder; position = { 00:01:03 verbose #1567 > > col = 1i32; line = 1i32 } }) 00:01:03 verbose #1568 > > |> sm'.format_debug 00:01:03 verbose #1569 > > ) 00:01:04 verbose #1570 > > 00:01:04 verbose #1571 > > ╭─[ 662.23ms - stdout ]────────────────────────────────────────────────────────╮ 00:01:04 verbose #1572 > > │ __assert_eq / actual: "struct (UH0_1 ('1', UH0_1 ('2', UH0_1 ('3', UH0_0))), │ 00:01:04 verbose #1573 > > │ "", , 1, 1)" / expected: "struct (UH0_1 ('1', UH0_1 ('2', UH0_1 ('3', │ 00:01:04 verbose #1574 > > │ UH0_0))), "", , 1, 1)" │ 00:01:04 verbose #1575 > > │ │ 00:01:04 verbose #1576 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:04 verbose #1577 > > 00:01:04 verbose #1578 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:04 verbose #1579 > > //// test 00:01:04 verbose #1580 > > 00:01:04 verbose #1581 > > "1 a 2" 00:01:04 verbose #1582 > > |> parse (sep_by (p_digit ()) (spaces1 ())) 00:01:04 verbose #1583 > > |> resultm.get 00:01:04 verbose #1584 > > |> sm'.format_debug 00:01:04 verbose #1585 > > |> _assert_eq ( 00:01:04 verbose #1586 > > ([['1']], "a 2", { line_text = "" |> sm'.string_builder; position = { col = 00:01:04 verbose #1587 > > 1i32; line = 1i32 } }) 00:01:04 verbose #1588 > > |> sm'.format_debug 00:01:04 verbose #1589 > > ) 00:01:05 verbose #1590 > > 00:01:05 verbose #1591 > > ╭─[ 854.84ms - stdout ]────────────────────────────────────────────────────────╮ 00:01:05 verbose #1592 > > │ __assert_eq / actual: "struct (UH0_1 ('1', UH0_0), "a 2", , 1, 1)" / │ 00:01:05 verbose #1593 > > │ expected: "struct (UH0_1 ('1', UH0_0), "a 2", , 1, 1)" │ 00:01:05 verbose #1594 > > │ │ 00:01:05 verbose #1595 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:05 verbose #1596 > > 00:01:05 verbose #1597 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:05 verbose #1598 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:05 verbose #1599 > > │ ### opt │ 00:01:05 verbose #1600 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:05 verbose #1601 > > 00:01:05 verbose #1602 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:05 verbose #1603 > > inl opt p : parser (option _) = fun input, s => 00:01:05 verbose #1604 > > match p (input, s) with 00:01:05 verbose #1605 > > | Ok (result, rest, s) => Ok (Some result, rest, s) 00:01:05 verbose #1606 > > | Error _ => Ok (None, input, s) 00:01:05 verbose #1607 > > 00:01:05 verbose #1608 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:05 verbose #1609 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:05 verbose #1610 > > │ ### rest_of_line │ 00:01:05 verbose #1611 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:05 verbose #1612 > > 00:01:05 verbose #1613 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:05 verbose #1614 > > inl rest_of_line () : parser string = fun input, s => 00:01:05 verbose #1615 > > inl i : i32 = input |> span ((<>) '\n') 00:01:05 verbose #1616 > > Ok (input |> sm'.range (am'.Start i) (am'.End id), input |> sm'.range 00:01:05 verbose #1617 > > (am'.Start i) (am'.End id), s) 00:01:06 verbose #1618 > > 00:01:06 verbose #1619 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:06 verbose #1620 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:06 verbose #1621 > > │ ### eof │ 00:01:06 verbose #1622 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:06 verbose #1623 > > 00:01:06 verbose #1624 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:06 verbose #1625 > > inl eof () : parser () = fun input, s => 00:01:06 verbose #1626 > > if sm'.length input = 0i32 00:01:06 verbose #1627 > > then Ok ((), input, s) 00:01:06 verbose #1628 > > else Error $'$"parsing.eof / expected end of input / input: %A{!input}"' 00:01:06 verbose #1629 > 00:01:05 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 77739 } 00:01:06 verbose #1630 > 00:01:05 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:01:06 verbose #1631 > "nbconvert", 00:01:06 verbose #1632 > "c:/home/git/polyglot/lib/spiral/parsing.dib.ipynb", 00:01:06 verbose #1633 > "--to", 00:01:06 verbose #1634 > "html", 00:01:06 verbose #1635 > "--HTMLExporter.theme=dark", 00:01:06 verbose #1636 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/parsing.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:01:09 verbose #1637 > 00:01:08 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/parsing.dib.ipynb to html 00:01:09 verbose #1638 > 00:01:08 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:01:09 verbose #1639 > 00:01:08 verbose #7 ! validate(nb) 00:01:12 verbose #1640 > 00:01:11 verbose #8 ! [NbConvertApp] Writing 491217 bytes to c:\home\git\polyglot\lib\spiral\parsing.dib.html 00:01:12 verbose #1641 > 00:01:11 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 645 } 00:01:12 verbose #1642 > 00:01:11 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 645 } 00:01:12 verbose #1643 > 00:01:11 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:01:12 verbose #1644 > "-c", 00:01:12 verbose #1645 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/parsing.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:01:12 verbose #1646 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/parsing.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:01:13 verbose #1647 > 00:01:12 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:01:13 verbose #1648 > 00:01:12 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:01:13 verbose #1649 > 00:01:12 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 78443 } 00:01:13 debug #1650 runtime.execute_with_options_async / { exit_code = 0; output_length = 84366 } 00:01:13 debug #1 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path parsing.dib --retries 3 00:01:13 debug #1651 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path sm'.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:01:13 verbose #1652 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "sm'.dib", "--retries", "3"])) } 00:01:13 verbose #1653 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:01:13 verbose #1654 > "repl", 00:01:13 verbose #1655 > "--exit-after-run", 00:01:13 verbose #1656 > "--run", 00:01:13 verbose #1657 > "c:/home/git/polyglot/lib/spiral/sm'.dib", 00:01:13 verbose #1658 > "--output-path", 00:01:13 verbose #1659 > "c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb", 00:01:13 verbose #1660 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/sm'.dib" --output-path "c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:01:15 verbose #1661 > > 00:01:15 verbose #1662 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:15 verbose #1663 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:15 verbose #1664 > > │ # sm' │ 00:01:15 verbose #1665 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:19 verbose #1666 > > 00:01:19 verbose #1667 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:19 verbose #1668 > > //// test 00:01:19 verbose #1669 > > 00:01:19 verbose #1670 > > open testing 00:01:20 verbose #1671 > > 00:01:20 verbose #1672 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:20 verbose #1673 > > open rust 00:01:20 verbose #1674 > > open rust_operators 00:01:20 verbose #1675 > > open sm'_real 00:01:21 verbose #1676 > > 00:01:21 verbose #1677 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:21 verbose #1678 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:21 verbose #1679 > > │ ## rust │ 00:01:21 verbose #1680 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:21 verbose #1681 > > 00:01:21 verbose #1682 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:21 verbose #1683 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:21 verbose #1684 > > │ ### std_string │ 00:01:21 verbose #1685 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:21 verbose #1686 > > 00:01:21 verbose #1687 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:21 verbose #1688 > > //// real 00:01:21 verbose #1689 > > 00:01:21 verbose #1690 > > nominal std_string = 00:01:21 verbose #1691 > > `( 00:01:21 verbose #1692 > > backend_switch `(()) `({}) { 00:01:21 verbose #1693 > > Fsharp = 00:01:21 verbose #1694 > > (fun () => 00:01:21 verbose #1695 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:01:21 verbose #1696 > > Fable.Core.Emit(\"std::string::String\")>]]\ntype std_string_String = class 00:01:21 verbose #1697 > > end\n#else\ntype std_string_String = string\n#endif\n" 00:01:21 verbose #1698 > > ) : () -> () 00:01:21 verbose #1699 > > } 00:01:21 verbose #1700 > > $'' : $'std_string_String' 00:01:21 verbose #1701 > > ) 00:01:21 verbose #1702 > > 00:01:21 verbose #1703 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:21 verbose #1704 > > type std_string = sm'_real.std_string 00:01:21 verbose #1705 > > 00:01:21 verbose #1706 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:21 verbose #1707 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:21 verbose #1708 > > │ ### to_string │ 00:01:21 verbose #1709 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:21 verbose #1710 > > 00:01:21 verbose #1711 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:21 verbose #1712 > > inl to_string forall t. (x : t) : std_string = 00:01:21 verbose #1713 > > !\($'$"!x.to_string()"') 00:01:22 verbose #1714 > > 00:01:22 verbose #1715 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:22 verbose #1716 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:22 verbose #1717 > > │ ### from_std_string │ 00:01:22 verbose #1718 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:22 verbose #1719 > > 00:01:22 verbose #1720 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:22 verbose #1721 > > //// real 00:01:22 verbose #1722 > > 00:01:22 verbose #1723 > > inl from_std_string (str : std_string) : string = 00:01:22 verbose #1724 > > open rust 00:01:22 verbose #1725 > > rust.emit_expr `std_string `string str 00:01:22 verbose #1726 > > ($'"fable_library_rust::String_::fromString($0)"' : string) 00:01:22 verbose #1727 > > 00:01:22 verbose #1728 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:22 verbose #1729 > > inl from_std_string (str : std_string) : string = 00:01:22 verbose #1730 > > real sm'_real.from_std_string str 00:01:23 verbose #1731 > > 00:01:23 verbose #1732 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:23 verbose #1733 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:23 verbose #1734 > > │ ## sm' │ 00:01:23 verbose #1735 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:23 verbose #1736 > > 00:01:23 verbose #1737 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:23 verbose #1738 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:23 verbose #1739 > > │ ### symbol_to_string │ 00:01:23 verbose #1740 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:23 verbose #1741 > > 00:01:23 verbose #1742 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:23 verbose #1743 > > //// real 00:01:23 verbose #1744 > > 00:01:23 verbose #1745 > > inl symbol_to_string forall t {symbol}. : string = 00:01:23 verbose #1746 > > // inl x = real_core.type_lit_to_lit `t 00:01:23 verbose #1747 > > // inl x = real_core.type_to_symbol `t 00:01:23 verbose #1748 > > // inl x = real_core.type_lit_to_lit `t 00:01:23 verbose #1749 > > // !!!!SymbolToString (`(`t)) 00:01:23 verbose #1750 > > inl x = real_core.type_to_symbol `t 00:01:23 verbose #1751 > > !!!!SymbolToString (x) 00:01:23 verbose #1752 > > 00:01:23 verbose #1753 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:23 verbose #1754 > > inl symbol_to_string forall t {symbol}. (x : t) : string = 00:01:23 verbose #1755 > > real symbol_to_string `t 00:01:24 verbose #1756 > > 00:01:24 verbose #1757 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:24 verbose #1758 > > //// test 00:01:24 verbose #1759 > > 00:01:24 verbose #1760 > > .test 00:01:24 verbose #1761 > > |> symbol_to_string 00:01:24 verbose #1762 > > |> _assert_eq "test" 00:01:25 verbose #1763 > > 00:01:25 verbose #1764 > > ╭─[ 1.15s - stdout ]───────────────────────────────────────────────────────────╮ 00:01:25 verbose #1765 > > │ __assert_eq / actual: "test" / expected: "test" │ 00:01:25 verbose #1766 > > │ │ 00:01:25 verbose #1767 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:25 verbose #1768 > > 00:01:25 verbose #1769 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:25 verbose #1770 > > //// test 00:01:25 verbose #1771 > > //// real 00:01:25 verbose #1772 > > 00:01:25 verbose #1773 > > open testing 00:01:25 verbose #1774 > > inl x = .test 00:01:25 verbose #1775 > > inl x = symbol_to_string `(`x) 00:01:25 verbose #1776 > > _assert_eq `string "test" x 00:01:25 verbose #1777 > > 00:01:25 verbose #1778 > > ╭─[ 434.93ms - stdout ]────────────────────────────────────────────────────────╮ 00:01:25 verbose #1779 > > │ __assert_eq / actual: "test" / expected: "test" │ 00:01:25 verbose #1780 > > │ │ 00:01:25 verbose #1781 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:25 verbose #1782 > > 00:01:25 verbose #1783 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:25 verbose #1784 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:25 verbose #1785 > > │ ### index │ 00:01:25 verbose #1786 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:25 verbose #1787 > > 00:01:25 verbose #1788 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:25 verbose #1789 > > inl index i (str : string) : char = 00:01:25 verbose #1790 > > sm.index str i 00:01:25 verbose #1791 > > 00:01:25 verbose #1792 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:25 verbose #1793 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:25 verbose #1794 > > │ ### length │ 00:01:25 verbose #1795 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:25 verbose #1796 > > 00:01:25 verbose #1797 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:26 verbose #1798 > > inl length forall dim {int}. (input : string) : dim = 00:01:26 verbose #1799 > > input |> sm.length 00:01:26 verbose #1800 > > 00:01:26 verbose #1801 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:26 verbose #1802 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:26 verbose #1803 > > │ ### to_char_array │ 00:01:26 verbose #1804 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:26 verbose #1805 > > 00:01:26 verbose #1806 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:26 verbose #1807 > > inl to_char_array (str : string) : array_base char = 00:01:26 verbose #1808 > > am.init (str |> length) (fun i => str |> index i) 00:01:26 verbose #1809 > > |> fun (a x : _ int _) => x 00:01:27 verbose #1810 > > 00:01:27 verbose #1811 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:27 verbose #1812 > > //// test 00:01:27 verbose #1813 > > 00:01:27 verbose #1814 > > "abc" 00:01:27 verbose #1815 > > |> to_char_array 00:01:27 verbose #1816 > > |> _assert_eq' ;[[ 'a'; 'b'; 'c' ]] 00:01:28 verbose #1817 > > 00:01:28 verbose #1818 > > ╭─[ 999.42ms - stdout ]────────────────────────────────────────────────────────╮ 00:01:28 verbose #1819 > > │ __assert_eq' / actual: [|'a'; 'b'; 'c'|] / expected: [|'a'; 'b'; 'c'|] │ 00:01:28 verbose #1820 > > │ │ 00:01:28 verbose #1821 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:28 verbose #1822 > > 00:01:28 verbose #1823 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:28 verbose #1824 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:28 verbose #1825 > > │ ### to_char_list │ 00:01:28 verbose #1826 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:28 verbose #1827 > > 00:01:28 verbose #1828 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:28 verbose #1829 > > inl to_char_list (str : string) : list char = 00:01:28 verbose #1830 > > listm.init (str |> length) (fun (i : i64) => str |> index i) 00:01:28 verbose #1831 > > 00:01:28 verbose #1832 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:28 verbose #1833 > > //// test 00:01:28 verbose #1834 > > 00:01:28 verbose #1835 > > "abc" 00:01:28 verbose #1836 > > |> to_char_list 00:01:28 verbose #1837 > > |> _assert_eq [[ 'a'; 'b'; 'c' ]] 00:01:29 verbose #1838 > > 00:01:29 verbose #1839 > > ╭─[ 703.70ms - stdout ]────────────────────────────────────────────────────────╮ 00:01:29 verbose #1840 > > │ __assert_eq / actual: UH0_1 ('a', UH0_1 ('b', UH0_1 ('c', UH0_0))) / │ 00:01:29 verbose #1841 > > │ expected: UH0_1 ('a', UH0_1 ('b', UH0_1 ('c', UH0_0))) │ 00:01:29 verbose #1842 > > │ │ 00:01:29 verbose #1843 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:29 verbose #1844 > > 00:01:29 verbose #1845 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:29 verbose #1846 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:29 verbose #1847 > > │ ### is_empty │ 00:01:29 verbose #1848 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:29 verbose #1849 > > 00:01:29 verbose #1850 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:29 verbose #1851 > > inl is_empty (input : string) : bool = 00:01:29 verbose #1852 > > length input = 0i32 00:01:29 verbose #1853 > > 00:01:29 verbose #1854 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:29 verbose #1855 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:29 verbose #1856 > > │ ### slice │ 00:01:29 verbose #1857 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:29 verbose #1858 > > 00:01:29 verbose #1859 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:29 verbose #1860 > > inl slice from to s : string = 00:01:29 verbose #1861 > > sm.slice s { from to } 00:01:30 verbose #1862 > > 00:01:30 verbose #1863 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:30 verbose #1864 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:30 verbose #1865 > > │ ### format_debug │ 00:01:30 verbose #1866 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:30 verbose #1867 > > 00:01:30 verbose #1868 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:30 verbose #1869 > > //// real 00:01:30 verbose #1870 > > 00:01:30 verbose #1871 > > inl format_debug forall t. (x : t) : string = 00:01:30 verbose #1872 > > backend_switch `string `({}) { 00:01:30 verbose #1873 > > Fsharp = (fun () => $'$"%A{!x}"' : string) : () -> string 00:01:30 verbose #1874 > > Python = (fun () => $'f"{!x}"' : string) : () -> string 00:01:30 verbose #1875 > > } 00:01:30 verbose #1876 > > 00:01:30 verbose #1877 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:30 verbose #1878 > > inl format_debug forall t. (x : t) : string = 00:01:30 verbose #1879 > > real format_debug `t x 00:01:30 verbose #1880 > > 00:01:30 verbose #1881 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:30 verbose #1882 > > //// test 00:01:30 verbose #1883 > > 00:01:30 verbose #1884 > > { c = "1"; a = "2"; b = "3" } 00:01:30 verbose #1885 > > |> format_debug 00:01:30 verbose #1886 > > |> _assert_eq "struct (\"1\", \"2\", \"3\")" 00:01:31 verbose #1887 > > 00:01:31 verbose #1888 > > ╭─[ 468.92ms - stdout ]────────────────────────────────────────────────────────╮ 00:01:31 verbose #1889 > > │ __assert_eq / actual: "struct ("1", "2", "3")" / expected: "struct ("1", │ 00:01:31 verbose #1890 > > │ "2", "3")" │ 00:01:31 verbose #1891 > > │ │ 00:01:31 verbose #1892 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:31 verbose #1893 > > 00:01:31 verbose #1894 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:31 verbose #1895 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:31 verbose #1896 > > │ ### format_pretty │ 00:01:31 verbose #1897 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:31 verbose #1898 > > 00:01:31 verbose #1899 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:31 verbose #1900 > > //// real 00:01:31 verbose #1901 > > 00:01:31 verbose #1902 > > inl format_pretty forall t. (x : t) : string = 00:01:31 verbose #1903 > > run_target_args `string `t (fun () => x) function 00:01:31 verbose #1904 > > | Rust _ => fun x => 00:01:31 verbose #1905 > > open rust 00:01:31 verbose #1906 > > inl result = rust.emit_expr `t `std_string x 00:01:31 verbose #1907 > > ($'"format\!(\\\"{:#?}\\\", $0)"' : string) 00:01:31 verbose #1908 > > from_std_string result 00:01:31 verbose #1909 > > | _ => fun _ => format_debug `t x 00:01:31 verbose #1910 > > 00:01:31 verbose #1911 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:31 verbose #1912 > > inl format_pretty forall t. (x : t) : string = 00:01:31 verbose #1913 > > real sm'_real.format_pretty `t x 00:01:32 verbose #1914 > > 00:01:32 verbose #1915 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:32 verbose #1916 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:32 verbose #1917 > > │ ### prim │ 00:01:32 verbose #1918 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:32 verbose #1919 > > 00:01:32 verbose #1920 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:32 verbose #1921 > > inl prim x = real 00:01:32 verbose #1922 > > match x with 00:01:32 verbose #1923 > > | (x : i8) | (x : i16) | (x : i32) | (x : i64) => "%d", x 00:01:32 verbose #1924 > > | (x : u8) | (x : u16) | (x : u32) | (x : u64) => "%u", x 00:01:32 verbose #1925 > > | (x : f32) | (x : f64) => "%f", x 00:01:32 verbose #1926 > > | (x : string) => "%s", x 00:01:32 verbose #1927 > > | (x : char) => "%c", x 00:01:32 verbose #1928 > > 00:01:32 verbose #1929 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:32 verbose #1930 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:32 verbose #1931 > > │ ### printable │ 00:01:32 verbose #1932 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:32 verbose #1933 > > 00:01:32 verbose #1934 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:32 verbose #1935 > > //// real 00:01:32 verbose #1936 > > 00:01:32 verbose #1937 > > prototype printable t : t -> () 00:01:33 verbose #1938 > > 00:01:33 verbose #1939 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:33 verbose #1940 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:33 verbose #1941 > > │ ### format_real │ 00:01:33 verbose #1942 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:33 verbose #1943 > > 00:01:33 verbose #1944 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:33 verbose #1945 > > //// real 00:01:33 verbose #1946 > > 00:01:33 verbose #1947 > > let format_real forall t. (x : t) : string = 00:01:33 verbose #1948 > > inl result = mut `string (join "") 00:01:33 verbose #1949 > > inl rec write x = 00:01:33 verbose #1950 > > inl p ((a : string), b) = 00:01:33 verbose #1951 > > inl s : string = 00:01:33 verbose #1952 > > backend_switch `string `({}) { 00:01:33 verbose #1953 > > Fsharp = 00:01:33 verbose #1954 > > (fun () => 00:01:33 verbose #1955 > > match b with 00:01:33 verbose #1956 > > | (_ : f32) | (_ : f64) => $'$"%+.6f{!b}"' : string 00:01:33 verbose #1957 > > | _ => $'$"{!b}"' : string 00:01:33 verbose #1958 > > ) : () -> string 00:01:33 verbose #1959 > > Python = 00:01:33 verbose #1960 > > (fun () => 00:01:33 verbose #1961 > > match b with 00:01:33 verbose #1962 > > | (_ : f32) | (_ : f64) => $'"{:.6f}".format(!b)' : 00:01:33 verbose #1963 > > string 00:01:33 verbose #1964 > > | _ => $'f"{!b}"' : string 00:01:33 verbose #1965 > > ) : () -> string 00:01:33 verbose #1966 > > } 00:01:33 verbose #1967 > > exec_unit ((fun () => result <- (+.) `string ((~*) `string result) 00:01:33 verbose #1968 > > s) : () -> ()) 00:01:33 verbose #1969 > > 00:01:33 verbose #1970 > > match x with // According to Bing it shouldn't matter whether these are 00:01:33 verbose #1971 > > %d or %lld in printf. 00:01:33 verbose #1972 > > | () => () 00:01:33 verbose #1973 > > | (x : i8) | (x : i16) | (x : i32) | (x : i64) => p ("%d", x) 00:01:33 verbose #1974 > > | (x : u8) | (x : u16) | (x : u32) | (x : u64) => p ("%u", x) 00:01:33 verbose #1975 > > | (x : f32) | (x : f64) => p ("%f", x) 00:01:33 verbose #1976 > > | (x : string) => p ("%s", x) 00:01:33 verbose #1977 > > | (x : char) => p ("%c", x) 00:01:33 verbose #1978 > > | (x : bool) => p ("%s", if x then "true" else "false") 00:01:33 verbose #1979 > > | (a,b) => write a . write ", " . write b 00:01:33 verbose #1980 > > | {} as x => 00:01:33 verbose #1981 > > write "{ " 00:01:33 verbose #1982 > > inl _result = 00:01:33 verbose #1983 > > real_core.record_fold 00:01:33 verbose #1984 > > fun { state = separator key value } => 00:01:33 verbose #1985 > > write separator 00:01:33 verbose #1986 > > write (symbol_to_string `(`key)) . write " = " . write 00:01:33 verbose #1987 > > value 00:01:33 verbose #1988 > > "; " 00:01:33 verbose #1989 > > () x 00:01:33 verbose #1990 > > write " }" 00:01:33 verbose #1991 > > | x when real_core.symbol_is x => write (symbol_to_string `(`x)) 00:01:33 verbose #1992 > > | x when real_core.function_is x => write (x ()) 00:01:33 verbose #1993 > > | x when real_core.union_is x => 00:01:33 verbose #1994 > > if real_core.prototype_has `(`x) printable then printable `(`x) x 00:01:33 verbose #1995 > > else 00:01:33 verbose #1996 > > write (format_debug `(`x) x) 00:01:33 verbose #1997 > > // real_core.unbox x (fun (k, v) => 00:01:33 verbose #1998 > > // write k 00:01:33 verbose #1999 > > // match v with 00:01:33 verbose #2000 > > // | () => () 00:01:33 verbose #2001 > > // | _ => write "(" . write v . write ")" 00:01:33 verbose #2002 > > // ) 00:01:33 verbose #2003 > > | x when real_core.nominal_is x => 00:01:33 verbose #2004 > > if real_core.prototype_has `(`x) printable then printable `(`x) x 00:01:33 verbose #2005 > > // elif layout_is x then write *x // TODO: Deal with all the layout 00:01:33 verbose #2006 > > type cases. 00:01:33 verbose #2007 > > else write (format_pretty `(`x) x) 00:01:33 verbose #2008 > > | x => write (format_debug `(`x) x) 00:01:33 verbose #2009 > > write x 00:01:33 verbose #2010 > > (~*) `string result 00:01:33 verbose #2011 > > 00:01:33 verbose #2012 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:33 verbose #2013 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:33 verbose #2014 > > │ ### format │ 00:01:33 verbose #2015 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:33 verbose #2016 > > 00:01:33 verbose #2017 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:33 verbose #2018 > > inl format forall t. (x : t) : string = 00:01:33 verbose #2019 > > real format_real `t x 00:01:33 verbose #2020 > > 00:01:33 verbose #2021 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:33 verbose #2022 > > //// test 00:01:33 verbose #2023 > > ///! fsharp 00:01:33 verbose #2024 > > ////! cuda 00:01:33 verbose #2025 > > ////! rust 00:01:33 verbose #2026 > > ////! typescript 00:01:33 verbose #2027 > > ////! python 00:01:33 verbose #2028 > > 00:01:33 verbose #2029 > > ("1", "2", [["3"; "4"]], { b = "5"; c = "6"; a = fun () => "7" }) 00:01:33 verbose #2030 > > |> format 00:01:33 verbose #2031 > > |> _assert_eq "1, 2, UH0_1 (\"3\", UH0_1 (\"4\", UH0_0)), { b = 5; c = 6; a = 7 00:01:33 verbose #2032 > > }" 00:01:34 verbose #2033 > > 00:01:34 verbose #2034 > > ╭─[ 764.46ms - stdout ]────────────────────────────────────────────────────────╮ 00:01:34 verbose #2035 > > │ __assert_eq / actual: "1, 2, UH0_1 ("3", UH0_1 ("4", UH0_0)), { b = 5; c = │ 00:01:34 verbose #2036 > > │ 6; a = 7 }" / expected: "1, 2, UH0_1 ("3", UH0_1 ("4", UH0_0)), { b = 5; c = │ 00:01:34 verbose #2037 > > │ 6; a = 7 }" │ 00:01:34 verbose #2038 > > │ │ 00:01:34 verbose #2039 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:34 verbose #2040 > > 00:01:34 verbose #2041 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:34 verbose #2042 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:34 verbose #2043 > > │ ### concat_array_trailing │ 00:01:34 verbose #2044 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:34 verbose #2045 > > 00:01:34 verbose #2046 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:34 verbose #2047 > > inl concat_array_trailing (separator : string) (input : a i32 string) = 00:01:34 verbose #2048 > > ("", input) 00:01:34 verbose #2049 > > ||> am.fold fun acc (x : string) => 00:01:34 verbose #2050 > > $'!acc + !x + !separator + ""' 00:01:35 verbose #2051 > > 00:01:35 verbose #2052 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:35 verbose #2053 > > //// test 00:01:35 verbose #2054 > > ///! typescript 00:01:35 verbose #2055 > > 00:01:35 verbose #2056 > > ;[[ 00:01:35 verbose #2057 > > "1" 00:01:35 verbose #2058 > > "2" 00:01:35 verbose #2059 > > "3" 00:01:35 verbose #2060 > > ]] 00:01:35 verbose #2061 > > |> fun x => 00:01:35 verbose #2062 > > inl code = (a x : _ i32 _) |> concat_array_trailing "\n" 00:01:35 verbose #2063 > > code 00:01:35 verbose #2064 > > |> _assert_eq "1\n2\n3\n" 00:01:37 verbose #2065 > > 00:01:37 verbose #2066 > > ╭─[ 2.16s - return value ]─────────────────────────────────────────────────────╮ 00:01:37 verbose #2067 > > │ __assert_eq / actual: 1 │ 00:01:37 verbose #2068 > > │ 2 │ 00:01:37 verbose #2069 > > │ 3 │ 00:01:37 verbose #2070 > > │ / expected: 1 │ 00:01:37 verbose #2071 > > │ 2 │ 00:01:37 verbose #2072 > > │ 3 │ 00:01:37 verbose #2073 > > │ │ 00:01:37 verbose #2074 > > │ │ 00:01:37 verbose #2075 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:37 verbose #2076 > > 00:01:37 verbose #2077 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:37 verbose #2078 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:37 verbose #2079 > > │ ### concat_list_trailing │ 00:01:37 verbose #2080 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:37 verbose #2081 > > 00:01:37 verbose #2082 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:37 verbose #2083 > > inl concat_list_trailing separator input = 00:01:37 verbose #2084 > > ("", input) 00:01:37 verbose #2085 > > ||> listm.fold fun acc (x : string) => 00:01:37 verbose #2086 > > $'!acc + !x + !separator + ""' 00:01:37 verbose #2087 > > 00:01:37 verbose #2088 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:01:37 verbose #2089 > > //// test 00:01:37 verbose #2090 > > ///! rust 00:01:37 verbose #2091 > > 00:01:37 verbose #2092 > > [[ 00:01:37 verbose #2093 > > "1" 00:01:37 verbose #2094 > > "2" 00:01:37 verbose #2095 > > "3" 00:01:37 verbose #2096 > > ]] 00:01:37 verbose #2097 > > |> fun x => 00:01:37 verbose #2098 > > inl code = (x : _) |> concat_list_trailing "\n" 00:01:37 verbose #2099 > > code 00:01:37 verbose #2100 > > |> _assert_eq "1\n2\n3\n" 00:02:05 verbose #2101 > > 00:02:05 verbose #2102 > > ╭─[ 27.99s - return value ]────────────────────────────────────────────────────╮ 00:02:05 verbose #2103 > > │ __assert_eq / actual: "1 │ 00:02:05 verbose #2104 > > │ 2 │ 00:02:05 verbose #2105 > > │ 3 │ 00:02:05 verbose #2106 > > │ " / expected: "1 │ 00:02:05 verbose #2107 > > │ 2 │ 00:02:05 verbose #2108 > > │ 3 │ 00:02:05 verbose #2109 > > │ " │ 00:02:05 verbose #2110 > > │ │ 00:02:05 verbose #2111 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:05 verbose #2112 > > 00:02:05 verbose #2113 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:05 verbose #2114 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:05 verbose #2115 > > │ ### concat_list_heap_trailing │ 00:02:05 verbose #2116 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:05 verbose #2117 > > 00:02:05 verbose #2118 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:05 verbose #2119 > > inl concat_list_heap_trailing separator input = 00:02:05 verbose #2120 > > inl separator = join separator 00:02:05 verbose #2121 > > ("", input) 00:02:05 verbose #2122 > > ||> listm.fold fun acc (x : string) => 00:02:05 verbose #2123 > > $'$"{!acc}{!x}{!separator}"' 00:02:06 verbose #2124 > > 00:02:06 verbose #2125 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:06 verbose #2126 > > //// test 00:02:06 verbose #2127 > > ///! rust 00:02:06 verbose #2128 > > 00:02:06 verbose #2129 > > [[ 00:02:06 verbose #2130 > > "1" 00:02:06 verbose #2131 > > "2" 00:02:06 verbose #2132 > > "3" 00:02:06 verbose #2133 > > ]] 00:02:06 verbose #2134 > > |> fun x => 00:02:06 verbose #2135 > > inl code = (x : _) |> concat_list_heap_trailing "\n" 00:02:06 verbose #2136 > > code 00:02:06 verbose #2137 > > |> _assert_eq "1\n2\n3\n" 00:02:23 verbose #2138 > > 00:02:23 verbose #2139 > > ╭─[ 17.03s - return value ]────────────────────────────────────────────────────╮ 00:02:23 verbose #2140 > > │ __assert_eq / actual: "1 │ 00:02:23 verbose #2141 > > │ 2 │ 00:02:23 verbose #2142 > > │ 3 │ 00:02:23 verbose #2143 > > │ " / expected: "1 │ 00:02:23 verbose #2144 > > │ 2 │ 00:02:23 verbose #2145 > > │ 3 │ 00:02:23 verbose #2146 > > │ " │ 00:02:23 verbose #2147 > > │ │ 00:02:23 verbose #2148 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:23 verbose #2149 > > 00:02:23 verbose #2150 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:23 verbose #2151 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:23 verbose #2152 > > │ ### ellipsis │ 00:02:23 verbose #2153 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:23 verbose #2154 > > 00:02:23 verbose #2155 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:23 verbose #2156 > > inl ellipsis (max : i32) (s : string) = 00:02:23 verbose #2157 > > if sm.length s <= max 00:02:23 verbose #2158 > > then s 00:02:23 verbose #2159 > > else s |> slice 0 (max - 1) |> fun x => $'!x + "..."' 00:02:23 verbose #2160 > > 00:02:23 verbose #2161 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:23 verbose #2162 > > //// test 00:02:23 verbose #2163 > > 00:02:23 verbose #2164 > > "12345" 00:02:23 verbose #2165 > > |> ellipsis 2 00:02:23 verbose #2166 > > |> _assert_eq "12..." 00:02:23 verbose #2167 > > 00:02:23 verbose #2168 > > "12345" 00:02:23 verbose #2169 > > |> ellipsis 4 00:02:23 verbose #2170 > > |> _assert_eq "1234..." 00:02:24 verbose #2171 > > 00:02:24 verbose #2172 > > ╭─[ 423.52ms - stdout ]────────────────────────────────────────────────────────╮ 00:02:24 verbose #2173 > > │ __assert_eq / actual: "12..." / expected: "12..." │ 00:02:24 verbose #2174 > > │ __assert_eq / actual: "1234..." / expected: "1234..." │ 00:02:24 verbose #2175 > > │ │ 00:02:24 verbose #2176 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:24 verbose #2177 > > 00:02:24 verbose #2178 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:24 verbose #2179 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:24 verbose #2180 > > │ ## fsharp │ 00:02:24 verbose #2181 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:24 verbose #2182 > > 00:02:24 verbose #2183 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:24 verbose #2184 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:24 verbose #2185 > > │ ### ends_with │ 00:02:24 verbose #2186 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:24 verbose #2187 > > 00:02:24 verbose #2188 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:24 verbose #2189 > > inl ends_with (value : string) (s : string) : bool = 00:02:24 verbose #2190 > > $'!s.EndsWith !value ' 00:02:24 verbose #2191 > > 00:02:24 verbose #2192 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:24 verbose #2193 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:24 verbose #2194 > > │ ### last_index_of │ 00:02:24 verbose #2195 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:24 verbose #2196 > > 00:02:24 verbose #2197 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:24 verbose #2198 > > inl last_index_of (search : string) (s : string) : i32 = 00:02:24 verbose #2199 > > $'!s.LastIndexOf !search ' 00:02:25 verbose #2200 > > 00:02:25 verbose #2201 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:25 verbose #2202 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:25 verbose #2203 > > │ ### index_of │ 00:02:25 verbose #2204 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:25 verbose #2205 > > 00:02:25 verbose #2206 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:25 verbose #2207 > > inl index_of (search : string) (s : string) : i32 = 00:02:25 verbose #2208 > > $'!s.IndexOf !search ' 00:02:25 verbose #2209 > > 00:02:25 verbose #2210 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:25 verbose #2211 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:25 verbose #2212 > > │ ### replicate │ 00:02:25 verbose #2213 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:25 verbose #2214 > > 00:02:25 verbose #2215 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:25 verbose #2216 > > inl replicate (n : i32) (s : string) : string = 00:02:25 verbose #2217 > > backend_switch { 00:02:25 verbose #2218 > > Fsharp = fun () => s |> $'String.replicate' n : string 00:02:25 verbose #2219 > > Python = fun () => $'!s * !n ' : string 00:02:25 verbose #2220 > > } 00:02:25 verbose #2221 > > 00:02:25 verbose #2222 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:25 verbose #2223 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:25 verbose #2224 > > │ ### obj_to_string │ 00:02:25 verbose #2225 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:25 verbose #2226 > > 00:02:25 verbose #2227 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:25 verbose #2228 > > inl obj_to_string x : string = 00:02:25 verbose #2229 > > backend_switch { 00:02:25 verbose #2230 > > Fsharp = fun () => x |> $'_.ToString()' : string 00:02:25 verbose #2231 > > Python = fun () => $'str(!x)' : string 00:02:25 verbose #2232 > > } 00:02:26 verbose #2233 > > 00:02:26 verbose #2234 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:26 verbose #2235 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:26 verbose #2236 > > │ ### pad_left │ 00:02:26 verbose #2237 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:26 verbose #2238 > > 00:02:26 verbose #2239 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:26 verbose #2240 > > inl pad_left (total_width : i32) (padding_char : char) (s : string) : string = 00:02:26 verbose #2241 > > backend_switch { 00:02:26 verbose #2242 > > Fsharp = fun () => $'!s.PadLeft (!total_width, !padding_char)' : string 00:02:26 verbose #2243 > > Python = fun () => 00:02:26 verbose #2244 > > inl padding = padding_char |> obj_to_string |> replicate 00:02:26 verbose #2245 > > (total_width - length s) 00:02:26 verbose #2246 > > padding +. s 00:02:26 verbose #2247 > > } 00:02:26 verbose #2248 > > 00:02:26 verbose #2249 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:26 verbose #2250 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:26 verbose #2251 > > │ ### pad_right │ 00:02:26 verbose #2252 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:26 verbose #2253 > > 00:02:26 verbose #2254 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:26 verbose #2255 > > inl pad_right (total_width : i32) (padding_char : char) (s : string) : string = 00:02:26 verbose #2256 > > $'!s.PadRight (!total_width, !padding_char)' 00:02:27 verbose #2257 > > 00:02:27 verbose #2258 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:27 verbose #2259 > > //// test 00:02:27 verbose #2260 > > 00:02:27 verbose #2261 > > "123" 00:02:27 verbose #2262 > > |> pad_right 6 ' ' 00:02:27 verbose #2263 > > |> _assert_eq "123 " 00:02:27 verbose #2264 > > 00:02:27 verbose #2265 > > ╭─[ 566.10ms - stdout ]────────────────────────────────────────────────────────╮ 00:02:27 verbose #2266 > > │ __assert_eq / actual: "123 " / expected: "123 " │ 00:02:27 verbose #2267 > > │ │ 00:02:27 verbose #2268 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:27 verbose #2269 > > 00:02:27 verbose #2270 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:27 verbose #2271 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:27 verbose #2272 > > │ ### starts_with │ 00:02:27 verbose #2273 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:27 verbose #2274 > > 00:02:27 verbose #2275 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:27 verbose #2276 > > inl starts_with (value : string) (s : string) : bool = 00:02:27 verbose #2277 > > backend_switch { 00:02:27 verbose #2278 > > Fsharp = fun () => $'!s.StartsWith !value ' : bool 00:02:27 verbose #2279 > > Python = fun () => $'!s.startswith(!value)' : bool 00:02:27 verbose #2280 > > } 00:02:28 verbose #2281 > > 00:02:28 verbose #2282 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:28 verbose #2283 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:28 verbose #2284 > > │ ### is_white_space │ 00:02:28 verbose #2285 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:28 verbose #2286 > > 00:02:28 verbose #2287 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:28 verbose #2288 > > inl is_white_space (c : char) : bool = 00:02:28 verbose #2289 > > c |> $'System.Char.IsWhiteSpace' 00:02:28 verbose #2290 > > 00:02:28 verbose #2291 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:28 verbose #2292 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:28 verbose #2293 > > │ ### substring │ 00:02:28 verbose #2294 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:28 verbose #2295 > > 00:02:28 verbose #2296 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:28 verbose #2297 > > inl substring (start : i32) (len : i32) (str : string) : string = 00:02:28 verbose #2298 > > $'!str.Substring (!start, !len)' 00:02:29 verbose #2299 > > 00:02:29 verbose #2300 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:29 verbose #2301 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:29 verbose #2302 > > │ ### to_lower │ 00:02:29 verbose #2303 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:29 verbose #2304 > > 00:02:29 verbose #2305 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:29 verbose #2306 > > inl to_lower (input : string) : string = 00:02:29 verbose #2307 > > backend_switch { 00:02:29 verbose #2308 > > Fsharp = fun () => $'!input.ToLower' () : string 00:02:29 verbose #2309 > > Python = fun () => $'!input.lower()' : string 00:02:29 verbose #2310 > > } 00:02:29 verbose #2311 > > 00:02:29 verbose #2312 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:29 verbose #2313 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:29 verbose #2314 > > │ ### to_upper │ 00:02:29 verbose #2315 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:29 verbose #2316 > > 00:02:29 verbose #2317 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:29 verbose #2318 > > inl to_upper (input : string) : string = 00:02:29 verbose #2319 > > $'!input.ToUpper' () 00:02:30 verbose #2320 > > 00:02:30 verbose #2321 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:30 verbose #2322 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:30 verbose #2323 > > │ ### char_to_upper │ 00:02:30 verbose #2324 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:30 verbose #2325 > > 00:02:30 verbose #2326 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:30 verbose #2327 > > inl char_to_upper (input : char) : char = 00:02:30 verbose #2328 > > $'System.Char.ToUpper !input ' 00:02:30 verbose #2329 > > 00:02:30 verbose #2330 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:30 verbose #2331 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:30 verbose #2332 > > │ ### string_builder │ 00:02:30 verbose #2333 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:30 verbose #2334 > > 00:02:30 verbose #2335 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:30 verbose #2336 > > nominal string_builder = $'System.Text.StringBuilder' 00:02:30 verbose #2337 > > 00:02:30 verbose #2338 > > inl string_builder (initial : string) : string_builder = 00:02:30 verbose #2339 > > initial |> $'`string_builder ' 00:02:30 verbose #2340 > > 00:02:30 verbose #2341 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:30 verbose #2342 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:30 verbose #2343 > > │ ### builder_append │ 00:02:30 verbose #2344 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:30 verbose #2345 > > 00:02:30 verbose #2346 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:30 verbose #2347 > > inl builder_append (item : string) (sb : string_builder) : string_builder = 00:02:30 verbose #2348 > > ($'!sb.Append' item : string_builder) |> ignore 00:02:30 verbose #2349 > > sb 00:02:31 verbose #2350 > > 00:02:31 verbose #2351 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:31 verbose #2352 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:31 verbose #2353 > > │ ### builder_replace │ 00:02:31 verbose #2354 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:31 verbose #2355 > > 00:02:31 verbose #2356 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:31 verbose #2357 > > inl builder_replace (old : string) (new : string) (sb : string_builder) : 00:02:31 verbose #2358 > > string_builder = 00:02:31 verbose #2359 > > ($'!sb.Replace (!old, !new)' : string_builder) |> ignore 00:02:31 verbose #2360 > > sb 00:02:31 verbose #2361 > > 00:02:31 verbose #2362 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:31 verbose #2363 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:31 verbose #2364 > > │ ### builder_insert │ 00:02:31 verbose #2365 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:31 verbose #2366 > > 00:02:31 verbose #2367 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:31 verbose #2368 > > inl builder_insert (n : i32) (s : string) (sb : string_builder) : string_builder 00:02:31 verbose #2369 > > = 00:02:31 verbose #2370 > > ($'!sb.Insert (!n, !s)' : string_builder) |> ignore 00:02:31 verbose #2371 > > sb 00:02:32 verbose #2372 > > 00:02:32 verbose #2373 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:32 verbose #2374 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:32 verbose #2375 > > │ ### builder_clear │ 00:02:32 verbose #2376 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:32 verbose #2377 > > 00:02:32 verbose #2378 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:32 verbose #2379 > > inl builder_clear (sb : string_builder) : string_builder = 00:02:32 verbose #2380 > > ($'!sb.Clear' () : string_builder) |> ignore 00:02:32 verbose #2381 > > sb 00:02:32 verbose #2382 > > 00:02:32 verbose #2383 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:32 verbose #2384 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:32 verbose #2385 > > │ ### trim │ 00:02:32 verbose #2386 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:32 verbose #2387 > > 00:02:32 verbose #2388 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:32 verbose #2389 > > inl trim (input : string) : string = 00:02:32 verbose #2390 > > $'!input.Trim' () 00:02:33 verbose #2391 > > 00:02:33 verbose #2392 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:33 verbose #2393 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:33 verbose #2394 > > │ ### concat │ 00:02:33 verbose #2395 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:33 verbose #2396 > > 00:02:33 verbose #2397 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:33 verbose #2398 > > inl concat (a : string) (b : seq.seq' string) : string = 00:02:33 verbose #2399 > > backend_switch { 00:02:33 verbose #2400 > > Fsharp = fun () => 00:02:33 verbose #2401 > > b |> $'String.concat' a : string 00:02:33 verbose #2402 > > Python = fun () => 00:02:33 verbose #2403 > > $'!a.join(!b)' : string 00:02:33 verbose #2404 > > } 00:02:33 verbose #2405 > > 00:02:33 verbose #2406 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:33 verbose #2407 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:33 verbose #2408 > > │ ### trim_end │ 00:02:33 verbose #2409 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:33 verbose #2410 > > 00:02:33 verbose #2411 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:33 verbose #2412 > > inl trim_end (trim_chars : list char) (input : string) : string = 00:02:33 verbose #2413 > > inl trim_chars = trim_chars |> listm'.box 00:02:33 verbose #2414 > > backend_switch { 00:02:33 verbose #2415 > > Fsharp = fun () => 00:02:33 verbose #2416 > > inl trim_chars = trim_chars |> listm'.to_array' 00:02:33 verbose #2417 > > $'!input.TrimEnd !trim_chars ' : string 00:02:33 verbose #2418 > > Python = fun () => 00:02:33 verbose #2419 > > inl trim_chars = trim_chars |> listm'.map obj_to_string |> 00:02:33 verbose #2420 > > seq.of_list' |> concat "" 00:02:33 verbose #2421 > > $'!input.rstrip(!trim_chars)' : string 00:02:33 verbose #2422 > > } 00:02:34 verbose #2423 > > 00:02:34 verbose #2424 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:34 verbose #2425 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:34 verbose #2426 > > │ ### trim_start │ 00:02:34 verbose #2427 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:34 verbose #2428 > > 00:02:34 verbose #2429 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:34 verbose #2430 > > inl trim_start (trim_chars : list char) (input : string) : string = 00:02:34 verbose #2431 > > inl trim_chars = trim_chars |> listm'.box 00:02:34 verbose #2432 > > backend_switch { 00:02:34 verbose #2433 > > Fsharp = fun () => 00:02:34 verbose #2434 > > inl trim_chars = trim_chars |> listm'.to_array' 00:02:34 verbose #2435 > > $'!input.TrimStart !trim_chars ' : string 00:02:34 verbose #2436 > > Python = fun () => 00:02:34 verbose #2437 > > inl trim_chars = trim_chars |> listm'.map obj_to_string |> 00:02:34 verbose #2438 > > seq.of_list' |> concat "" 00:02:34 verbose #2439 > > $'!input.lstrip(!trim_chars)' : string 00:02:34 verbose #2440 > > } 00:02:34 verbose #2441 > > 00:02:34 verbose #2442 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:34 verbose #2443 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:34 verbose #2444 > > │ ### length' │ 00:02:34 verbose #2445 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:34 verbose #2446 > > 00:02:34 verbose #2447 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:34 verbose #2448 > > inl length' forall dim. (input : string) : dim = 00:02:34 verbose #2449 > > input |> $'String.length' 00:02:34 verbose #2450 > > 00:02:34 verbose #2451 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:34 verbose #2452 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:34 verbose #2453 > > │ ### to_string any │ 00:02:34 verbose #2454 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:34 verbose #2455 > > 00:02:34 verbose #2456 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:34 verbose #2457 > > instance to_string any = 00:02:34 verbose #2458 > > obj_to_string 00:02:35 verbose #2459 > > 00:02:35 verbose #2460 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:35 verbose #2461 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:35 verbose #2462 > > │ ### replace │ 00:02:35 verbose #2463 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:35 verbose #2464 > > 00:02:35 verbose #2465 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:35 verbose #2466 > > inl replace (old_value : string) (new_value : string) (s : string) : string = 00:02:35 verbose #2467 > > $'!s.Replace (!old_value, !new_value)' 00:02:35 verbose #2468 > > 00:02:35 verbose #2469 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:35 verbose #2470 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:35 verbose #2471 > > │ ### split │ 00:02:35 verbose #2472 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:35 verbose #2473 > > 00:02:35 verbose #2474 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:35 verbose #2475 > > inl split (separator : string) (str : string) : array_base string = 00:02:35 verbose #2476 > > backend_switch { 00:02:35 verbose #2477 > > Fsharp = fun () => $'!str.Split !separator ' : array_base string 00:02:35 verbose #2478 > > Python = fun () => $'!str.split(!separator)' : array_base string 00:02:35 verbose #2479 > > } 00:02:36 verbose #2480 > > 00:02:36 verbose #2481 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:36 verbose #2482 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:36 verbose #2483 > > │ ### split_string │ 00:02:36 verbose #2484 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:36 verbose #2485 > > 00:02:36 verbose #2486 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:36 verbose #2487 > > inl split_string (separator : array_base string) (str : string) : array_base 00:02:36 verbose #2488 > > string = 00:02:36 verbose #2489 > > run_target_args (fun () => str, separator) function 00:02:36 verbose #2490 > > | Fsharp (Native) => fun str, separator => $'!str.Split (!separator, 00:02:36 verbose #2491 > > System.StringSplitOptions.None)' 00:02:36 verbose #2492 > > | _ => fun str, separator => str |> split ((a separator : _ int _) |> 00:02:36 verbose #2493 > > seq.of_array |> concat (join "")) 00:02:36 verbose #2494 > > 00:02:36 verbose #2495 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:36 verbose #2496 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:36 verbose #2497 > > │ ### join' │ 00:02:36 verbose #2498 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:36 verbose #2499 > > 00:02:36 verbose #2500 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:36 verbose #2501 > > inl join' (concat : string) (s : a int string) : string = 00:02:36 verbose #2502 > > $'System.String.Join (!concat, !s)' 00:02:37 verbose #2503 > > 00:02:37 verbose #2504 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:37 verbose #2505 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:37 verbose #2506 > > │ ### encoding │ 00:02:37 verbose #2507 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:37 verbose #2508 > > 00:02:37 verbose #2509 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:37 verbose #2510 > > nominal encoding = $'System.Text.Encoding' 00:02:37 verbose #2511 > > 00:02:37 verbose #2512 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:37 verbose #2513 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:37 verbose #2514 > > │ ### encoding_utf8 │ 00:02:37 verbose #2515 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:37 verbose #2516 > > 00:02:37 verbose #2517 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:37 verbose #2518 > > inl encoding_utf8 () : encoding = 00:02:37 verbose #2519 > > $'`encoding.UTF8' 00:02:38 verbose #2520 > > 00:02:38 verbose #2521 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:38 verbose #2522 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:38 verbose #2523 > > │ ### utf8_get_bytes │ 00:02:38 verbose #2524 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:38 verbose #2525 > > 00:02:38 verbose #2526 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:38 verbose #2527 > > inl utf8_get_bytes (s : string) : a i32 u8 = 00:02:38 verbose #2528 > > s |> (encoding_utf8 () |> $'_.GetBytes') 00:02:38 verbose #2529 > > 00:02:38 verbose #2530 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:38 verbose #2531 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:38 verbose #2532 > > │ ### byte_to_string │ 00:02:38 verbose #2533 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:38 verbose #2534 > > 00:02:38 verbose #2535 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:38 verbose #2536 > > inl byte_to_string (format : string) (x : u8) : string = 00:02:38 verbose #2537 > > $'!x.ToString' format 00:02:39 verbose #2538 > > 00:02:39 verbose #2539 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:39 verbose #2540 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:39 verbose #2541 > > │ ## rust │ 00:02:39 verbose #2542 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:39 verbose #2543 > > 00:02:39 verbose #2544 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:39 verbose #2545 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:39 verbose #2546 > > │ ### str │ 00:02:39 verbose #2547 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:39 verbose #2548 > > 00:02:39 verbose #2549 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:39 verbose #2550 > > nominal str = 00:02:39 verbose #2551 > > `( 00:02:39 verbose #2552 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:02:39 verbose #2553 > > Fable.Core.Emit(\"str\")>]]\ntype Str = class end\n#else\ntype Str = 00:02:39 verbose #2554 > > string\n#endif\n" 00:02:39 verbose #2555 > > $'' : $'Str' 00:02:39 verbose #2556 > > ) 00:02:39 verbose #2557 > > 00:02:39 verbose #2558 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:39 verbose #2559 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:39 verbose #2560 > > │ ### chars │ 00:02:39 verbose #2561 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:39 verbose #2562 > > 00:02:39 verbose #2563 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:39 verbose #2564 > > inl chars (x : rust.ref str) : rust.mut' (into_iterator char) = 00:02:39 verbose #2565 > > !\\(x, $'$"$0.chars()"') 00:02:39 verbose #2566 > > 00:02:39 verbose #2567 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:39 verbose #2568 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:39 verbose #2569 > > │ ### char_is_alphanumeric │ 00:02:39 verbose #2570 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:39 verbose #2571 > > 00:02:39 verbose #2572 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:39 verbose #2573 > > inl char_is_alphanumeric (x : char) : bool = 00:02:39 verbose #2574 > > !\\(x, $'$"$0.is_alphanumeric()"') 00:02:40 verbose #2575 > > 00:02:40 verbose #2576 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:40 verbose #2577 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:40 verbose #2578 > > │ ### byte_slice │ 00:02:40 verbose #2579 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:40 verbose #2580 > > 00:02:40 verbose #2581 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:40 verbose #2582 > > inl byte_slice (s : string) : rust.ref (am'.slice u8) = 00:02:40 verbose #2583 > > !\($'"b\\\"" + !s + "\\\""') 00:02:40 verbose #2584 > > 00:02:40 verbose #2585 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:40 verbose #2586 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:40 verbose #2587 > > │ ### display │ 00:02:40 verbose #2588 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:40 verbose #2589 > > 00:02:40 verbose #2590 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:40 verbose #2591 > > nominal display t = 00:02:40 verbose #2592 > > `( 00:02:40 verbose #2593 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:02:40 verbose #2594 > > Fable.Core.Emit(\"std::fmt::Display<$0>\")>]]\n#endif\ntype std_fmt_Display<'T> 00:02:40 verbose #2595 > > = class end" 00:02:40 verbose #2596 > > $'' : $'std_fmt_Display<`t>' 00:02:40 verbose #2597 > > ) 00:02:41 verbose #2598 > > 00:02:41 verbose #2599 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:41 verbose #2600 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:41 verbose #2601 > > │ ### base64_decode_error │ 00:02:41 verbose #2602 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:41 verbose #2603 > > 00:02:41 verbose #2604 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:41 verbose #2605 > > nominal base64_decode_error = 00:02:41 verbose #2606 > > `( 00:02:41 verbose #2607 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:02:41 verbose #2608 > > Fable.Core.Emit(\"base64::DecodeError\")>]]\n#endif\ntype base64_DecodeError = 00:02:41 verbose #2609 > > class end" 00:02:41 verbose #2610 > > $'' : $'base64_DecodeError' 00:02:41 verbose #2611 > > ) 00:02:41 verbose #2612 > > 00:02:41 verbose #2613 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:41 verbose #2614 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:41 verbose #2615 > > │ ### borsh_io_error │ 00:02:41 verbose #2616 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:41 verbose #2617 > > 00:02:41 verbose #2618 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:41 verbose #2619 > > nominal borsh_io_error = 00:02:41 verbose #2620 > > `( 00:02:41 verbose #2621 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:02:41 verbose #2622 > > Fable.Core.Emit(\"borsh::io::Error\")>]]\n#endif\ntype borsh_io_Error = class 00:02:41 verbose #2623 > > end" 00:02:41 verbose #2624 > > $'' : $'borsh_io_Error' 00:02:41 verbose #2625 > > ) 00:02:42 verbose #2626 > > 00:02:42 verbose #2627 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:42 verbose #2628 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:42 verbose #2629 > > │ ### utf8_error │ 00:02:42 verbose #2630 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:42 verbose #2631 > > 00:02:42 verbose #2632 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:42 verbose #2633 > > nominal utf8_error = 00:02:42 verbose #2634 > > `( 00:02:42 verbose #2635 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:02:42 verbose #2636 > > Fable.Core.Emit(\"std::str::Utf8Error\")>]]\n#endif\ntype std_str_Utf8Error = 00:02:42 verbose #2637 > > class end" 00:02:42 verbose #2638 > > $'' : $'std_str_Utf8Error' 00:02:42 verbose #2639 > > ) 00:02:42 verbose #2640 > > 00:02:42 verbose #2641 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:42 verbose #2642 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:42 verbose #2643 > > │ ### from_utf8_error │ 00:02:42 verbose #2644 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:42 verbose #2645 > > 00:02:42 verbose #2646 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:42 verbose #2647 > > nominal from_utf8_error = 00:02:42 verbose #2648 > > `( 00:02:42 verbose #2649 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:02:42 verbose #2650 > > Fable.Core.Emit(\"std::string::FromUtf8Error\")>]]\n#endif\ntype 00:02:42 verbose #2651 > > std_string_FromUtf8Error = class end" 00:02:42 verbose #2652 > > $'' : $'std_string_FromUtf8Error' 00:02:42 verbose #2653 > > ) 00:02:43 verbose #2654 > > 00:02:43 verbose #2655 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:43 verbose #2656 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:43 verbose #2657 > > │ ### json_value │ 00:02:43 verbose #2658 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:43 verbose #2659 > > 00:02:43 verbose #2660 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:43 verbose #2661 > > nominal json_value = 00:02:43 verbose #2662 > > `( 00:02:43 verbose #2663 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:02:43 verbose #2664 > > Fable.Core.Emit(\"serde_json::Value\")>]]\n#endif\ntype serde_json_Value = class 00:02:43 verbose #2665 > > end" 00:02:43 verbose #2666 > > $'' : $'serde_json_Value' 00:02:43 verbose #2667 > > ) 00:02:43 verbose #2668 > > 00:02:43 verbose #2669 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:43 verbose #2670 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:43 verbose #2671 > > │ ### json_error │ 00:02:43 verbose #2672 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:43 verbose #2673 > > 00:02:43 verbose #2674 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:43 verbose #2675 > > nominal json_error = 00:02:43 verbose #2676 > > `( 00:02:43 verbose #2677 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:02:43 verbose #2678 > > Fable.Core.Emit(\"serde_json::Error\")>]]\n#endif\ntype serde_json_Error = class 00:02:43 verbose #2679 > > end" 00:02:43 verbose #2680 > > $'' : $'serde_json_Error' 00:02:43 verbose #2681 > > ) 00:02:43 verbose #2682 > > 00:02:43 verbose #2683 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:43 verbose #2684 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:43 verbose #2685 > > │ ### serde_wasm_bindgen_error │ 00:02:43 verbose #2686 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:43 verbose #2687 > > 00:02:43 verbose #2688 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:43 verbose #2689 > > nominal serde_wasm_bindgen_error = 00:02:43 verbose #2690 > > `( 00:02:43 verbose #2691 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:02:43 verbose #2692 > > Fable.Core.Emit(\"serde_wasm_bindgen::Error\")>]]\n#endif\ntype 00:02:43 verbose #2693 > > serde_wasm_bindgen_Error = class end" 00:02:43 verbose #2694 > > $'' : $'serde_wasm_bindgen_Error' 00:02:43 verbose #2695 > > ) 00:02:44 verbose #2696 > > 00:02:44 verbose #2697 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:44 verbose #2698 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:44 verbose #2699 > > │ ### js_string │ 00:02:44 verbose #2700 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:44 verbose #2701 > > 00:02:44 verbose #2702 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:44 verbose #2703 > > nominal js_string = 00:02:44 verbose #2704 > > `( 00:02:44 verbose #2705 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:02:44 verbose #2706 > > Fable.Core.Emit(\"js_sys::JsString\")>]]\n#endif\ntype js_sys_JsString = class 00:02:44 verbose #2707 > > end" 00:02:44 verbose #2708 > > $'' : $'js_sys_JsString' 00:02:44 verbose #2709 > > ) 00:02:44 verbose #2710 > > 00:02:44 verbose #2711 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:44 verbose #2712 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:44 verbose #2713 > > │ ### os_str │ 00:02:44 verbose #2714 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:44 verbose #2715 > > 00:02:44 verbose #2716 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:44 verbose #2717 > > nominal os_str = 00:02:44 verbose #2718 > > `( 00:02:44 verbose #2719 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:02:44 verbose #2720 > > Fable.Core.Emit(\"std::ffi::OsStr\")>]]\n#endif\ntype std_ffi_OsStr = class end" 00:02:44 verbose #2721 > > $'' : $'std_ffi_OsStr' 00:02:44 verbose #2722 > > ) 00:02:45 verbose #2723 > > 00:02:45 verbose #2724 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:45 verbose #2725 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:45 verbose #2726 > > │ ### os_string │ 00:02:45 verbose #2727 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:45 verbose #2728 > > 00:02:45 verbose #2729 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:45 verbose #2730 > > nominal os_string = 00:02:45 verbose #2731 > > `( 00:02:45 verbose #2732 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:02:45 verbose #2733 > > Fable.Core.Emit(\"std::ffi::OsString\")>]]\n#endif\ntype std_ffi_OsString = 00:02:45 verbose #2734 > > class end" 00:02:45 verbose #2735 > > $'' : $'std_ffi_OsString' 00:02:45 verbose #2736 > > ) 00:02:45 verbose #2737 > > 00:02:45 verbose #2738 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:45 verbose #2739 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:45 verbose #2740 > > │ ### raw_string_literal │ 00:02:45 verbose #2741 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:45 verbose #2742 > > 00:02:45 verbose #2743 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:45 verbose #2744 > > inl raw_string_literal (s : string) : rust.ref str = 00:02:45 verbose #2745 > > !\($'"r#\\"" + !s + "\\"#"') 00:02:46 verbose #2746 > > 00:02:46 verbose #2747 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:46 verbose #2748 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:46 verbose #2749 > > │ ### raw_string_literal_static │ 00:02:46 verbose #2750 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:46 verbose #2751 > > 00:02:46 verbose #2752 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:46 verbose #2753 > > inl raw_string_literal_static (s : string) : rust.static_ref str = 00:02:46 verbose #2754 > > !\($'"r#\\"" + !s + "\\"#"') 00:02:46 verbose #2755 > > 00:02:46 verbose #2756 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:46 verbose #2757 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:46 verbose #2758 > > │ ### (~#) │ 00:02:46 verbose #2759 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:46 verbose #2760 > > 00:02:46 verbose #2761 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:46 verbose #2762 > > inl (~#) s = 00:02:46 verbose #2763 > > s |> raw_string_literal 00:02:47 verbose #2764 > > 00:02:47 verbose #2765 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:47 verbose #2766 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:47 verbose #2767 > > │ ### (~##) │ 00:02:47 verbose #2768 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:47 verbose #2769 > > 00:02:47 verbose #2770 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:47 verbose #2771 > > inl (~##) s = 00:02:47 verbose #2772 > > s |> raw_string_literal_static 00:02:47 verbose #2773 > > 00:02:47 verbose #2774 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:47 verbose #2775 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:47 verbose #2776 > > │ ### include_str │ 00:02:47 verbose #2777 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:47 verbose #2778 > > 00:02:47 verbose #2779 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:47 verbose #2780 > > inl include_str (path : string) : rust.ref str = 00:02:47 verbose #2781 > > !\($'"include_str\!(\\\"" + !path + "\\\")"') 00:02:48 verbose #2782 > > 00:02:48 verbose #2783 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:48 verbose #2784 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:48 verbose #2785 > > │ ### as_str │ 00:02:48 verbose #2786 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:48 verbose #2787 > > 00:02:48 verbose #2788 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:48 verbose #2789 > > inl as_str (s : string) : rust.ref str = 00:02:48 verbose #2790 > > // !\\(s, $'"fable_library_rust::String_::LrcStr::as_str(&$0)"') 00:02:48 verbose #2791 > > run_target_args (fun () => s) function 00:02:48 verbose #2792 > > | Rust _ => fun s => !\\(s, $'"&*$0"') 00:02:48 verbose #2793 > > | _ => fun s => s |> unbox 00:02:48 verbose #2794 > > 00:02:48 verbose #2795 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:48 verbose #2796 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:48 verbose #2797 > > │ ### from_iter │ 00:02:48 verbose #2798 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:48 verbose #2799 > > 00:02:48 verbose #2800 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:48 verbose #2801 > > inl from_iter forall (t : * -> *). (s : t char) : std_string = 00:02:48 verbose #2802 > > !\\(s, $'"String::from_iter($0)"') 00:02:49 verbose #2803 > > 00:02:49 verbose #2804 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:49 verbose #2805 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:49 verbose #2806 > > │ ### ref_to_std_string │ 00:02:49 verbose #2807 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:49 verbose #2808 > > 00:02:49 verbose #2809 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:49 verbose #2810 > > inl ref_to_std_string (str : rust.ref str) : std_string = 00:02:49 verbose #2811 > > run_target_args (fun () => str) function 00:02:49 verbose #2812 > > | Rust _ => fun str => !\\(str, $'"String::from($0)"') 00:02:49 verbose #2813 > > | _ => fun str => str |> unbox 00:02:49 verbose #2814 > > 00:02:49 verbose #2815 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:49 verbose #2816 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:49 verbose #2817 > > │ ### cow_to_std_string │ 00:02:49 verbose #2818 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:49 verbose #2819 > > 00:02:49 verbose #2820 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:49 verbose #2821 > > inl cow_to_std_string (str : rust.cow str) : std_string = 00:02:49 verbose #2822 > > !\\(str, $'"String::from($0)"') 00:02:50 verbose #2823 > > 00:02:50 verbose #2824 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:50 verbose #2825 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:50 verbose #2826 > > │ ### to_std_string │ 00:02:50 verbose #2827 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:50 verbose #2828 > > 00:02:50 verbose #2829 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:50 verbose #2830 > > inl to_std_string (s : string) : std_string = 00:02:50 verbose #2831 > > s |> as_str |> ref_to_std_string 00:02:50 verbose #2832 > > 00:02:50 verbose #2833 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:50 verbose #2834 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:50 verbose #2835 > > │ ### as_str_std │ 00:02:50 verbose #2836 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:50 verbose #2837 > > 00:02:50 verbose #2838 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:50 verbose #2839 > > inl as_str_std (s : std_string) : rust.ref str = 00:02:50 verbose #2840 > > !\\(s, $'"$0.as_str()"') 00:02:50 verbose #2841 > > 00:02:50 verbose #2842 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:50 verbose #2843 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:50 verbose #2844 > > │ ### into_boxed_str │ 00:02:50 verbose #2845 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:50 verbose #2846 > > 00:02:50 verbose #2847 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:50 verbose #2848 > > inl into_boxed_str (s : std_string) : rust.box str = 00:02:50 verbose #2849 > > !\\(s, $'"$0.into_boxed_str()"') 00:02:51 verbose #2850 > > 00:02:51 verbose #2851 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:51 verbose #2852 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:51 verbose #2853 > > │ ### os_string_as_ref │ 00:02:51 verbose #2854 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:51 verbose #2855 > > 00:02:51 verbose #2856 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:51 verbose #2857 > > inl os_string_as_ref (s : os_string) : rust.ref os_str = 00:02:51 verbose #2858 > > !\\(s, $'"$0.as_ref()"') 00:02:51 verbose #2859 > > 00:02:51 verbose #2860 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:51 verbose #2861 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:51 verbose #2862 > > │ ### to_os_string │ 00:02:51 verbose #2863 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:51 verbose #2864 > > 00:02:51 verbose #2865 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:51 verbose #2866 > > inl to_os_string (s : rust.ref os_str) : os_string = 00:02:51 verbose #2867 > > !\\(s, $'"$0.to_os_string()"') 00:02:52 verbose #2868 > > 00:02:52 verbose #2869 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:52 verbose #2870 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:52 verbose #2871 > > │ ### os_to_str │ 00:02:52 verbose #2872 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:52 verbose #2873 > > 00:02:52 verbose #2874 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:52 verbose #2875 > > inl os_to_str (s : os_string) : optionm'.option' (rust.ref str) = 00:02:52 verbose #2876 > > !\\(s, $'"$0.to_str()"') 00:02:52 verbose #2877 > > 00:02:52 verbose #2878 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:52 verbose #2879 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:52 verbose #2880 > > │ ### from_os_str_ref │ 00:02:52 verbose #2881 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:52 verbose #2882 > > 00:02:52 verbose #2883 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:52 verbose #2884 > > inl from_os_str_ref s = 00:02:52 verbose #2885 > > s 00:02:52 verbose #2886 > > |> to_os_string 00:02:52 verbose #2887 > > |> os_to_str 00:02:52 verbose #2888 > > |> optionm'.unwrap 00:02:52 verbose #2889 > > |> ref_to_std_string 00:02:52 verbose #2890 > > |> from_std_string 00:02:53 verbose #2891 > > 00:02:53 verbose #2892 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:53 verbose #2893 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:53 verbose #2894 > > │ ### format_custom' │ 00:02:53 verbose #2895 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:53 verbose #2896 > > 00:02:53 verbose #2897 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:53 verbose #2898 > > inl format_custom' (f : string) x : std_string = 00:02:53 verbose #2899 > > run_target function 00:02:53 verbose #2900 > > | Rust _ => fun () => 00:02:53 verbose #2901 > > !\\(x, $'"format\!(\\\"" + !f + "\\\", $0)"') 00:02:53 verbose #2902 > > | _ => fun () => null () 00:02:53 verbose #2903 > > 00:02:53 verbose #2904 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:53 verbose #2905 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:53 verbose #2906 > > │ ### format_debug' │ 00:02:53 verbose #2907 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:53 verbose #2908 > > 00:02:53 verbose #2909 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:53 verbose #2910 > > inl format_debug' x : std_string = 00:02:53 verbose #2911 > > run_target function 00:02:53 verbose #2912 > > | Rust _ => fun () => 00:02:53 verbose #2913 > > !\\(x, $'"format\!(\\\"{:?}\\\", $0)"') 00:02:53 verbose #2914 > > | _ => fun () => null () 00:02:54 verbose #2915 > > 00:02:54 verbose #2916 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:54 verbose #2917 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:54 verbose #2918 > > │ ### format' │ 00:02:54 verbose #2919 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:54 verbose #2920 > > 00:02:54 verbose #2921 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:54 verbose #2922 > > inl format' x : std_string = 00:02:54 verbose #2923 > > run_target_args (fun () => x) function 00:02:54 verbose #2924 > > | Rust _ => fun x => 00:02:54 verbose #2925 > > !\\(x, $'"format\!(\\\"{}\\\", $0)"') 00:02:54 verbose #2926 > > | _ => fun _ => null () 00:02:54 verbose #2927 > > 00:02:54 verbose #2928 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:54 verbose #2929 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:54 verbose #2930 > > │ ### format_hex' │ 00:02:54 verbose #2931 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:54 verbose #2932 > > 00:02:54 verbose #2933 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:54 verbose #2934 > > inl format_hex' x : std_string = 00:02:54 verbose #2935 > > !\\(x, $'"format\!(\\\"{:02x}\\\", $0)"') 00:02:55 verbose #2936 > > 00:02:55 verbose #2937 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:55 verbose #2938 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:55 verbose #2939 > > │ ### format'' │ 00:02:55 verbose #2940 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:55 verbose #2941 > > 00:02:55 verbose #2942 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:55 verbose #2943 > > inl format'' (format : string) : std_string = 00:02:55 verbose #2944 > > !\($'@@$"format\!(" + !format + ")"') 00:02:55 verbose #2945 > > 00:02:55 verbose #2946 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:55 verbose #2947 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:55 verbose #2948 > > │ ### regex │ 00:02:55 verbose #2949 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:55 verbose #2950 > > 00:02:55 verbose #2951 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:55 verbose #2952 > > nominal regex = 00:02:55 verbose #2953 > > `( 00:02:55 verbose #2954 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:02:55 verbose #2955 > > Fable.Core.Emit(\"regex::Regex\")>]]\n#endif\ntype regex_Regex = class end" 00:02:55 verbose #2956 > > $'' : $'regex_Regex' 00:02:55 verbose #2957 > > ) 00:02:56 verbose #2958 > > 00:02:56 verbose #2959 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:56 verbose #2960 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:56 verbose #2961 > > │ ### regex_error │ 00:02:56 verbose #2962 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:56 verbose #2963 > > 00:02:56 verbose #2964 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:56 verbose #2965 > > nominal regex_error = 00:02:56 verbose #2966 > > `( 00:02:56 verbose #2967 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:02:56 verbose #2968 > > Fable.Core.Emit(\"regex::Error\")>]]\n#endif\ntype regex_Error = class end" 00:02:56 verbose #2969 > > $'' : $'regex_Error' 00:02:56 verbose #2970 > > ) 00:02:56 verbose #2971 > > 00:02:56 verbose #2972 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:56 verbose #2973 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:56 verbose #2974 > > │ ### new_regex │ 00:02:56 verbose #2975 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:56 verbose #2976 > > 00:02:56 verbose #2977 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:56 verbose #2978 > > inl new_regex (pattern : string) : resultm.result' regex regex_error = 00:02:56 verbose #2979 > > !\\(pattern, $'$"regex::Regex::new(&$0)"') 00:02:56 verbose #2980 > > 00:02:56 verbose #2981 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:56 verbose #2982 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:56 verbose #2983 > > │ ### captures │ 00:02:56 verbose #2984 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:56 verbose #2985 > > 00:02:56 verbose #2986 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:56 verbose #2987 > > nominal regex_captures t = 00:02:56 verbose #2988 > > `( 00:02:56 verbose #2989 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:02:56 verbose #2990 > > Fable.Core.Emit(\"regex::Captures<$0>\")>]]\n#endif\ntype regex_Captures<'T> = 00:02:56 verbose #2991 > > class end" 00:02:56 verbose #2992 > > $'' : $'regex_Captures<`t>' 00:02:56 verbose #2993 > > ) 00:02:57 verbose #2994 > > 00:02:57 verbose #2995 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:57 verbose #2996 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:57 verbose #2997 > > │ ### regex_capture_matches │ 00:02:57 verbose #2998 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:57 verbose #2999 > > 00:02:57 verbose #3000 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:57 verbose #3001 > > nominal regex_capture_matches = 00:02:57 verbose #3002 > > `( 00:02:57 verbose #3003 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:02:57 verbose #3004 > > Fable.Core.Emit(\"regex::CaptureMatches\")>]]\n#endif\ntype regex_CaptureMatches 00:02:57 verbose #3005 > > = class end" 00:02:57 verbose #3006 > > $'' : $'regex_CaptureMatches' 00:02:57 verbose #3007 > > ) 00:02:57 verbose #3008 > > 00:02:57 verbose #3009 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:57 verbose #3010 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:57 verbose #3011 > > │ ### regex_capture_names │ 00:02:57 verbose #3012 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:57 verbose #3013 > > 00:02:57 verbose #3014 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:57 verbose #3015 > > nominal regex_capture_names = 00:02:57 verbose #3016 > > `( 00:02:57 verbose #3017 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:02:57 verbose #3018 > > Fable.Core.Emit(\"regex::CaptureNames\")>]]\n#endif\ntype regex_CaptureNames = 00:02:57 verbose #3019 > > class end" 00:02:57 verbose #3020 > > $'' : $'regex_CaptureNames' 00:02:57 verbose #3021 > > ) 00:02:57 verbose #3022 > > 00:02:57 verbose #3023 > > inl regex_capture_names (regex : regex) : regex_capture_names = 00:02:57 verbose #3024 > > !\\(regex, $'$"$0.capture_names()"') 00:02:58 verbose #3025 > > 00:02:58 verbose #3026 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:58 verbose #3027 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:58 verbose #3028 > > │ ### match' │ 00:02:58 verbose #3029 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:58 verbose #3030 > > 00:02:58 verbose #3031 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:58 verbose #3032 > > nominal match' = 00:02:58 verbose #3033 > > `( 00:02:58 verbose #3034 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:02:58 verbose #3035 > > Fable.Core.Emit(\"regex::Match\")>]]\n#endif\ntype regex_Match = class end" 00:02:58 verbose #3036 > > $'' : $'regex_Match' 00:02:58 verbose #3037 > > ) 00:02:58 verbose #3038 > > 00:02:58 verbose #3039 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:58 verbose #3040 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:58 verbose #3041 > > │ ### regex_captures_iter │ 00:02:58 verbose #3042 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:58 verbose #3043 > > 00:02:58 verbose #3044 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:58 verbose #3045 > > inl regex_captures_iter (s : rust.static_ref (rust.mut' std_string)) (regex : 00:02:58 verbose #3046 > > regex) : regex_capture_matches = 00:02:58 verbose #3047 > > inl regex = regex |> rust.emit 00:02:58 verbose #3048 > > !\\(regex, $'$"$0.captures_iter(!s)"') 00:02:59 verbose #3049 > > 00:02:59 verbose #3050 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:02:59 verbose #3051 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:02:59 verbose #3052 > > │ ### regex_captures │ 00:02:59 verbose #3053 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:02:59 verbose #3054 > > 00:02:59 verbose #3055 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:59 verbose #3056 > > inl regex_captures (s : string) (regex : regex) : am'.vec (mapm.hash_map string 00:02:59 verbose #3057 > > string) = 00:02:59 verbose #3058 > > // inl s = join s 00:02:59 verbose #3059 > > // !\\(regex, $'$"$0.captures_iter(&*!s).map(|caps| 00:02:59 verbose #3060 > > $0.capture_names().map(|x| x.and_then(|n| Some((n, 00:02:59 verbose #3061 > > caps.name(n)?.as_str())))).flatten().collect()).collect()"') 00:02:59 verbose #3062 > > 00:02:59 verbose #3063 > > inl s = s |> to_std_string 00:02:59 verbose #3064 > > fun () => 00:02:59 verbose #3065 > > inl matches = 00:02:59 verbose #3066 > > inl s = s |> rust.new_box |> rust.box_leak 00:02:59 verbose #3067 > > regex |> regex_captures_iter s 00:02:59 verbose #3068 > > 00:02:59 verbose #3069 > > (!\($'"true; let _regex_captures : Vec<_> = !matches.map(|x| { //"') : 00:02:59 verbose #3070 > > bool) |> ignore 00:02:59 verbose #3071 > > 00:02:59 verbose #3072 > > inl fn (match' : rust.static_ref (rust.mut' (regex_captures 00:02:59 verbose #3073 > > rust.static_lifetime))) : mapm.hash_map string string = 00:02:59 verbose #3074 > > 00:02:59 verbose #3075 > > inl names = regex |> regex_capture_names 00:02:59 verbose #3076 > > 00:02:59 verbose #3077 > > (!\($'"true; let _regex_captures : std::collections::HashMap<_, _> = 00:02:59 verbose #3078 > > !names.map(|x| { //"') : bool) |> ignore 00:02:59 verbose #3079 > > 00:02:59 verbose #3080 > > inl fn (n : string) : pair string string = 00:02:59 verbose #3081 > > inl n' = n |> rust.clone 00:02:59 verbose #3082 > > 00:02:59 verbose #3083 > > new_pair n' !\\(n, $'$"!match'.name(&$0).map(|x| 00:02:59 verbose #3084 > > x.as_str()).unwrap_or(\\\"\\\").to_string().into()"') 00:02:59 verbose #3085 > > 00:02:59 verbose #3086 > > (!\\(fn !\($'"x.unwrap_or(\\\"\\\").to_string().into()"'), $'"true; 00:02:59 verbose #3087 > > $0 }).map(|x| std::sync::Arc::try_unwrap(x).unwrap_or_else(|x| 00:02:59 verbose #3088 > > (*x).clone())).collect()"') : bool) |> ignore 00:02:59 verbose #3089 > > 00:02:59 verbose #3090 > > !\($'"_regex_captures"') 00:02:59 verbose #3091 > > 00:02:59 verbose #3092 > > inl x = 00:02:59 verbose #3093 > > !\($'$"x"') 00:02:59 verbose #3094 > > |> rust.new_box 00:02:59 verbose #3095 > > |> rust.box_leak 00:02:59 verbose #3096 > > 00:02:59 verbose #3097 > > (!\\(fn x, $'"true; $0 }).collect::<Vec<_>>()"') : bool) |> ignore 00:02:59 verbose #3098 > > 00:02:59 verbose #3099 > > !\($'"_regex_captures"') 00:02:59 verbose #3100 > > 00:02:59 verbose #3101 > > |> rust.capture_move 00:02:59 verbose #3102 > > 00:02:59 verbose #3103 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:02:59 verbose #3104 > > //// test 00:02:59 verbose #3105 > > ///! rust -d regex 00:02:59 verbose #3106 > > 00:02:59 verbose #3107 > > "fable-library-ts\\.(?<a>[[\\d.]]+)$" 00:02:59 verbose #3108 > > |> new_regex 00:02:59 verbose #3109 > > |> resultm.unwrap' 00:02:59 verbose #3110 > > |> regex_captures "fable_modules/fable-library-ts.4.17.0" 00:02:59 verbose #3111 > > |> am'.vec_map (mapm.to_vec >> am'.vec_sort_by_key id) 00:02:59 verbose #3112 > > |> sm'.format_debug 00:02:59 verbose #3113 > > |> _assert_eq ( 00:02:59 verbose #3114 > > ;[[ 00:02:59 verbose #3115 > > ;[[ "", ""; "a", "4.17.0" ]] 00:02:59 verbose #3116 > > |> am'.to_vec 00:02:59 verbose #3117 > > ]] 00:02:59 verbose #3118 > > |> am'.to_vec 00:02:59 verbose #3119 > > |> sm'.format_debug 00:02:59 verbose #3120 > > ) 00:03:18 verbose #3121 > > 00:03:18 verbose #3122 > > ╭─[ 18.97s - return value ]────────────────────────────────────────────────────╮ 00:03:18 verbose #3123 > > │ __assert_eq / actual: "[[("", ""), ("a", "4.17.0")]]" / expected: "[[("", │ 00:03:18 verbose #3124 > > │ ""), ("a", "4.17.0")]]" │ 00:03:18 verbose #3125 > > │ │ 00:03:18 verbose #3126 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:18 verbose #3127 > > 00:03:18 verbose #3128 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:18 verbose #3129 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:18 verbose #3130 > > │ ### replace_regex' │ 00:03:18 verbose #3131 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:18 verbose #3132 > > 00:03:18 verbose #3133 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:18 verbose #3134 > > inl replace_regex' (pattern : string) (replacement : a i32 string) (s : string) 00:03:18 verbose #3135 > > : string = 00:03:18 verbose #3136 > > run_target_args (fun () => s, pattern, replacement) function 00:03:18 verbose #3137 > > | Rust (Native) => fun s, pattern, replacement => 00:03:18 verbose #3138 > > inl regex = pattern |> new_regex |> resultm.unwrap' 00:03:18 verbose #3139 > > !\\((regex, #s, replacement), $'$"$0.replace_all($1, &*$2)"') 00:03:18 verbose #3140 > > |> cow_to_std_string 00:03:18 verbose #3141 > > |> from_std_string 00:03:18 verbose #3142 > > | _ => fun _ => null () 00:03:19 verbose #3143 > > 00:03:19 verbose #3144 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:19 verbose #3145 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:19 verbose #3146 > > │ ### serialize │ 00:03:19 verbose #3147 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:19 verbose #3148 > > 00:03:19 verbose #3149 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:19 verbose #3150 > > inl serialize forall t. (x : t) : resultm.result' std_string json_error = 00:03:19 verbose #3151 > > !\($'"serde_json::to_string(&!x)"') 00:03:19 verbose #3152 > > 00:03:19 verbose #3153 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:19 verbose #3154 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:19 verbose #3155 > > │ ### deserialize │ 00:03:19 verbose #3156 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:19 verbose #3157 > > 00:03:19 verbose #3158 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:19 verbose #3159 > > inl deserialize forall t. (json : string) : resultm.result' t std_string = 00:03:19 verbose #3160 > > inl json = join json 00:03:19 verbose #3161 > > inl json = json |> as_str 00:03:19 verbose #3162 > > !\\(json, $'"serde_json::from_str(&$0)"') 00:03:19 verbose #3163 > > |> resultm.map_error' fun (x : json_error) => x |> format' 00:03:19 verbose #3164 > > 00:03:19 verbose #3165 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:19 verbose #3166 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:19 verbose #3167 > > │ ### borsh_deserialize │ 00:03:19 verbose #3168 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:19 verbose #3169 > > 00:03:19 verbose #3170 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:19 verbose #3171 > > inl borsh_deserialize forall t. (data : array_base u8) : resultm.result' t 00:03:19 verbose #3172 > > std_string = 00:03:19 verbose #3173 > > inl data = data |> am'.as_slice 00:03:19 verbose #3174 > > (!\($'"true; let mut !data = !data"') : bool) |> ignore 00:03:19 verbose #3175 > > inl result = !\($'"borsh::BorshDeserialize::deserialize(&mut !data)"') 00:03:19 verbose #3176 > > result 00:03:19 verbose #3177 > > |> resultm.map_error' fun (x : borsh_io_error) => x |> format' 00:03:20 verbose #3178 > > 00:03:20 verbose #3179 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:20 verbose #3180 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:20 verbose #3181 > > │ ### deserialize_vec │ 00:03:20 verbose #3182 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:20 verbose #3183 > > 00:03:20 verbose #3184 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:20 verbose #3185 > > inl deserialize_vec (value : json_value) : resultm.result' (am'.vec u8) 00:03:20 verbose #3186 > > std_string = 00:03:20 verbose #3187 > > inl value = join value 00:03:20 verbose #3188 > > !\($'"serde_json::from_value(!value)"') 00:03:20 verbose #3189 > > |> resultm.map_error' fun (x : json_error) => x |> format' 00:03:20 verbose #3190 > > 00:03:20 verbose #3191 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:20 verbose #3192 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:20 verbose #3193 > > │ ### encode_uri_component │ 00:03:20 verbose #3194 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:20 verbose #3195 > > 00:03:20 verbose #3196 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:20 verbose #3197 > > inl encode_uri_component (s : std_string) : js_string = 00:03:20 verbose #3198 > > !\($'"js_sys::encode_uri_component(&!s)"') 00:03:21 verbose #3199 > > 00:03:21 verbose #3200 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:21 verbose #3201 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:21 verbose #3202 > > │ ### strip_prefix │ 00:03:21 verbose #3203 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:21 verbose #3204 > > 00:03:21 verbose #3205 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:21 verbose #3206 > > inl strip_prefix (prefix : char) (s : std_string) : optionm'.option' (rust.ref 00:03:21 verbose #3207 > > str) = 00:03:21 verbose #3208 > > inl s = join s 00:03:21 verbose #3209 > > !\($'"!s.strip_prefix(!prefix)"') 00:03:21 verbose #3210 > > 00:03:21 verbose #3211 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:21 verbose #3212 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:21 verbose #3213 > > │ ### str_from_utf8 │ 00:03:21 verbose #3214 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:21 verbose #3215 > > 00:03:21 verbose #3216 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:21 verbose #3217 > > inl str_from_utf8 (bytes : rust.ref (am'.slice u8)) : resultm.result' (rust.ref 00:03:21 verbose #3218 > > str) utf8_error = 00:03:21 verbose #3219 > > !\\(bytes, $'"std::str::from_utf8($0)"') 00:03:22 verbose #3220 > > 00:03:22 verbose #3221 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:22 verbose #3222 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:22 verbose #3223 > > │ ### string_from_utf8 │ 00:03:22 verbose #3224 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:22 verbose #3225 > > 00:03:22 verbose #3226 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:22 verbose #3227 > > inl string_from_utf8 (bytes : am'.vec u8) : resultm.result' std_string 00:03:22 verbose #3228 > > from_utf8_error = 00:03:22 verbose #3229 > > inl bytes = join bytes 00:03:22 verbose #3230 > > !\\(bytes, $'"std::string::String::from_utf8($0)"') 00:03:22 verbose #3231 > > 00:03:22 verbose #3232 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:22 verbose #3233 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:22 verbose #3234 > > │ ### base64_decode │ 00:03:22 verbose #3235 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:22 verbose #3236 > > 00:03:22 verbose #3237 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:22 verbose #3238 > > inl base64_decode (s : std_string) : result std_string std_string = 00:03:22 verbose #3239 > > fun () => 00:03:22 verbose #3240 > > inl s = join s 00:03:22 verbose #3241 > > inl bytes : resultm.result' (am'.vec u8) base64_decode_error = 00:03:22 verbose #3242 > > 00:03:22 verbose #3243 > > !\($'"base64::Engine::decode(&base64::engine::general_purpose::STANDARD, !s)"') 00:03:22 verbose #3244 > > bytes 00:03:22 verbose #3245 > > |> resultm.map_error' format' 00:03:22 verbose #3246 > > |> resultm.try' 00:03:22 verbose #3247 > > |> string_from_utf8 00:03:22 verbose #3248 > > |> resultm.map_error' format' 00:03:22 verbose #3249 > > |> fun x => 00:03:22 verbose #3250 > > join x () 00:03:22 verbose #3251 > > |> resultm.unbox 00:03:23 verbose #3252 > > 00:03:23 verbose #3253 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:23 verbose #3254 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:23 verbose #3255 > > │ ### encoding' │ 00:03:23 verbose #3256 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:23 verbose #3257 > > 00:03:23 verbose #3258 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:23 verbose #3259 > > nominal encoding' = 00:03:23 verbose #3260 > > `( 00:03:23 verbose #3261 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:03:23 verbose #3262 > > Fable.Core.Emit(\"encoding_rs::Encoding\")>]]\n#endif\ntype encoding_rs_Encoding 00:03:23 verbose #3263 > > = class end" 00:03:23 verbose #3264 > > $'' : $'encoding_rs_Encoding' 00:03:23 verbose #3265 > > ) 00:03:23 verbose #3266 > > 00:03:23 verbose #3267 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:23 verbose #3268 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:23 verbose #3269 > > │ ### encoding_utf8' │ 00:03:23 verbose #3270 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:23 verbose #3271 > > 00:03:23 verbose #3272 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:23 verbose #3273 > > inl encoding_utf8' () : rust.ref encoding' = 00:03:23 verbose #3274 > > !\($'"encoding_rs::UTF_8"') 00:03:24 verbose #3275 > > 00:03:24 verbose #3276 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:24 verbose #3277 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:24 verbose #3278 > > │ ### encoding_1252 │ 00:03:24 verbose #3279 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:24 verbose #3280 > > 00:03:24 verbose #3281 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:24 verbose #3282 > > inl encoding_1252' () : rust.ref encoding' = 00:03:24 verbose #3283 > > !\($'"encoding_rs::WINDOWS_1252"') 00:03:24 verbose #3284 > > 00:03:24 verbose #3285 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:24 verbose #3286 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:24 verbose #3287 > > │ ### encoding_encode │ 00:03:24 verbose #3288 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:24 verbose #3289 > > 00:03:24 verbose #3290 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:24 verbose #3291 > > inl encoding_encode' (encoding : rust.ref encoding') (text : string) : rust.cow 00:03:24 verbose #3292 > > (am'.slice u8) = 00:03:24 verbose #3293 > > !\\((encoding, text), $'"$0.encode(&*$1).0"') 00:03:25 verbose #3294 > > 00:03:25 verbose #3295 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:25 verbose #3296 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:25 verbose #3297 > > │ ### utf8_decode │ 00:03:25 verbose #3298 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:25 verbose #3299 > > 00:03:25 verbose #3300 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:25 verbose #3301 > > inl utf8_decode (data : am'.vec u8) : resultm.result' std_string (rust.cow str) 00:03:25 verbose #3302 > > = 00:03:25 verbose #3303 > > !\($'$"encoding::Encoding::decode(encoding::all::UTF_8, &!data, 00:03:25 verbose #3304 > > encoding::DecoderTrap::Replace)"') 00:03:25 verbose #3305 > > 00:03:25 verbose #3306 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:25 verbose #3307 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:25 verbose #3308 > > │ ### windows │ 00:03:25 verbose #3309 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:25 verbose #3310 > > 00:03:25 verbose #3311 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:25 verbose #3312 > > nominal windows t = 00:03:25 verbose #3313 > > `( 00:03:25 verbose #3314 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:03:25 verbose #3315 > > Fable.Core.Emit(\"std::slice::Windows<$0>\")>]]\n#endif\ntype 00:03:25 verbose #3316 > > std_slice_Windows<'T> = class end" 00:03:25 verbose #3317 > > $'' : $'std_slice_Windows<`t>' 00:03:25 verbose #3318 > > ) 00:03:25 verbose #3319 > > 00:03:25 verbose #3320 > > inl windows (len : unativeint) (source : am'.vec u8) : windows u8 = 00:03:25 verbose #3321 > > inl source = source |> rust.new_box |> rust.box_leak 00:03:25 verbose #3322 > > // inl source' = source |> rust.clone 00:03:25 verbose #3323 > > inl result = !\\(len, $'"<[[_]]>::windows(!source, $0)"') 00:03:25 verbose #3324 > > // source |> rust.drop 00:03:25 verbose #3325 > > result 00:03:26 verbose #3326 > > 00:03:26 verbose #3327 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:26 verbose #3328 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:26 verbose #3329 > > │ ### any │ 00:03:26 verbose #3330 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:26 verbose #3331 > > 00:03:26 verbose #3332 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:26 verbose #3333 > > inl any forall t. (fn : string -> bool) (source : windows t) : bool = 00:03:26 verbose #3334 > > (!\($'"true; let mut !source = !source"') : bool) |> ignore 00:03:26 verbose #3335 > > inl fn' x = 00:03:26 verbose #3336 > > x 00:03:26 verbose #3337 > > |> str_from_utf8 00:03:26 verbose #3338 > > |> resultm.unwrap_or' #"" 00:03:26 verbose #3339 > > |> ref_to_std_string 00:03:26 verbose #3340 > > |> from_std_string 00:03:26 verbose #3341 > > |> fn 00:03:26 verbose #3342 > > !\\(fn', $'"!source.any(move |x| $0(x))"') 00:03:26 verbose #3343 > > 00:03:26 verbose #3344 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:26 verbose #3345 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:26 verbose #3346 > > │ ### slice_contains │ 00:03:26 verbose #3347 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:26 verbose #3348 > > 00:03:26 verbose #3349 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:26 verbose #3350 > > inl slice_contains (text : string) (source : am'.vec u8) : bool = 00:03:26 verbose #3351 > > fun () => 00:03:26 verbose #3352 > > inl source = join source 00:03:26 verbose #3353 > > source 00:03:26 verbose #3354 > > |> windows (text |> length |> (fun x => x : i32) |> convert) 00:03:26 verbose #3355 > > |> any ((=.) text) 00:03:26 verbose #3356 > > |> fun x => join x () 00:03:27 verbose #3357 > > 00:03:27 verbose #3358 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:27 verbose #3359 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:27 verbose #3360 > > │ ### as_bytes │ 00:03:27 verbose #3361 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:27 verbose #3362 > > 00:03:27 verbose #3363 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:27 verbose #3364 > > inl as_bytes (text : string) : rust.ref (am'.slice u8) = 00:03:27 verbose #3365 > > inl text = join text 00:03:27 verbose #3366 > > !\($'"!text.as_bytes()"') 00:03:27 verbose #3367 > > 00:03:27 verbose #3368 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:27 verbose #3369 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:27 verbose #3370 > > │ ### into_bytes │ 00:03:27 verbose #3371 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:27 verbose #3372 > > 00:03:27 verbose #3373 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:27 verbose #3374 > > inl into_bytes (x : std_string) : am'.vec u8 = 00:03:27 verbose #3375 > > !\\(x, $'$"$0.into_bytes()"') 00:03:28 verbose #3376 > > 00:03:28 verbose #3377 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:28 verbose #3378 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:28 verbose #3379 > > │ ## python │ 00:03:28 verbose #3380 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:28 verbose #3381 > > 00:03:28 verbose #3382 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:28 verbose #3383 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:28 verbose #3384 > > │ ### encode_utf8 │ 00:03:28 verbose #3385 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:28 verbose #3386 > > 00:03:28 verbose #3387 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:28 verbose #3388 > > inl encode_utf8 (s : string) : string = 00:03:28 verbose #3389 > > inl encoding = "utf-8" 00:03:28 verbose #3390 > > backend_switch { 00:03:28 verbose #3391 > > Fsharp = fun () => 00:03:28 verbose #3392 > > open python_operators 00:03:28 verbose #3393 > > !\\((s, encoding), $'"$0.encode($1)"') : string 00:03:28 verbose #3394 > > Python = fun () => 00:03:28 verbose #3395 > > $'!s.encode(!encoding)' : string 00:03:28 verbose #3396 > > } 00:03:28 verbose #3397 > > 00:03:28 verbose #3398 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:28 verbose #3399 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:28 verbose #3400 > > │ ## sm' │ 00:03:28 verbose #3401 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:28 verbose #3402 > > 00:03:28 verbose #3403 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:28 verbose #3404 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:28 verbose #3405 > > │ ### contains │ 00:03:28 verbose #3406 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:28 verbose #3407 > > 00:03:28 verbose #3408 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:28 verbose #3409 > > inl contains (value : string) (s : string) : bool = 00:03:28 verbose #3410 > > backend_switch { 00:03:28 verbose #3411 > > Fsharp = fun () => $'!s.Contains !value ' : bool 00:03:28 verbose #3412 > > Python = fun () => $'!value in !s ' : bool 00:03:28 verbose #3413 > > } 00:03:29 verbose #3414 > > 00:03:29 verbose #3415 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:29 verbose #3416 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:29 verbose #3417 > > │ ### to_string result t u │ 00:03:29 verbose #3418 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:29 verbose #3419 > > 00:03:29 verbose #3420 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:29 verbose #3421 > > instance to_string result t u = fun x => 00:03:29 verbose #3422 > > real 00:03:29 verbose #3423 > > open rust 00:03:29 verbose #3424 > > typecase (t * u) with 00:03:29 verbose #3425 > > | string * string => 00:03:29 verbose #3426 > > match x with 00:03:29 verbose #3427 > > | Ok x => x 00:03:29 verbose #3428 > > | Error x => $'"sm\'.to_string result / Error: " + !x + ""' : string 00:03:29 verbose #3429 > > | std_string * std_string => 00:03:29 verbose #3430 > > match x with 00:03:29 verbose #3431 > > | Ok x => from_std_string x 00:03:29 verbose #3432 > > | Error x => $'"sm\'.to_string result / Error: " + string !x + ""' : 00:03:29 verbose #3433 > > string 00:03:29 verbose #3434 > > | _ => obj_to_string `u x 00:03:29 verbose #3435 > > 00:03:29 verbose #3436 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:29 verbose #3437 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:29 verbose #3438 > > │ ### format_exception │ 00:03:29 verbose #3439 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:29 verbose #3440 > > 00:03:29 verbose #3441 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:29 verbose #3442 > > inl format_exception (ex : exn) : string = 00:03:29 verbose #3443 > > run_target function 00:03:29 verbose #3444 > > | Fsharp (Native) => fun () => $'$"{!ex.GetType ()}: {!ex.Message}"' 00:03:29 verbose #3445 > > | _ => fun () => ex |> format_debug 00:03:30 verbose #3446 > > 00:03:30 verbose #3447 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:30 verbose #3448 > > //// test 00:03:30 verbose #3449 > > ///! fsharp 00:03:30 verbose #3450 > > ///! rust 00:03:30 verbose #3451 > > ///! typescript 00:03:30 verbose #3452 > > ///! python 00:03:30 verbose #3453 > > 00:03:30 verbose #3454 > > fun () => failwith "test" 00:03:30 verbose #3455 > > |> _throws 00:03:30 verbose #3456 > > |> optionm.value 00:03:30 verbose #3457 > > |> sm'.format_exception 00:03:30 verbose #3458 > > |> _assert_eq (run_target function 00:03:30 verbose #3459 > > | Fsharp _ => fun () => "System.Exception: test" 00:03:30 verbose #3460 > > | Rust _ => fun () => "Exception { message: \"test\" }" 00:03:30 verbose #3461 > > | TypeScript _ => fun () => "Error: test" 00:03:30 verbose #3462 > > | Python _ => fun () => "test" 00:03:30 verbose #3463 > > | _ => fun () => null () 00:03:30 verbose #3464 > > ) 00:03:53 verbose #3465 > > 00:03:53 verbose #3466 > > ╭─[ 23.83s - return value ]────────────────────────────────────────────────────╮ 00:03:53 verbose #3467 > > │ .rs output: │ 00:03:53 verbose #3468 > > │ __assert_eq / actual: "Exception { message: "test" }" / expected: "Exception │ 00:03:53 verbose #3469 > > │ { message: "test" }" │ 00:03:53 verbose #3470 > > │ │ 00:03:53 verbose #3471 > > │ .ts output: │ 00:03:53 verbose #3472 > > │ __assert_eq / actual: Error: test / expected: Error: test │ 00:03:53 verbose #3473 > > │ │ 00:03:53 verbose #3474 > > │ .py output: │ 00:03:53 verbose #3475 > > │ __assert_eq / actual: test / expected: test │ 00:03:53 verbose #3476 > > │ │ 00:03:53 verbose #3477 > > │ │ 00:03:53 verbose #3478 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:53 verbose #3479 > > 00:03:53 verbose #3480 > > ╭─[ 23.83s - stdout ]──────────────────────────────────────────────────────────╮ 00:03:53 verbose #3481 > > │ .fsx output: │ 00:03:53 verbose #3482 > > │ __assert_eq / actual: "System.Exception: test" / expected: │ 00:03:53 verbose #3483 > > │ "System.Exception: test" │ 00:03:53 verbose #3484 > > │ │ 00:03:53 verbose #3485 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:53 verbose #3486 > > 00:03:53 verbose #3487 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:53 verbose #3488 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:53 verbose #3489 > > │ ### range │ 00:03:53 verbose #3490 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:53 verbose #3491 > > 00:03:53 verbose #3492 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:53 verbose #3493 > > inl range forall t. (start : am'.range t) (end : am'.range t) s = 00:03:53 verbose #3494 > > inl start, end = 00:03:53 verbose #3495 > > match start, end with 00:03:53 verbose #3496 > > | Start start, End fn => 00:03:53 verbose #3497 > > start, s |> length' |> fn 00:03:53 verbose #3498 > > | End start_fn, End end_fn => 00:03:53 verbose #3499 > > inl len = s |> length' 00:03:53 verbose #3500 > > start_fn len, end_fn len 00:03:53 verbose #3501 > > s |> slice (start |> i32) (end |> i32) 00:03:54 verbose #3502 > > 00:03:54 verbose #3503 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:54 verbose #3504 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:54 verbose #3505 > > │ ### concat_list │ 00:03:54 verbose #3506 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:54 verbose #3507 > > 00:03:54 verbose #3508 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:54 verbose #3509 > > inl concat_list s list = 00:03:54 verbose #3510 > > list 00:03:54 verbose #3511 > > |> listm'.box 00:03:54 verbose #3512 > > |> seq.of_list' 00:03:54 verbose #3513 > > |> concat s 00:03:55 verbose #3514 > > 00:03:55 verbose #3515 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:55 verbose #3516 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:55 verbose #3517 > > │ ### ellipsis_end │ 00:03:55 verbose #3518 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:55 verbose #3519 > > 00:03:55 verbose #3520 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:55 verbose #3521 > > let ellipsis_end (max : i64) (s : string) = 00:03:55 verbose #3522 > > inl len = sm.length s 00:03:55 verbose #3523 > > if len <= max 00:03:55 verbose #3524 > > then s 00:03:55 verbose #3525 > > else 00:03:55 verbose #3526 > > inl half = f64 max / 2 00:03:55 verbose #3527 > > inl start_half = half |> math.ceil |> i64 00:03:55 verbose #3528 > > inl end_half = half |> math.floor |> i64 00:03:55 verbose #3529 > > inl start = s |> slice 0 (start_half - 1) 00:03:55 verbose #3530 > > inl end = s |> slice (len - end_half) (len - 1) 00:03:55 verbose #3531 > > (a ;[[start; "..."; end]] : _ i32 _) 00:03:55 verbose #3532 > > |> seq.of_array 00:03:55 verbose #3533 > > |> concat "" 00:03:55 verbose #3534 > > 00:03:55 verbose #3535 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:55 verbose #3536 > > //// test 00:03:55 verbose #3537 > > 00:03:55 verbose #3538 > > "12345" 00:03:55 verbose #3539 > > |> ellipsis_end 2 00:03:55 verbose #3540 > > |> _assert_eq "1...5" 00:03:55 verbose #3541 > > 00:03:55 verbose #3542 > > "12345" 00:03:55 verbose #3543 > > |> ellipsis_end 3 00:03:55 verbose #3544 > > |> _assert_eq "12...5" 00:03:55 verbose #3545 > > 00:03:55 verbose #3546 > > "1234567" 00:03:55 verbose #3547 > > |> ellipsis_end 4 00:03:55 verbose #3548 > > |> _assert_eq "12...67" 00:03:56 verbose #3549 > > 00:03:56 verbose #3550 > > ╭─[ 571.91ms - stdout ]────────────────────────────────────────────────────────╮ 00:03:56 verbose #3551 > > │ __assert_eq / actual: "1...5" / expected: "1...5" │ 00:03:56 verbose #3552 > > │ __assert_eq / actual: "12...5" / expected: "12...5" │ 00:03:56 verbose #3553 > > │ __assert_eq / actual: "12...67" / expected: "12...67" │ 00:03:56 verbose #3554 > > │ │ 00:03:56 verbose #3555 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:56 verbose #3556 > > 00:03:56 verbose #3557 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:56 verbose #3558 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:56 verbose #3559 > > │ ### format_ellipsis │ 00:03:56 verbose #3560 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:56 verbose #3561 > > 00:03:56 verbose #3562 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:56 verbose #3563 > > inl format_ellipsis s = 00:03:56 verbose #3564 > > s 00:03:56 verbose #3565 > > |> format_debug 00:03:56 verbose #3566 > > |> ellipsis_end 400 00:03:56 verbose #3567 > > 00:03:56 verbose #3568 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:03:56 verbose #3569 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:03:56 verbose #3570 > > │ ### replace_regex │ 00:03:56 verbose #3571 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:03:56 verbose #3572 > > 00:03:56 verbose #3573 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:56 verbose #3574 > > inl replace_regex (pattern : string) (replacement : string) (s : string) : 00:03:56 verbose #3575 > > string = 00:03:56 verbose #3576 > > run_target_args (fun () => s, pattern, replacement) function 00:03:56 verbose #3577 > > | Fsharp (Native) => fun s, pattern, replacement => 00:03:56 verbose #3578 > > $'System.Text.RegularExpressions.Regex.Replace (!s, !pattern, 00:03:56 verbose #3579 > > !replacement)' 00:03:56 verbose #3580 > > | Rust (Native) => fun s, pattern, replacement => 00:03:56 verbose #3581 > > inl regex = pattern |> new_regex |> resultm.unwrap' 00:03:56 verbose #3582 > > inl s = join s 00:03:56 verbose #3583 > > !\\((regex, s, replacement), $'$"$0.replace_all(&*$1, &*$2)"') 00:03:56 verbose #3584 > > |> cow_to_std_string 00:03:56 verbose #3585 > > |> from_std_string 00:03:56 verbose #3586 > > | _ => fun _ => null () 00:03:57 verbose #3587 > > 00:03:57 verbose #3588 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:03:57 verbose #3589 > > //// test 00:03:57 verbose #3590 > > ///! fsharp 00:03:57 verbose #3591 > > ///! rust -d regex 00:03:57 verbose #3592 > > 00:03:57 verbose #3593 > > " 123" 00:03:57 verbose #3594 > > |> replace_regex "\\s\\w2" "" 00:03:57 verbose #3595 > > |> _assert_eq "3" 00:04:14 verbose #3596 > > 00:04:14 verbose #3597 > > ╭─[ 17.18s - return value ]────────────────────────────────────────────────────╮ 00:04:14 verbose #3598 > > │ .rs output (rust -d regex): │ 00:04:14 verbose #3599 > > │ __assert_eq / actual: "3" / expected: "3" │ 00:04:14 verbose #3600 > > │ │ 00:04:14 verbose #3601 > > │ │ 00:04:14 verbose #3602 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:14 verbose #3603 > > 00:04:14 verbose #3604 > > ╭─[ 17.18s - stdout ]──────────────────────────────────────────────────────────╮ 00:04:14 verbose #3605 > > │ .fsx output: │ 00:04:14 verbose #3606 > > │ __assert_eq / actual: "3" / expected: "3" │ 00:04:14 verbose #3607 > > │ │ 00:04:14 verbose #3608 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:14 verbose #3609 > > 00:04:14 verbose #3610 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:14 verbose #3611 > > //// test 00:04:14 verbose #3612 > > ///! rust -d regex 00:04:14 verbose #3613 > > 00:04:14 verbose #3614 > > " let main args =\n ()\n" 00:04:14 verbose #3615 > > |> replace_regex $'@@"(?P<a> *)(?P<b>let\\s+main\\s+.*?\\s*=)"' 00:04:14 verbose #3616 > > "$a[[<EntryPoint>]]\n$a$b" 00:04:14 verbose #3617 > > |> _assert_eq " [[<EntryPoint>]]\n let main args =\n ()\n" 00:04:34 verbose #3618 > > 00:04:34 verbose #3619 > > ╭─[ 20.15s - return value ]────────────────────────────────────────────────────╮ 00:04:34 verbose #3620 > > │ __assert_eq / actual: " [<EntryPoint>] │ 00:04:34 verbose #3621 > > │ let main args = │ 00:04:34 verbose #3622 > > │ () │ 00:04:34 verbose #3623 > > │ " / expected: " [<EntryPoint>] │ 00:04:34 verbose #3624 > > │ let main args = │ 00:04:34 verbose #3625 > > │ () │ 00:04:34 verbose #3626 > > │ " │ 00:04:34 verbose #3627 > > │ │ 00:04:34 verbose #3628 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:34 verbose #3629 > > 00:04:34 verbose #3630 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:34 verbose #3631 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:34 verbose #3632 > > │ ## main │ 00:04:34 verbose #3633 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:34 verbose #3634 > > 00:04:34 verbose #3635 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:34 verbose #3636 > > inl main () = 00:04:34 verbose #3637 > > $'let contains x = !contains x' : () 00:04:34 verbose #3638 > > $'let ends_with x = !ends_with x' : () 00:04:34 verbose #3639 > > $'let pad_left x = !pad_left x' : () 00:04:34 verbose #3640 > > $'let pad_right x = !pad_right x' : () 00:04:34 verbose #3641 > > $'let replace x = !replace x' : () 00:04:34 verbose #3642 > > $'let replace_regex x = !replace_regex x' : () 00:04:34 verbose #3643 > > inl slice (a : i32) (b : i32) c = slice a b c 00:04:34 verbose #3644 > > $'let slice x = !slice x' : () 00:04:34 verbose #3645 > > $'let split x = !split x' : () 00:04:34 verbose #3646 > > $'let split_string x = !split_string x' : () 00:04:34 verbose #3647 > > $'let starts_with x = !starts_with x' : () 00:04:34 verbose #3648 > > $'let substring x = !substring x' : () 00:04:34 verbose #3649 > > $'let to_lower x = !to_lower x' : () 00:04:34 verbose #3650 > > $'let to_upper x = !to_upper x' : () 00:04:34 verbose #3651 > > $'let trim x = !trim x' : () 00:04:34 verbose #3652 > > inl trim_end x = (a x : _ int _) |> am'.to_list' |> listm'.unbox |> trim_end 00:04:34 verbose #3653 > > $'let trim_end x = !trim_end x' : () 00:04:34 verbose #3654 > > inl trim_start x = (a x : _ int _) |> am'.to_list' |> listm'.unbox |> 00:04:34 verbose #3655 > > trim_start 00:04:34 verbose #3656 > > $'let trim_start x = !trim_start x' : () 00:04:34 verbose #3657 > > $'let ellipsis x = !ellipsis x' : () 00:04:34 verbose #3658 > > $'let ellipsis_end x = !ellipsis_end x' : () 00:04:34 verbose #3659 > > $'let format_exception x = !format_exception x' : () 00:04:34 verbose #3660 > > $'let concat_array_trailing x = !concat_array_trailing x' : () 00:04:34 verbose #3661 > > inl concat a (b : seq.seq' string) = concat a b 00:04:34 verbose #3662 > > $'let concat x = !concat x' : () 00:04:34 verbose #3663 > > $'let join\' x = !join' x' : () 00:04:34 verbose #3664 > > $'let to_char_array x = !to_char_array x' : () 00:04:35 verbose #3665 > > 00:04:35 verbose #3666 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:35 verbose #3667 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:35 verbose #3668 > > │ ## rust │ 00:04:35 verbose #3669 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:35 verbose #3670 > > 00:04:35 verbose #3671 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:35 verbose #3672 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:35 verbose #3673 > > │ ### to_string std_string │ 00:04:35 verbose #3674 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:35 verbose #3675 > > 00:04:35 verbose #3676 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:35 verbose #3677 > > open rust 00:04:35 verbose #3678 > > instance to_string std_string = from_std_string 00:04:36 verbose #3679 > 00:03:22 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 96608 } 00:04:36 verbose #3680 > 00:03:22 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:04:36 verbose #3681 > "nbconvert", 00:04:36 verbose #3682 > "c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb", 00:04:36 verbose #3683 > "--to", 00:04:36 verbose #3684 > "html", 00:04:36 verbose #3685 > "--HTMLExporter.theme=dark", 00:04:36 verbose #3686 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:04:38 verbose #3687 > 00:03:24 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb to html 00:04:38 verbose #3688 > 00:03:24 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:04:38 verbose #3689 > 00:03:24 verbose #7 ! validate(nb) 00:04:41 verbose #3690 > 00:03:28 verbose #8 ! [NbConvertApp] Writing 579758 bytes to c:\home\git\polyglot\lib\spiral\sm'.dib.html 00:04:41 verbose #3691 > 00:03:28 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 637 } 00:04:41 verbose #3692 > 00:03:28 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 637 } 00:04:41 verbose #3693 > 00:03:28 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:04:41 verbose #3694 > "-c", 00:04:41 verbose #3695 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/sm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:04:41 verbose #3696 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/sm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:04:42 verbose #3697 > 00:03:28 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:04:42 verbose #3698 > 00:03:28 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:04:42 verbose #3699 > 00:03:28 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 97304 } 00:04:42 debug #3700 runtime.execute_with_options_async / { exit_code = 0; output_length = 103993 } 00:04:42 debug #2 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path sm'.dib --retries 3 00:04:42 debug #3701 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path rust/rust.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:04:42 verbose #3702 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "rust/rust.dib", "--retries", "3"])) } 00:04:42 verbose #3703 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:04:42 verbose #3704 > "repl", 00:04:42 verbose #3705 > "--exit-after-run", 00:04:42 verbose #3706 > "--run", 00:04:42 verbose #3707 > "c:/home/git/polyglot/lib/spiral/rust/rust.dib", 00:04:42 verbose #3708 > "--output-path", 00:04:42 verbose #3709 > "c:/home/git/polyglot/lib/spiral/rust/rust.dib.ipynb", 00:04:42 verbose #3710 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/rust/rust.dib" --output-path "c:/home/git/polyglot/lib/spiral/rust/rust.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:04:44 verbose #3711 > > 00:04:44 verbose #3712 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:44 verbose #3713 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:44 verbose #3714 > > │ # rust │ 00:04:44 verbose #3715 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:48 verbose #3716 > > 00:04:48 verbose #3717 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:48 verbose #3718 > > //// test 00:04:48 verbose #3719 > > 00:04:48 verbose #3720 > > open testing 00:04:49 verbose #3721 > > 00:04:49 verbose #3722 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:49 verbose #3723 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:49 verbose #3724 > > │ ## rust │ 00:04:49 verbose #3725 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:49 verbose #3726 > > 00:04:49 verbose #3727 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:49 verbose #3728 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:49 verbose #3729 > > │ ### any │ 00:04:49 verbose #3730 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:49 verbose #3731 > > 00:04:49 verbose #3732 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:49 verbose #3733 > > nominal any = 00:04:49 verbose #3734 > > `( 00:04:49 verbose #3735 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:04:49 verbose #3736 > > Fable.Core.Emit(\"core::any::Any\")>]]\n#endif\ntype core_any_Any = class end" 00:04:49 verbose #3737 > > $'' : $'core_any_Any' 00:04:49 verbose #3738 > > ) 00:04:49 verbose #3739 > > 00:04:49 verbose #3740 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:49 verbose #3741 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:49 verbose #3742 > > │ ### try │ 00:04:49 verbose #3743 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:49 verbose #3744 > > 00:04:49 verbose #3745 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:49 verbose #3746 > > nominal try t = 00:04:49 verbose #3747 > > `( 00:04:49 verbose #3748 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:04:49 verbose #3749 > > Fable.Core.Emit(\"_\")>]]\n#endif\ntype core_ops_Try<'T> = class end" 00:04:49 verbose #3750 > > $'' : $'core_ops_Try<`t>' 00:04:49 verbose #3751 > > ) 00:04:50 verbose #3752 > > 00:04:50 verbose #3753 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:50 verbose #3754 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:50 verbose #3755 > > │ ### cow │ 00:04:50 verbose #3756 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:50 verbose #3757 > > 00:04:50 verbose #3758 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:50 verbose #3759 > > nominal cow t = 00:04:50 verbose #3760 > > `( 00:04:50 verbose #3761 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:04:50 verbose #3762 > > Fable.Core.Emit(\"std::borrow::Cow<$0>\")>]]\n#endif\ntype std_borrow_Cow<'T> = 00:04:50 verbose #3763 > > class end" 00:04:50 verbose #3764 > > $'' : $'std_borrow_Cow<`t>' 00:04:50 verbose #3765 > > ) 00:04:50 verbose #3766 > > 00:04:50 verbose #3767 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:50 verbose #3768 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:50 verbose #3769 > > │ ### ref_cell │ 00:04:50 verbose #3770 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:50 verbose #3771 > > 00:04:50 verbose #3772 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:50 verbose #3773 > > nominal ref_cell t = 00:04:50 verbose #3774 > > `( 00:04:50 verbose #3775 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:04:50 verbose #3776 > > Fable.Core.Emit(\"std::cell::RefCell<$0>\")>]]\n#endif\ntype 00:04:50 verbose #3777 > > std_cell_RefCell<'T> = class end" 00:04:50 verbose #3778 > > $'' : $'std_cell_RefCell<`t>' 00:04:50 verbose #3779 > > ) 00:04:51 verbose #3780 > > 00:04:51 verbose #3781 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:51 verbose #3782 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:51 verbose #3783 > > │ ### rc │ 00:04:51 verbose #3784 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:51 verbose #3785 > > 00:04:51 verbose #3786 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:51 verbose #3787 > > nominal rc t = 00:04:51 verbose #3788 > > `( 00:04:51 verbose #3789 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:04:51 verbose #3790 > > Fable.Core.Emit(\"std::rc::Rc<$0>\")>]]\n#endif\ntype std_rc_Rc<'T> = class end" 00:04:51 verbose #3791 > > $'' : $'std_rc_Rc<`t>' 00:04:51 verbose #3792 > > ) 00:04:51 verbose #3793 > > 00:04:51 verbose #3794 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:51 verbose #3795 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:51 verbose #3796 > > │ ### lifetime_ref │ 00:04:51 verbose #3797 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:51 verbose #3798 > > 00:04:51 verbose #3799 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:51 verbose #3800 > > nominal lifetime_ref (t : * -> *) u = 00:04:51 verbose #3801 > > `( 00:04:51 verbose #3802 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:04:51 verbose #3803 > > Fable.Core.Emit(\"$0\")>]]\n#endif\ntype LifetimeRef<'T> = class end" 00:04:51 verbose #3804 > > $'' : $'LifetimeRef<`(t u)>' 00:04:51 verbose #3805 > > ) 00:04:52 verbose #3806 > > 00:04:52 verbose #3807 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:52 verbose #3808 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:52 verbose #3809 > > │ ### lifetime_join │ 00:04:52 verbose #3810 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:52 verbose #3811 > > 00:04:52 verbose #3812 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:52 verbose #3813 > > nominal lifetime_join t u = 00:04:52 verbose #3814 > > `( 00:04:52 verbose #3815 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"$0 + 00:04:52 verbose #3816 > > $1\")>]]\n#endif\ntype LifetimeJoin<'T, 'U> = class end" 00:04:52 verbose #3817 > > $'' : $'LifetimeJoin<`t, `u>' 00:04:52 verbose #3818 > > ) 00:04:52 verbose #3819 > > 00:04:52 verbose #3820 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:52 verbose #3821 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:52 verbose #3822 > > │ ### lifetime │ 00:04:52 verbose #3823 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:52 verbose #3824 > > 00:04:52 verbose #3825 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:52 verbose #3826 > > nominal lifetime t u = 00:04:52 verbose #3827 > > `( 00:04:52 verbose #3828 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"$0 00:04:52 verbose #3829 > > $1\")>]]\n#endif\ntype Lifetime<'T, 'U> = class end" 00:04:52 verbose #3830 > > $'' : $'Lifetime<`t, `u>' 00:04:52 verbose #3831 > > ) 00:04:52 verbose #3832 > > 00:04:52 verbose #3833 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:52 verbose #3834 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:52 verbose #3835 > > │ ### static_lifetime │ 00:04:52 verbose #3836 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:52 verbose #3837 > > 00:04:52 verbose #3838 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:52 verbose #3839 > > nominal static_lifetime = 00:04:52 verbose #3840 > > `( 00:04:52 verbose #3841 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:04:52 verbose #3842 > > Fable.Core.Emit(\"'static\")>]]\n#endif\ntype StaticLifetime = class end" 00:04:52 verbose #3843 > > $'' : $'StaticLifetime' 00:04:52 verbose #3844 > > ) 00:04:53 verbose #3845 > > 00:04:53 verbose #3846 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:53 verbose #3847 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:53 verbose #3848 > > │ ### ref │ 00:04:53 verbose #3849 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:53 verbose #3850 > > 00:04:53 verbose #3851 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:53 verbose #3852 > > nominal ref t = 00:04:53 verbose #3853 > > `( 00:04:53 verbose #3854 > > backend_switch `(()) `({}) { 00:04:53 verbose #3855 > > Fsharp = 00:04:53 verbose #3856 > > (fun () => 00:04:53 verbose #3857 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:04:53 verbose #3858 > > Fable.Core.Emit(\"&$0\")>]]\ntype Ref<'T> = class end\n#else\ntype Ref<'T> = 00:04:53 verbose #3859 > > 'T\n#endif\n" 00:04:53 verbose #3860 > > ) : () -> () 00:04:53 verbose #3861 > > } 00:04:53 verbose #3862 > > $'' : $'Ref<`t>' 00:04:53 verbose #3863 > > ) 00:04:53 verbose #3864 > > 00:04:53 verbose #3865 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:53 verbose #3866 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:53 verbose #3867 > > │ ### static_ref │ 00:04:53 verbose #3868 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:53 verbose #3869 > > 00:04:53 verbose #3870 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:53 verbose #3871 > > nominal static_ref t = ref (lifetime static_lifetime t) 00:04:54 verbose #3872 > > 00:04:54 verbose #3873 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:54 verbose #3874 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:54 verbose #3875 > > │ ### weak_rc │ 00:04:54 verbose #3876 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:54 verbose #3877 > > 00:04:54 verbose #3878 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:54 verbose #3879 > > nominal weak_rc t = 00:04:54 verbose #3880 > > `( 00:04:54 verbose #3881 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:04:54 verbose #3882 > > Fable.Core.Emit(\"std::rc::Weak<$0>\")>]]\n#endif\ntype std_rc_Weak<'T> = class 00:04:54 verbose #3883 > > end" 00:04:54 verbose #3884 > > $'' : $'std_rc_Weak<`t>' 00:04:54 verbose #3885 > > ) 00:04:54 verbose #3886 > > 00:04:54 verbose #3887 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:54 verbose #3888 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:54 verbose #3889 > > │ ### box │ 00:04:54 verbose #3890 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:54 verbose #3891 > > 00:04:54 verbose #3892 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:54 verbose #3893 > > nominal box t = 00:04:54 verbose #3894 > > `( 00:04:54 verbose #3895 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:04:54 verbose #3896 > > Fable.Core.Emit(\"Box<$0>\")>]]\n#endif\ntype Box<'T> = class end" 00:04:54 verbose #3897 > > $'' : $'Box<`t>' 00:04:54 verbose #3898 > > ) 00:04:54 verbose #3899 > > 00:04:54 verbose #3900 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:54 verbose #3901 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:54 verbose #3902 > > │ ### mut_cell │ 00:04:54 verbose #3903 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:54 verbose #3904 > > 00:04:54 verbose #3905 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:54 verbose #3906 > > nominal mut_cell t = 00:04:54 verbose #3907 > > `( 00:04:54 verbose #3908 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:04:54 verbose #3909 > > Fable.Core.Emit(\"MutCell<$0>\")>]]\n#endif\ntype MutCell<'T> = class end" 00:04:54 verbose #3910 > > $'' : $'MutCell<`t>' 00:04:54 verbose #3911 > > ) 00:04:55 verbose #3912 > > 00:04:55 verbose #3913 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:55 verbose #3914 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:55 verbose #3915 > > │ ### pin │ 00:04:55 verbose #3916 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:55 verbose #3917 > > 00:04:55 verbose #3918 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:55 verbose #3919 > > nominal pin t = 00:04:55 verbose #3920 > > `( 00:04:55 verbose #3921 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:04:55 verbose #3922 > > Fable.Core.Emit(\"std::pin::Pin<$0>\")>]]\n#endif\ntype std_pin_Pin<'T> = class 00:04:55 verbose #3923 > > end" 00:04:55 verbose #3924 > > $'' : $'std_pin_Pin<`t>' 00:04:55 verbose #3925 > > ) 00:04:55 verbose #3926 > > 00:04:55 verbose #3927 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:55 verbose #3928 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:55 verbose #3929 > > │ ### dyn' │ 00:04:55 verbose #3930 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:55 verbose #3931 > > 00:04:55 verbose #3932 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:55 verbose #3933 > > nominal dyn' t = 00:04:55 verbose #3934 > > `( 00:04:55 verbose #3935 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"dyn 00:04:55 verbose #3936 > > $0\")>]]\n#endif\ntype Dyn<'T> = class end" 00:04:55 verbose #3937 > > $'' : $'Dyn<`t>' 00:04:55 verbose #3938 > > ) 00:04:56 verbose #3939 > > 00:04:56 verbose #3940 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:56 verbose #3941 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:56 verbose #3942 > > │ ### fn' │ 00:04:56 verbose #3943 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:56 verbose #3944 > > 00:04:56 verbose #3945 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:56 verbose #3946 > > nominal fn' t = 00:04:56 verbose #3947 > > `( 00:04:56 verbose #3948 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"Fn() 00:04:56 verbose #3949 > > -> $0\")>]]\n#endif\ntype Fn<'T> = class end" 00:04:56 verbose #3950 > > $'' : $'Fn<`t>' 00:04:56 verbose #3951 > > ) 00:04:56 verbose #3952 > > 00:04:56 verbose #3953 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:56 verbose #3954 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:56 verbose #3955 > > │ ### action_fn │ 00:04:56 verbose #3956 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:56 verbose #3957 > > 00:04:56 verbose #3958 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:56 verbose #3959 > > nominal action_fn t = 00:04:56 verbose #3960 > > `( 00:04:56 verbose #3961 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:04:56 verbose #3962 > > Fable.Core.Emit(\"Fn($0)\")>]]\n#endif\ntype ActionFn<'T> = class end" 00:04:56 verbose #3963 > > $'' : $'ActionFn<`t>' 00:04:56 verbose #3964 > > ) 00:04:57 verbose #3965 > > 00:04:57 verbose #3966 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:57 verbose #3967 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:57 verbose #3968 > > │ ### action_fn2 │ 00:04:57 verbose #3969 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:57 verbose #3970 > > 00:04:57 verbose #3971 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:57 verbose #3972 > > nominal action_fn2 t u = 00:04:57 verbose #3973 > > `( 00:04:57 verbose #3974 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:04:57 verbose #3975 > > Fable.Core.Emit(\"Fn($0, $1)\")>]]\n#endif\ntype ActionFn2<'T, 'U> = class end" 00:04:57 verbose #3976 > > $'' : $'ActionFn2<`t, `u>' 00:04:57 verbose #3977 > > ) 00:04:57 verbose #3978 > > 00:04:57 verbose #3979 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:57 verbose #3980 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:57 verbose #3981 > > │ ### fn_once │ 00:04:57 verbose #3982 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:57 verbose #3983 > > 00:04:57 verbose #3984 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:57 verbose #3985 > > nominal fn_once t = 00:04:57 verbose #3986 > > `( 00:04:57 verbose #3987 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:04:57 verbose #3988 > > Fable.Core.Emit(\"FnOnce() -> $0\")>]]\n#endif\ntype FnOnce<'T> = class end" 00:04:57 verbose #3989 > > $'' : $'FnOnce<`t>' 00:04:57 verbose #3990 > > ) 00:04:57 verbose #3991 > > 00:04:57 verbose #3992 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:57 verbose #3993 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:57 verbose #3994 > > │ ### fn_unit │ 00:04:57 verbose #3995 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:57 verbose #3996 > > 00:04:57 verbose #3997 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:57 verbose #3998 > > nominal fn_unit = 00:04:57 verbose #3999 > > `( 00:04:57 verbose #4000 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:04:57 verbose #4001 > > Fable.Core.Emit(\"Fn()\")>]]\n#endif\ntype FnUnit = class end" 00:04:57 verbose #4002 > > $'' : $'FnUnit' 00:04:57 verbose #4003 > > ) 00:04:58 verbose #4004 > > 00:04:58 verbose #4005 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:58 verbose #4006 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:58 verbose #4007 > > │ ### func0 │ 00:04:58 verbose #4008 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:58 verbose #4009 > > 00:04:58 verbose #4010 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:58 verbose #4011 > > nominal func0 t = 00:04:58 verbose #4012 > > `( 00:04:58 verbose #4013 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:04:58 verbose #4014 > > Fable.Core.Emit(\"Func0<$0>\")>]]\n#endif\ntype Func0<'T> = class end" 00:04:58 verbose #4015 > > $'' : $'Func0<`t>' 00:04:58 verbose #4016 > > ) 00:04:58 verbose #4017 > > 00:04:58 verbose #4018 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:58 verbose #4019 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:58 verbose #4020 > > │ ### func1 │ 00:04:58 verbose #4021 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:58 verbose #4022 > > 00:04:58 verbose #4023 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:58 verbose #4024 > > nominal func1 t u = 00:04:58 verbose #4025 > > `( 00:04:58 verbose #4026 > > typecase t with 00:04:58 verbose #4027 > > | () => `func0 `u 00:04:58 verbose #4028 > > | _ => 00:04:58 verbose #4029 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:04:58 verbose #4030 > > Fable.Core.Emit(\"Func1<$0, $1>\")>]]\n#endif\ntype Func0<'T, 'U> = class end" 00:04:58 verbose #4031 > > $'' : $'Func0<`t, `u>' 00:04:58 verbose #4032 > > ) 00:04:59 verbose #4033 > > 00:04:59 verbose #4034 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:59 verbose #4035 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:59 verbose #4036 > > │ ### impl │ 00:04:59 verbose #4037 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:59 verbose #4038 > > 00:04:59 verbose #4039 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:59 verbose #4040 > > nominal impl t = 00:04:59 verbose #4041 > > `( 00:04:59 verbose #4042 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"impl 00:04:59 verbose #4043 > > $0\")>]]\n#endif\ntype Impl<'T> = class end" 00:04:59 verbose #4044 > > $'' : $'Impl<`t>' 00:04:59 verbose #4045 > > ) 00:04:59 verbose #4046 > > 00:04:59 verbose #4047 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:04:59 verbose #4048 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:04:59 verbose #4049 > > │ ### mut' │ 00:04:59 verbose #4050 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:04:59 verbose #4051 > > 00:04:59 verbose #4052 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:04:59 verbose #4053 > > nominal mut' t = 00:04:59 verbose #4054 > > `( 00:04:59 verbose #4055 > > backend_switch `(()) `({}) { 00:04:59 verbose #4056 > > Fsharp = 00:04:59 verbose #4057 > > (fun () => 00:04:59 verbose #4058 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:04:59 verbose #4059 > > Fable.Core.Emit(\"mut $0\")>]]\n#endif\ntype Mut<'T> = class end" 00:04:59 verbose #4060 > > ) : () -> () 00:04:59 verbose #4061 > > } 00:04:59 verbose #4062 > > $'' : $'Mut<`t>' 00:04:59 verbose #4063 > > ) 00:05:00 verbose #4064 > > 00:05:00 verbose #4065 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:00 verbose #4066 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:00 verbose #4067 > > │ ### send │ 00:05:00 verbose #4068 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:00 verbose #4069 > > 00:05:00 verbose #4070 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:00 verbose #4071 > > nominal send t = 00:05:00 verbose #4072 > > `( 00:05:00 verbose #4073 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:05:00 verbose #4074 > > Fable.Core.Emit(\"Send\")>]]\n#endif\ntype Send<'T> = class end" 00:05:00 verbose #4075 > > $'' : lifetime_join t $'Send<`t>' 00:05:00 verbose #4076 > > ) 00:05:00 verbose #4077 > > 00:05:00 verbose #4078 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:00 verbose #4079 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:00 verbose #4080 > > │ ### emit_expr │ 00:05:00 verbose #4081 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:00 verbose #4082 > > 00:05:00 verbose #4083 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:00 verbose #4084 > > inl emit_expr forall a t. (args : a) (code : string) : t = 00:05:00 verbose #4085 > > $'Fable.Core.RustInterop.emitRustExpr !args !code ' 00:05:01 verbose #4086 > > 00:05:01 verbose #4087 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:01 verbose #4088 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:01 verbose #4089 > > │ ### (~!\\) │ 00:05:01 verbose #4090 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:01 verbose #4091 > > 00:05:01 verbose #4092 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:01 verbose #4093 > > inl (~!\) forall t. (code : string) : t = 00:05:01 verbose #4094 > > emit_expr () code 00:05:01 verbose #4095 > > 00:05:01 verbose #4096 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:01 verbose #4097 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:01 verbose #4098 > > │ ### (~!\\\\) │ 00:05:01 verbose #4099 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:01 verbose #4100 > > 00:05:01 verbose #4101 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:01 verbose #4102 > > inl (~!\\) forall t u. ((args : t), (code : string)) : u = 00:05:01 verbose #4103 > > emit_expr args code 00:05:01 verbose #4104 > > 00:05:01 verbose #4105 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:01 verbose #4106 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:01 verbose #4107 > > │ ### ptr │ 00:05:01 verbose #4108 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:01 verbose #4109 > > 00:05:01 verbose #4110 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:01 verbose #4111 > > nominal ptr t = 00:05:01 verbose #4112 > > `( 00:05:01 verbose #4113 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:05:01 verbose #4114 > > Fable.Core.Emit(\"*const $0\")>]]\n#endif\ntype Ptr<'T> = class end" 00:05:01 verbose #4115 > > $'' : $'Ptr<`t>' 00:05:01 verbose #4116 > > ) 00:05:02 verbose #4117 > > 00:05:02 verbose #4118 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:02 verbose #4119 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:02 verbose #4120 > > │ ### ptr_read │ 00:05:02 verbose #4121 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:02 verbose #4122 > > 00:05:02 verbose #4123 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:02 verbose #4124 > > inl ptr_read forall t. (x : ptr t) : t = 00:05:02 verbose #4125 > > !\\(x, $'"std::ptr::read($0)"') 00:05:02 verbose #4126 > > 00:05:02 verbose #4127 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:02 verbose #4128 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:02 verbose #4129 > > │ ### u128 │ 00:05:02 verbose #4130 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:02 verbose #4131 > > 00:05:02 verbose #4132 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:02 verbose #4133 > > nominal u128 = 00:05:02 verbose #4134 > > `( 00:05:02 verbose #4135 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:05:02 verbose #4136 > > Fable.Core.Emit(\"u128\")>]]\n#endif\ntype u128 = class end" 00:05:02 verbose #4137 > > $'' : $'u128' 00:05:02 verbose #4138 > > ) 00:05:03 verbose #4139 > > 00:05:03 verbose #4140 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:03 verbose #4141 > > inl u128 forall t. (x : t) : u128 = 00:05:03 verbose #4142 > > !\\(x, $'"$0 as u128"') 00:05:03 verbose #4143 > > 00:05:03 verbose #4144 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:03 verbose #4145 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:03 verbose #4146 > > │ ### f64 │ 00:05:03 verbose #4147 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:03 verbose #4148 > > 00:05:03 verbose #4149 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:03 verbose #4150 > > inl f64 forall t. (x : t) : f64 = 00:05:03 verbose #4151 > > !\\(x, $'"$0 as f64"') 00:05:04 verbose #4152 > > 00:05:04 verbose #4153 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:04 verbose #4154 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:04 verbose #4155 > > │ ### unwrap_0 │ 00:05:04 verbose #4156 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:04 verbose #4157 > > 00:05:04 verbose #4158 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:04 verbose #4159 > > inl unwrap_0 forall (t : * -> *) u. (x : t u) : u = 00:05:04 verbose #4160 > > !\\(x, $'"$0.0"') 00:05:04 verbose #4161 > > 00:05:04 verbose #4162 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:04 verbose #4163 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:04 verbose #4164 > > │ ### unwrap_0_ref │ 00:05:04 verbose #4165 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:04 verbose #4166 > > 00:05:04 verbose #4167 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:04 verbose #4168 > > inl unwrap_0_ref forall (t : * -> *) u. (x : ref (t u)) : ref u = 00:05:04 verbose #4169 > > !\\(x, $'"&$0.0"') 00:05:04 verbose #4170 > > 00:05:04 verbose #4171 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:04 verbose #4172 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:04 verbose #4173 > > │ ### emit │ 00:05:04 verbose #4174 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:04 verbose #4175 > > 00:05:04 verbose #4176 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:04 verbose #4177 > > inl emit forall t. (x : t) : t = 00:05:04 verbose #4178 > > !\\(x, $'"$0"') 00:05:05 verbose #4179 > > 00:05:05 verbose #4180 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:05 verbose #4181 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:05 verbose #4182 > > │ ### emit' │ 00:05:05 verbose #4183 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:05 verbose #4184 > > 00:05:05 verbose #4185 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:05 verbose #4186 > > inl emit' forall t. (x : t) : t = 00:05:05 verbose #4187 > > !\\(x, $'"let !x = $0"') 00:05:05 verbose #4188 > > x 00:05:05 verbose #4189 > > 00:05:05 verbose #4190 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:05 verbose #4191 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:05 verbose #4192 > > │ ### clone │ 00:05:05 verbose #4193 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:05 verbose #4194 > > 00:05:05 verbose #4195 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:05 verbose #4196 > > inl clone forall t. (x : t) : t = 00:05:05 verbose #4197 > > !\\(x, $'"$0.clone()"') 00:05:06 verbose #4198 > > 00:05:06 verbose #4199 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:06 verbose #4200 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:06 verbose #4201 > > │ ### dbg │ 00:05:06 verbose #4202 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:06 verbose #4203 > > 00:05:06 verbose #4204 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:06 verbose #4205 > > inl dbg forall t. (x : t) : t = 00:05:06 verbose #4206 > > !\\(x, $'"dbg\!($0)"') 00:05:06 verbose #4207 > > 00:05:06 verbose #4208 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:06 verbose #4209 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:06 verbose #4210 > > │ ### new_box │ 00:05:06 verbose #4211 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:06 verbose #4212 > > 00:05:06 verbose #4213 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:06 verbose #4214 > > inl new_box forall t. (x : t) : box t = 00:05:06 verbose #4215 > > !\\(x, $'"Box::new($0)"') 00:05:07 verbose #4216 > > 00:05:07 verbose #4217 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:07 verbose #4218 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:07 verbose #4219 > > │ ### new_rc │ 00:05:07 verbose #4220 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:07 verbose #4221 > > 00:05:07 verbose #4222 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:07 verbose #4223 > > inl new_rc forall t. (x : t) : rc t = 00:05:07 verbose #4224 > > !\\(x, $'"std::rc::Rc::new($0)"') 00:05:07 verbose #4225 > > 00:05:07 verbose #4226 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:07 verbose #4227 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:07 verbose #4228 > > │ ### rc_clone │ 00:05:07 verbose #4229 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:07 verbose #4230 > > 00:05:07 verbose #4231 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:07 verbose #4232 > > inl rc_clone forall t. (x : rc t) : rc t = 00:05:07 verbose #4233 > > !\\(x, $'"std::rc::Rc::clone(&$0)"') 00:05:08 verbose #4234 > > 00:05:08 verbose #4235 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:08 verbose #4236 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:08 verbose #4237 > > │ ### rc_unwrap_or_clone │ 00:05:08 verbose #4238 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:08 verbose #4239 > > 00:05:08 verbose #4240 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:08 verbose #4241 > > inl rc_unwrap_or_clone forall t. (x : rc t) : t = 00:05:08 verbose #4242 > > !\\(x, $'"std::rc::Rc::unwrap_or_clone($0)"') 00:05:08 verbose #4243 > > 00:05:08 verbose #4244 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:08 verbose #4245 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:08 verbose #4246 > > │ ### rc_downgrade │ 00:05:08 verbose #4247 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:08 verbose #4248 > > 00:05:08 verbose #4249 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:08 verbose #4250 > > inl rc_downgrade forall t. (x : rc t) : weak_rc t = 00:05:08 verbose #4251 > > !\\(x, $'"std::rc::Rc::downgrade(&$0)"') 00:05:09 verbose #4252 > > 00:05:09 verbose #4253 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:09 verbose #4254 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:09 verbose #4255 > > │ ### new_ref_cell │ 00:05:09 verbose #4256 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:09 verbose #4257 > > 00:05:09 verbose #4258 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:09 verbose #4259 > > inl new_ref_cell forall t. (x : t) : ref_cell t = 00:05:09 verbose #4260 > > !\\(x, $'"std::cell::RefCell::new($0)"') 00:05:09 verbose #4261 > > 00:05:09 verbose #4262 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:09 verbose #4263 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:09 verbose #4264 > > │ ### ref_cell_borrow │ 00:05:09 verbose #4265 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:09 verbose #4266 > > 00:05:09 verbose #4267 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:09 verbose #4268 > > inl ref_cell_borrow forall t. (x : rc (ref_cell t)) : t = 00:05:09 verbose #4269 > > !\\(x, $'"*std::cell::RefCell::borrow(&std::rc::Rc::clone(&$0))"') 00:05:09 verbose #4270 > > 00:05:09 verbose #4271 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:09 verbose #4272 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:09 verbose #4273 > > │ ### ref_cell_borrow_mut │ 00:05:09 verbose #4274 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:09 verbose #4275 > > 00:05:09 verbose #4276 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:09 verbose #4277 > > inl ref_cell_borrow_mut forall t. (x : rc (ref_cell t)) : mut' t = 00:05:09 verbose #4278 > > !\\(x, $'"*std::cell::RefCell::borrow_mut(&std::rc::Rc::clone(&$0))"') 00:05:10 verbose #4279 > > 00:05:10 verbose #4280 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:10 verbose #4281 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:10 verbose #4282 > > │ ### to_mut │ 00:05:10 verbose #4283 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:10 verbose #4284 > > 00:05:10 verbose #4285 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:10 verbose #4286 > > inl to_mut forall t. (x : t) : () = 00:05:10 verbose #4287 > > (!\($'"true; // 1"') : bool) |> ignore 00:05:10 verbose #4288 > > !\($'"let mut !x = !x"') : () 00:05:10 verbose #4289 > > // (!\($'"true; !x"') : bool) |> ignore 00:05:10 verbose #4290 > > // !\($'"!x"') 00:05:10 verbose #4291 > > // inl result = !\($'"!x"') : mut' t 00:05:10 verbose #4292 > > // !\($'"!result"') 00:05:10 verbose #4293 > > // inl result = !\($'"*/ // a"') : mut' t 00:05:10 verbose #4294 > > // inl result = !\($'"!x"') : mut' t 00:05:10 verbose #4295 > > // result |> fun x => $'!x |> unbox // b' 00:05:10 verbose #4296 > > 00:05:10 verbose #4297 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:10 verbose #4298 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:10 verbose #4299 > > │ ### ref_map │ 00:05:10 verbose #4300 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:10 verbose #4301 > > 00:05:10 verbose #4302 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:10 verbose #4303 > > inl ref_map forall t u. (fn : t -> u) (x : ref t) : ref u = 00:05:10 verbose #4304 > > !\($'"!fn(!x)"') 00:05:11 verbose #4305 > > 00:05:11 verbose #4306 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:11 verbose #4307 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:11 verbose #4308 > > │ ### ref_eval │ 00:05:11 verbose #4309 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:11 verbose #4310 > > 00:05:11 verbose #4311 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:11 verbose #4312 > > inl ref_eval forall t u. (fn : t -> u) (ref : ref t) : u = 00:05:11 verbose #4313 > > !\\(fn, $'"$0(!ref.clone())"') 00:05:11 verbose #4314 > > 00:05:11 verbose #4315 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:11 verbose #4316 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:11 verbose #4317 > > │ ### cow_as_ref │ 00:05:11 verbose #4318 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:11 verbose #4319 > > 00:05:11 verbose #4320 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:11 verbose #4321 > > inl cow_as_ref forall t. (s : cow t) : ref t = 00:05:11 verbose #4322 > > !\\(s, $'"$0.as_ref()"') 00:05:12 verbose #4323 > > 00:05:12 verbose #4324 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:12 verbose #4325 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:12 verbose #4326 > > │ ### from_mut │ 00:05:12 verbose #4327 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:12 verbose #4328 > > 00:05:12 verbose #4329 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:12 verbose #4330 > > inl from_mut forall t. (x : mut' t) : t = 00:05:12 verbose #4331 > > !\\(x, $'"$0"') 00:05:12 verbose #4332 > > 00:05:12 verbose #4333 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:12 verbose #4334 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:12 verbose #4335 > > │ ### box_fn │ 00:05:12 verbose #4336 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:12 verbose #4337 > > 00:05:12 verbose #4338 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:12 verbose #4339 > > inl box_fn forall t. (x : () -> ()) : box t = 00:05:12 verbose #4340 > > inl x = join x 00:05:12 verbose #4341 > > !\($'"Box::new(move || !x())"') 00:05:12 verbose #4342 > > 00:05:12 verbose #4343 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:12 verbose #4344 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:12 verbose #4345 > > │ ### box_pin │ 00:05:12 verbose #4346 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:12 verbose #4347 > > 00:05:12 verbose #4348 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:12 verbose #4349 > > inl box_pin forall t. (x : t) : pin (box t) = 00:05:12 verbose #4350 > > !\\(x, $'"Box::pin($0)"') 00:05:13 verbose #4351 > > 00:05:13 verbose #4352 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:13 verbose #4353 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:13 verbose #4354 > > │ ### to_ref │ 00:05:13 verbose #4355 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:13 verbose #4356 > > 00:05:13 verbose #4357 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:13 verbose #4358 > > inl to_ref forall t. (x : t) : ref t = 00:05:13 verbose #4359 > > !\\(x, $'"&$0"') 00:05:13 verbose #4360 > > 00:05:13 verbose #4361 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:13 verbose #4362 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:13 verbose #4363 > > │ ### to_ref_mut │ 00:05:13 verbose #4364 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:13 verbose #4365 > > 00:05:13 verbose #4366 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:13 verbose #4367 > > inl to_ref_mut forall t. (x : t) : ref (mut' t) = 00:05:13 verbose #4368 > > !\\(x, $'"&mut $0"') 00:05:14 verbose #4369 > > 00:05:14 verbose #4370 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:14 verbose #4371 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:14 verbose #4372 > > │ ### deref │ 00:05:14 verbose #4373 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:14 verbose #4374 > > 00:05:14 verbose #4375 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:14 verbose #4376 > > inl deref forall t. (ref : ref t) : t = 00:05:14 verbose #4377 > > !\\(ref, $'"*$0"') 00:05:14 verbose #4378 > > 00:05:14 verbose #4379 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:14 verbose #4380 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:14 verbose #4381 > > │ ### from_ref │ 00:05:14 verbose #4382 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:14 verbose #4383 > > 00:05:14 verbose #4384 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:14 verbose #4385 > > inl from_ref forall t. (ref : ref t) : t = 00:05:14 verbose #4386 > > !\($'"!ref"') 00:05:15 verbose #4387 > > 00:05:15 verbose #4388 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:15 verbose #4389 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:15 verbose #4390 > > │ ### into │ 00:05:15 verbose #4391 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:15 verbose #4392 > > 00:05:15 verbose #4393 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:15 verbose #4394 > > inl into forall t u. (x : t) : u = 00:05:15 verbose #4395 > > !\($'"!x.into()"') 00:05:15 verbose #4396 > > 00:05:15 verbose #4397 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:15 verbose #4398 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:15 verbose #4399 > > │ ### ops_deref │ 00:05:15 verbose #4400 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:15 verbose #4401 > > 00:05:15 verbose #4402 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:15 verbose #4403 > > inl ops_deref forall t. (ref : t) : t = 00:05:15 verbose #4404 > > !\\(ref, $'"core::ops::Deref::deref(&$0)"') 00:05:15 verbose #4405 > > 00:05:15 verbose #4406 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:15 verbose #4407 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:15 verbose #4408 > > │ ### func0_eval │ 00:05:15 verbose #4409 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:15 verbose #4410 > > 00:05:15 verbose #4411 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:15 verbose #4412 > > inl func0_eval forall t. (x : func0 t) : t = 00:05:15 verbose #4413 > > !\\(x, $'"$0()"') 00:05:16 verbose #4414 > > 00:05:16 verbose #4415 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:16 verbose #4416 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:16 verbose #4417 > > │ ### func0_move │ 00:05:16 verbose #4418 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:16 verbose #4419 > > 00:05:16 verbose #4420 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:16 verbose #4421 > > inl func0_move forall t. (fn : func0 t) : t = 00:05:16 verbose #4422 > > inl fn = join fn 00:05:16 verbose #4423 > > !\($'"(move || !fn())()"') 00:05:16 verbose #4424 > > 00:05:16 verbose #4425 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:16 verbose #4426 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:16 verbose #4427 > > │ ### move │ 00:05:16 verbose #4428 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:16 verbose #4429 > > 00:05:16 verbose #4430 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:16 verbose #4431 > > inl move forall t. (fn : () -> t) : func0 t = 00:05:16 verbose #4432 > > !\\(fn, $'"Func0::new(move || $0())"') 00:05:17 verbose #4433 > > 00:05:17 verbose #4434 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:17 verbose #4435 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:17 verbose #4436 > > │ ### to_static_ref_unbox │ 00:05:17 verbose #4437 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:17 verbose #4438 > > 00:05:17 verbose #4439 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:17 verbose #4440 > > inl to_static_ref_unbox forall t. (x : ref t) : static_ref t = 00:05:17 verbose #4441 > > x |> unbox 00:05:17 verbose #4442 > > 00:05:17 verbose #4443 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:17 verbose #4444 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:17 verbose #4445 > > │ ### from_static_ref_unbox │ 00:05:17 verbose #4446 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:17 verbose #4447 > > 00:05:17 verbose #4448 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:17 verbose #4449 > > inl from_static_ref_unbox forall t. (x : static_ref t) : ref t = 00:05:17 verbose #4450 > > x |> unbox 00:05:18 verbose #4451 > > 00:05:18 verbose #4452 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:18 verbose #4453 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:18 verbose #4454 > > │ ### box_leak │ 00:05:18 verbose #4455 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:18 verbose #4456 > > 00:05:18 verbose #4457 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:18 verbose #4458 > > inl box_leak forall t. (x : box t) : static_ref (mut' t) = 00:05:18 verbose #4459 > > !\\(x, $'"Box::leak($0)"') 00:05:18 verbose #4460 > > 00:05:18 verbose #4461 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:18 verbose #4462 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:18 verbose #4463 > > │ ### drop │ 00:05:18 verbose #4464 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:18 verbose #4465 > > 00:05:18 verbose #4466 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:18 verbose #4467 > > inl drop forall t. (x : t) : () = 00:05:18 verbose #4468 > > (!\\(x, $'"true; drop($0)"') : bool) |> ignore 00:05:19 verbose #4469 > > 00:05:19 verbose #4470 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:19 verbose #4471 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:19 verbose #4472 > > │ ### break │ 00:05:19 verbose #4473 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:19 verbose #4474 > > 00:05:19 verbose #4475 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:19 verbose #4476 > > inl break () : () = 00:05:19 verbose #4477 > > (!\($'"true; break"') : bool) |> ignore 00:05:19 verbose #4478 > > 00:05:19 verbose #4479 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:19 verbose #4480 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:19 verbose #4481 > > │ ### fix_closure' │ 00:05:19 verbose #4482 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:19 verbose #4483 > > 00:05:19 verbose #4484 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:19 verbose #4485 > > inl fix_closure' (depth : u8 * u8) x = 00:05:19 verbose #4486 > > inl rec loop text (acc : string) n : string = 00:05:19 verbose #4487 > > if n <= 0 00:05:19 verbose #4488 > > then acc 00:05:19 verbose #4489 > > else loop text (acc +. text) (n - 1) 00:05:19 verbose #4490 > > inl a = depth |> fst |> loop "}" "" 00:05:19 verbose #4491 > > inl b = depth |> snd |> loop "{" "" 00:05:19 verbose #4492 > > $'"true; !x " + !a + "); " + !b + " // rust.fix_closure\'"' : string 00:05:19 verbose #4493 > > 00:05:19 verbose #4494 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:19 verbose #4495 > > //// test 00:05:19 verbose #4496 > > 00:05:19 verbose #4497 > > fix_closure' (3, 2) 0i32 00:05:19 verbose #4498 > > |> _assert_eq "true; 0 }}}); {{ // rust.fix_closure'" 00:05:21 verbose #4499 > > 00:05:21 verbose #4500 > > ╭─[ 1.27s - stdout ]───────────────────────────────────────────────────────────╮ 00:05:21 verbose #4501 > > │ __assert_eq / actual: "true; 0 }}}); {{ // rust.fix_closure'" / expected: │ 00:05:21 verbose #4502 > > │ "true; 0 }}}); {{ // rust.fix_closure'" │ 00:05:21 verbose #4503 > > │ │ 00:05:21 verbose #4504 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:21 verbose #4505 > > 00:05:21 verbose #4506 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:21 verbose #4507 > > //// test 00:05:21 verbose #4508 > > 00:05:21 verbose #4509 > > fix_closure' (0, 0) () 00:05:21 verbose #4510 > > |> _assert_eq "true; () ); // rust.fix_closure\'" 00:05:21 verbose #4511 > > 00:05:21 verbose #4512 > > ╭─[ 437.34ms - stdout ]────────────────────────────────────────────────────────╮ 00:05:21 verbose #4513 > > │ __assert_eq / actual: "true; () ); // rust.fix_closure'" / expected: "true; │ 00:05:21 verbose #4514 > > │ () ); // rust.fix_closure'" │ 00:05:21 verbose #4515 > > │ │ 00:05:21 verbose #4516 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:21 verbose #4517 > > 00:05:21 verbose #4518 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:21 verbose #4519 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:21 verbose #4520 > > │ ### fix_closure │ 00:05:21 verbose #4521 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:21 verbose #4522 > > 00:05:21 verbose #4523 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:21 verbose #4524 > > inl fix_closure depth x = 00:05:21 verbose #4525 > > inl code = fix_closure' depth x 00:05:21 verbose #4526 > > (!\code : bool) |> ignore 00:05:22 verbose #4527 > > 00:05:22 verbose #4528 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:22 verbose #4529 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:22 verbose #4530 > > │ ### loop │ 00:05:22 verbose #4531 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:22 verbose #4532 > > 00:05:22 verbose #4533 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:22 verbose #4534 > > inl loop (depth : i32) (fn : () -> ()) : () = 00:05:22 verbose #4535 > > (!\($'"true; loop { // rust.loop"') : bool) |> ignore 00:05:22 verbose #4536 > > fn () 00:05:22 verbose #4537 > > 00:05:22 verbose #4538 > > listm.init depth id 00:05:22 verbose #4539 > > |> listm.iter fun n => 00:05:22 verbose #4540 > > (!\($'"true; } // rust.loop"') : bool) |> ignore 00:05:22 verbose #4541 > > 00:05:22 verbose #4542 > > (!\($'"true; } // rust.loop"') : bool) |> ignore 00:05:22 verbose #4543 > > 00:05:22 verbose #4544 > > listm.init depth id 00:05:22 verbose #4545 > > |> listm.iter fun n => 00:05:22 verbose #4546 > > (!\($'"true; { // rust.loop"') : bool) |> ignore 00:05:22 verbose #4547 > > 00:05:22 verbose #4548 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:22 verbose #4549 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:22 verbose #4550 > > │ ### capture │ 00:05:22 verbose #4551 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:22 verbose #4552 > > 00:05:22 verbose #4553 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:22 verbose #4554 > > inl capture forall t. (fn : () -> t) : t = 00:05:22 verbose #4555 > > (!\($'"true; let _capture = (|| { //"') : bool) |> ignore 00:05:22 verbose #4556 > > (!\\(fn (), $'"true; $0 })()"') : bool) |> ignore 00:05:22 verbose #4557 > > !\($'"_capture"') 00:05:22 verbose #4558 > > 00:05:22 verbose #4559 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:22 verbose #4560 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:22 verbose #4561 > > │ ### capture_move │ 00:05:22 verbose #4562 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:22 verbose #4563 > > 00:05:22 verbose #4564 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:22 verbose #4565 > > inl capture_move forall t. (fn : () -> t) : t = 00:05:22 verbose #4566 > > (!\($'"true; let _capture_move = (move || { //"') : bool) |> ignore 00:05:22 verbose #4567 > > (!\\(fn (), $'"true; $0 })()"') : bool) |> ignore 00:05:22 verbose #4568 > > !\($'"_capture_move"') 00:05:23 verbose #4569 > > 00:05:23 verbose #4570 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:23 verbose #4571 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:23 verbose #4572 > > │ ### type_emit │ 00:05:23 verbose #4573 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:23 verbose #4574 > > 00:05:23 verbose #4575 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:23 verbose #4576 > > nominal type_emit t = 00:05:23 verbose #4577 > > `( 00:05:23 verbose #4578 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"*/ $0 00:05:23 verbose #4579 > > /*\")>]]\n#endif\ntype TypeEmit<'T> = class end" 00:05:23 verbose #4580 > > $'' : $'TypeEmit<`t>' 00:05:23 verbose #4581 > > ) 00:05:23 verbose #4582 > > 00:05:23 verbose #4583 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:23 verbose #4584 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:23 verbose #4585 > > │ ### partial_eq_wrapper │ 00:05:23 verbose #4586 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:23 verbose #4587 > > 00:05:23 verbose #4588 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:23 verbose #4589 > > nominal partial_eq_wrapper t = 00:05:23 verbose #4590 > > `( 00:05:23 verbose #4591 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:05:23 verbose #4592 > > Fable.Core.Emit(\"PartialEqWrapper<$0>\")>]]\n#endif\ntype PartialEqWrapper<'T> 00:05:23 verbose #4593 > > = class end" 00:05:23 verbose #4594 > > $'' : $'PartialEqWrapper<`t>' 00:05:23 verbose #4595 > > ) 00:05:24 verbose #4596 > > 00:05:24 verbose #4597 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:24 verbose #4598 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:24 verbose #4599 > > │ ### new_partial_eq_wrapper │ 00:05:24 verbose #4600 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:24 verbose #4601 > > 00:05:24 verbose #4602 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:24 verbose #4603 > > inl new_partial_eq_wrapper forall t. 00:05:24 verbose #4604 > > (eq_fn : ref (partial_eq_wrapper t) -> ref (partial_eq_wrapper t) -> bool) 00:05:24 verbose #4605 > > (x : t) 00:05:24 verbose #4606 > > : partial_eq_wrapper t 00:05:24 verbose #4607 > > = 00:05:24 verbose #4608 > > inl struct () = 00:05:24 verbose #4609 > > !\($'"} //"') : () 00:05:24 verbose #4610 > > 00:05:24 verbose #4611 > > !\($'"#[[derive( //"') : () 00:05:24 verbose #4612 > > !\($'" Debug, //"') : () 00:05:24 verbose #4613 > > !\($'" Clone, //"') : () 00:05:24 verbose #4614 > > !\($'")]] //"') : () 00:05:24 verbose #4615 > > !\($'"pub struct PartialEqWrapper<T>(T); /*"') : () 00:05:24 verbose #4616 > > 00:05:24 verbose #4617 > > !\($'"*/ impl PartialEq for PartialEqWrapper< /*"') : () 00:05:24 verbose #4618 > > (null () : type_emit t) |> ignore 00:05:24 verbose #4619 > > !\($'"*/ > { //"') : () 00:05:24 verbose #4620 > > 00:05:24 verbose #4621 > > !\($'"fn eq(&self, other: &Self) -> bool { //"') : () 00:05:24 verbose #4622 > > 00:05:24 verbose #4623 > > inl self : ref (partial_eq_wrapper t) = !\($'$"self"') 00:05:24 verbose #4624 > > inl other : ref (partial_eq_wrapper t) = !\($'$"other"') 00:05:24 verbose #4625 > > 00:05:24 verbose #4626 > > self 00:05:24 verbose #4627 > > |> eq_fn other 00:05:24 verbose #4628 > > |> fun x => !\($'$"!x //"') 00:05:24 verbose #4629 > > 00:05:24 verbose #4630 > > !\($'"} } } fn _main() { { { //"') : () 00:05:24 verbose #4631 > > 00:05:24 verbose #4632 > > $'let _!struct = true' : () 00:05:24 verbose #4633 > > 00:05:24 verbose #4634 > > !\\(x, $'"PartialEqWrapper($0)"') 00:05:24 verbose #4635 > > 00:05:24 verbose #4636 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:24 verbose #4637 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:24 verbose #4638 > > │ ### clone_wrapper │ 00:05:24 verbose #4639 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:24 verbose #4640 > > 00:05:24 verbose #4641 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:24 verbose #4642 > > nominal clone_wrapper t = 00:05:24 verbose #4643 > > `( 00:05:24 verbose #4644 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:05:24 verbose #4645 > > Fable.Core.Emit(\"CloneWrapper<$0>\")>]]\n#endif\ntype CloneWrapper<'T> = class 00:05:24 verbose #4646 > > end" 00:05:24 verbose #4647 > > $'' : $'CloneWrapper<`t>' 00:05:24 verbose #4648 > > ) 00:05:25 verbose #4649 > > 00:05:25 verbose #4650 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:25 verbose #4651 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:25 verbose #4652 > > │ ### new_clone_wrapper │ 00:05:25 verbose #4653 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:25 verbose #4654 > > 00:05:25 verbose #4655 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:25 verbose #4656 > > inl new_clone_wrapper forall t. 00:05:25 verbose #4657 > > (clone_fn : ref (clone_wrapper t) -> ref (clone_wrapper t)) 00:05:25 verbose #4658 > > (x : t) 00:05:25 verbose #4659 > > : clone_wrapper t 00:05:25 verbose #4660 > > = 00:05:25 verbose #4661 > > inl struct () = 00:05:25 verbose #4662 > > !\($'"} //"') : () 00:05:25 verbose #4663 > > 00:05:25 verbose #4664 > > !\($'"#[[derive( //"') : () 00:05:25 verbose #4665 > > !\($'" Debug, //"') : () 00:05:25 verbose #4666 > > !\($'")]] //"') : () 00:05:25 verbose #4667 > > !\($'"pub struct CloneWrapper<T>(T); /*"') : () 00:05:25 verbose #4668 > > 00:05:25 verbose #4669 > > !\($'"*/ impl Clone for CloneWrapper< /*"') : () 00:05:25 verbose #4670 > > (null () : type_emit t) |> ignore 00:05:25 verbose #4671 > > !\($'"*/ > { //"') : () 00:05:25 verbose #4672 > > 00:05:25 verbose #4673 > > !\($'"fn clone(&self) -> Self { //"') : () 00:05:25 verbose #4674 > > 00:05:25 verbose #4675 > > inl self : ref (clone_wrapper t) = !\($'$"self"') 00:05:25 verbose #4676 > > 00:05:25 verbose #4677 > > self 00:05:25 verbose #4678 > > |> clone_fn 00:05:25 verbose #4679 > > |> fun x => !\($'$"!x.clone() //"') 00:05:25 verbose #4680 > > 00:05:25 verbose #4681 > > !\($'"} } } fn _main() { { { //"') : () 00:05:25 verbose #4682 > > 00:05:25 verbose #4683 > > $'let _!struct = true' : () 00:05:25 verbose #4684 > > 00:05:25 verbose #4685 > > !\\(x, $'"CloneWrapper($0)"') 00:05:25 verbose #4686 > > 00:05:25 verbose #4687 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:25 verbose #4688 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:25 verbose #4689 > > │ ### concat │ 00:05:25 verbose #4690 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:25 verbose #4691 > > 00:05:25 verbose #4692 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:25 verbose #4693 > > inl concat forall (t : * -> *) u. (x : t (t u)) : t u = 00:05:25 verbose #4694 > > !\($'$"!x.concat()"') 00:05:26 verbose #4695 > 00:00:43 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 47027 } 00:05:26 verbose #4696 > 00:00:43 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:05:26 verbose #4697 > "nbconvert", 00:05:26 verbose #4698 > "c:/home/git/polyglot/lib/spiral/rust/rust.dib.ipynb", 00:05:26 verbose #4699 > "--to", 00:05:26 verbose #4700 > "html", 00:05:26 verbose #4701 > "--HTMLExporter.theme=dark", 00:05:26 verbose #4702 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/rust/rust.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:05:28 verbose #4703 > 00:00:45 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/rust/rust.dib.ipynb to html 00:05:28 verbose #4704 > 00:00:45 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:05:28 verbose #4705 > 00:00:45 verbose #7 ! validate(nb) 00:05:30 verbose #4706 > 00:00:48 verbose #8 ! [NbConvertApp] Writing 425085 bytes to c:\home\git\polyglot\lib\spiral\rust\rust.dib.html 00:05:30 verbose #4707 > 00:00:48 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 649 } 00:05:30 verbose #4708 > 00:00:48 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 649 } 00:05:30 verbose #4709 > 00:00:48 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:05:30 verbose #4710 > "-c", 00:05:30 verbose #4711 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/rust/rust.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:05:30 verbose #4712 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/rust/rust.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:05:31 verbose #4713 > 00:00:48 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:05:31 verbose #4714 > 00:00:48 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:05:31 verbose #4715 > 00:00:48 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 47735 } 00:05:31 debug #4716 runtime.execute_with_options_async / { exit_code = 0; output_length = 52408 } 00:05:31 debug #3 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path rust/rust.dib --retries 3 00:05:31 debug #4717 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path rust/testing.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:05:31 verbose #4718 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "rust/testing.dib", "--retries", "3"])) } 00:05:31 verbose #4719 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:05:31 verbose #4720 > "repl", 00:05:31 verbose #4721 > "--exit-after-run", 00:05:31 verbose #4722 > "--run", 00:05:31 verbose #4723 > "c:/home/git/polyglot/lib/spiral/rust/testing.dib", 00:05:31 verbose #4724 > "--output-path", 00:05:31 verbose #4725 > "c:/home/git/polyglot/lib/spiral/rust/testing.dib.ipynb", 00:05:31 verbose #4726 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/rust/testing.dib" --output-path "c:/home/git/polyglot/lib/spiral/rust/testing.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:05:33 verbose #4727 > > 00:05:33 verbose #4728 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:33 verbose #4729 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:33 verbose #4730 > > │ # rust/testing │ 00:05:33 verbose #4731 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:37 verbose #4732 > > 00:05:37 verbose #4733 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:37 verbose #4734 > > open rust.rust_operators 00:05:38 verbose #4735 > > 00:05:38 verbose #4736 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:38 verbose #4737 > > //// test 00:05:38 verbose #4738 > > 00:05:38 verbose #4739 > > open testing 00:05:39 verbose #4740 > > 00:05:39 verbose #4741 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:05:39 verbose #4742 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:05:39 verbose #4743 > > │ ### run_tests' │ 00:05:39 verbose #4744 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:05:39 verbose #4745 > > 00:05:39 verbose #4746 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:39 verbose #4747 > > inl run_tests' tests = 00:05:39 verbose #4748 > > (!\($'"true; () //"') : bool) |> ignore 00:05:39 verbose #4749 > > 00:05:39 verbose #4750 > > inl fields = reflection.get_record_fields tests 00:05:39 verbose #4751 > > 00:05:39 verbose #4752 > > fields 00:05:39 verbose #4753 > > |> listm.iter fun name, (fn : string -> ()) => 00:05:39 verbose #4754 > > !\($'"} /* /*"') 00:05:39 verbose #4755 > > (!\($'$"*/ #[[test]] fn " + !name + "() { //"') : bool) |> ignore 00:05:39 verbose #4756 > > fn name 00:05:39 verbose #4757 > > 00:05:39 verbose #4758 > > fields 00:05:39 verbose #4759 > > |> listm.iter fun _ => 00:05:39 verbose #4760 > > !\($'"{ //"') : () 00:05:39 verbose #4761 > > 00:05:39 verbose #4762 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:39 verbose #4763 > > //// test 00:05:39 verbose #4764 > > 00:05:39 verbose #4765 > > inl run test = 00:05:39 verbose #4766 > > if env.get_environment_variable "TEST" = "1" 00:05:39 verbose #4767 > > then () 00:05:39 verbose #4768 > > else 00:05:39 verbose #4769 > > runtime.execution_options fun x => { x with 00:05:39 verbose #4770 > > command = "cargo test -- --show-output" 00:05:39 verbose #4771 > > working_directory = file_system.get_source_directory () |> Some |> 00:05:39 verbose #4772 > > optionm'.box 00:05:39 verbose #4773 > > environment_variables = ;[[ "TEST", "1" ]] 00:05:39 verbose #4774 > > } 00:05:39 verbose #4775 > > |> runtime.execute_with_options 00:05:39 verbose #4776 > > |> fun exit_code, result => 00:05:39 verbose #4777 > > exit_code |> _assert_eq 0i32 00:05:39 verbose #4778 > > result |> _assert sm'.contains "test result: ok. 1 passed; 0 failed; 00:05:39 verbose #4779 > > 0 ignored;" 00:05:39 verbose #4780 > > 00:05:39 verbose #4781 > > $'let tests () = !test ()' : () 00:05:39 verbose #4782 > > 00:05:39 verbose #4783 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:05:39 verbose #4784 > > //// test 00:05:39 verbose #4785 > > ///! rust -d encoding_rs encoding_rs_io 00:05:39 verbose #4786 > > 00:05:39 verbose #4787 > > fun () => 00:05:39 verbose #4788 > > run_tests' { 00:05:39 verbose #4789 > > a = _assert_eq "a" 00:05:39 verbose #4790 > > } 00:05:39 verbose #4791 > > |> run 00:06:11 verbose #4792 > > 00:06:11 verbose #4793 > > ╭─[ 31.34s - return value ]────────────────────────────────────────────────────╮ 00:06:11 verbose #4794 > > │ 00:00:00 debug #1 runtime.execute_with_options / { file_name = │ 00:06:11 verbose #4795 > > │ cargo; arguments = [ │ 00:06:11 verbose #4796 > > │ "test", │ 00:06:11 verbose #4797 > > │ "--", │ 00:06:11 verbose #4798 > > │ "--show-output", │ 00:06:11 verbose #4799 > > │ ]; options = { command = cargo test -- --show-output; cancellation_token = │ 00:06:11 verbose #4800 > > │ None; environment_variables = Array(MutCell([("TEST", "1")])); on_line = │ 00:06:11 verbose #4801 > > │ None; stdin = None; trace = true; working_directory = Some( │ 00:06:11 verbose #4802 > > │ │ 00:06:11 verbose #4803 > > │ "c:\home\git\polyglot\target\spiral_builder\spiral_builder\packages\Rust\4ec │ 00:06:11 verbose #4804 > > │ cc1786074220707f0458005706cb99abe3f56ece24acbac5e3f03e2475ae0", │ 00:06:11 verbose #4805 > > │ ) } } │ 00:06:11 verbose #4806 > > │ 00:00:00 verbose #2 ! Compiling │ 00:06:11 verbose #4807 > > │ spiral_builder_4eccc1786074220707f0458005706cb99abe3f56ece24acbac5e3f03e2475 │ 00:06:11 verbose #4808 > > │ ae0 v0.0.1 │ 00:06:11 verbose #4809 > > │ (C:\home\git\polyglot\target\spiral_builder\spiral_builder\packages\Rust\4ec │ 00:06:11 verbose #4810 > > │ cc1786074220707f0458005706cb99abe3f56ece24acbac5e3f03e2475ae0) │ 00:06:11 verbose #4811 > > │ 00:00:04 verbose #3 ! Finished `test` profile [unoptimized + │ 00:06:11 verbose #4812 > > │ debuginfo] target(s) in 4.05s │ 00:06:11 verbose #4813 > > │ 00:00:04 verbose #4 ! Running unittests spiral_builder.rs │ 00:06:11 verbose #4814 > > │ (c:\home\git\polyglot\target\spiral_builder\spiral_builder\target\debug\deps │ 00:06:11 verbose #4815 > > │ \spiral_builder_4eccc1786074220707f0458005706cb99abe3f56ece24acbac5e3f03e247 │ 00:06:11 verbose #4816 > > │ 5ae0-cd2a23b4c1c7d454.exe) │ 00:06:11 verbose #4817 > > │ 00:00:04 verbose #5 > │ 00:06:11 verbose #4818 > > │ 00:00:04 verbose #6 > running 1 test │ 00:06:11 verbose #4819 > > │ 00:00:04 verbose #7 > test module_56522788::Spiral_builder::a ... ok │ 00:06:11 verbose #4820 > > │ 00:00:04 verbose #8 > │ 00:06:11 verbose #4821 > > │ 00:00:04 verbose #9 > successes: │ 00:06:11 verbose #4822 > > │ 00:00:04 verbose #10 > │ 00:06:11 verbose #4823 > > │ 00:00:04 verbose #11 > ---- module_56522788::Spiral_builder::a stdout │ 00:06:11 verbose #4824 > > │ ---- │ 00:06:11 verbose #4825 > > │ 00:00:04 verbosected: "a" │ 00:06:11 verbose #4826 > > │ 00:00:04 verbose #13 > │ 00:06:11 verbose #4827 > > │ 00:00:04 verbose #14 > │ 00:06:11 verbose #4828 > > │ 00:00:04 verbose #15 > successes: │ 00:06:11 verbose #4829 > > │ 00:00:04 verbose #16 > module_56522788::Spiral_builder::a │ 00:06:11 verbose #4830 > > │ 00:00:04 verbose #17 > │ 00:06:11 verbose #4831 > > │ 00:00:04 verbose #18 > test result: ok. 1 passed; 0 failed; 0 ignored; │ 00:06:11 verbose #4832 > > │ 0 measured; 0 filtered out; finished in 0.00s │ 00:06:11 verbose #4833 > > │ 00:00:04 verbose #19 > │ 00:06:11 verbose #4834 > > │ 00:00:04 verbose #20 runtime.execute_with_options / result / { │ 00:06:11 verbose #4835 > > │ exit_code = 0; std_trace_length = 879 } │ 00:06:11 verbose #4836 > > │ __assert_eq / actual: 0 / expected: 0 │ 00:06:11 verbose #4837 > > │ __assert / actual: "test result: ok. 1 passed; 0 failed; 0 ignored;" / │ 00:06:11 verbose #4838 > > │ expected: " Compiling │ 00:06:11 verbose #4839 > > │ spiral_builder_4eccc1786074220707f0458005706cb99abe3f56ece24acbac5e3f03e2475 │ 00:06:11 verbose #4840 > > │ ae0 v0.0.1 │ 00:06:11 verbose #4841 > > │ (C:\home\git\polyglot\target\spiral_builder\spiral_builder\packages\Rust\4ec │ 00:06:11 verbose #4842 > > │ cc1786074220707f0458005706cb99abe3f56ece24acbac5e3f03e2475ae0) │ 00:06:11 verbose #4843 > > │ Finished `test` profile [unoptimized + debuginfo] target(s) in 4.05s[ │ 00:06:11 verbose #4844 > > │ 0m │ 00:06:11 verbose #4845 > > │ Running unittests spiral_builder.rs │ 00:06:11 verbose #4846 > > │ (c:\home\git\polyglot\target\spiral_builder\spiral_builder\target\debug\deps │ 00:06:11 verbose #4847 > > │ \spiral_builder_4eccc1786074220707f0458005706cb99abe3f56ece24acbac5e3f03e247 │ 00:06:11 verbose #4848 > > │ 5ae0-cd2a23b4c1c7d454.exe) │ 00:06:11 verbose #4849 > > │ │ 00:06:11 verbose #4850 > > │ running 1 test │ 00:06:11 verbose #4851 > > │ test module_56522788::Spiral_builder::a ... ok │ 00:06:11 verbose #4852 > > │ │ 00:06:11 verbose #4853 > > │ successes: │ 00:06:11 verbose #4854 > > │ │ 00:06:11 verbose #4855 > > │ ---- module_56522788::Spiral_builder::a stdout ---- │ 00:06:11 verbose #4856 > > │ __assert_eq / actual: "a" / expected: "a" │ 00:06:11 verbose #4857 > > │ │ 00:06:11 verbose #4858 > > │ │ 00:06:11 verbose #4859 > > │ successes: │ 00:06:11 verbose #4860 > > │ module_56522788::Spiral_builder::a │ 00:06:11 verbose #4861 > > │ │ 00:06:11 verbose #4862 > > │ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; │ 00:06:11 verbose #4863 > > │ finished in 0.00s │ 00:06:11 verbose #4864 > > │ " │ 00:06:11 verbose #4865 > > │ │ 00:06:11 verbose #4866 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:06:11 verbose #4867 > > 00:06:11 verbose #4868 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:06:11 verbose #4869 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:06:11 verbose #4870 > > │ ### run_tests │ 00:06:11 verbose #4871 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:06:11 verbose #4872 > > 00:06:11 verbose #4873 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:06:11 verbose #4874 > > inl run_tests tests : () = 00:06:11 verbose #4875 > > real 00:06:11 verbose #4876 > > inl tests = 00:06:11 verbose #4877 > > real_core.record_map 00:06:11 verbose #4878 > > fun { key value } => 00:06:11 verbose #4879 > > (fun _ => value ()) : string -> () 00:06:11 verbose #4880 > > tests 00:06:11 verbose #4881 > > run_tests' `(`tests) tests 00:06:11 verbose #4882 > > 00:06:11 verbose #4883 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:06:11 verbose #4884 > > //// test 00:06:11 verbose #4885 > > ///! rust -d encoding_rs encoding_rs_io 00:06:11 verbose #4886 > > 00:06:11 verbose #4887 > > fun () => 00:06:11 verbose #4888 > > run_tests { 00:06:11 verbose #4889 > > a = fun () => "a" |> _assert_eq "a" 00:06:11 verbose #4890 > > } 00:06:11 verbose #4891 > > |> run 00:06:21 verbose #4892 > > 00:06:21 verbose #4893 > > ╭─[ 9.40s - return value ]─────────────────────────────────────────────────────╮ 00:06:21 verbose #4894 > > │ 00:00:00 debug #1 runtime.execute_with_options / { file_name = │ 00:06:21 verbose #4895 > > │ cargo; arguments = [ │ 00:06:21 verbose #4896 > > │ "test", │ 00:06:21 verbose #4897 > > │ "--", │ 00:06:21 verbose #4898 > > │ "--show-output", │ 00:06:21 verbose #4899 > > │ ]; options = { command = cargo test -- --show-output; cancellation_token = │ 00:06:21 verbose #4900 > > │ None; environment_variables = Array(MutCell([("TEST", "1")])); on_line = │ 00:06:21 verbose #4901 > > │ None; stdin = None; trace = true; working_directory = Some( │ 00:06:21 verbose #4902 > > │ │ 00:06:21 verbose #4903 > > │ "c:\home\git\polyglot\target\spiral_builder\spiral_builder\packages\Rust\4ec │ 00:06:21 verbose #4904 > > │ cc1786074220707f0458005706cb99abe3f56ece24acbac5e3f03e2475ae0", │ 00:06:21 verbose #4905 > > │ ) } } │ 00:06:21 verbose #4906 > > │ 00:00:00 verbose #2 ! Compiling │ 00:06:21 verbose #4907 > > │ spiral_builder_4eccc1786074220707f0458005706cb99abe3f56ece24acbac5e3f03e2475 │ 00:06:21 verbose #4908 > > │ ae0 v0.0.1 │ 00:06:21 verbose #4909 > > │ (C:\home\git\polyglot\target\spiral_builder\spiral_builder\packages\Rust\4ec │ 00:06:21 verbose #4910 > > │ cc1786074220707f0458005706cb99abe3f56ece24acbac5e3f03e2475ae0) │ 00:06:21 verbose #4911 > > │ 00:00:03 verbose #3 ! Finished `test` profile [unoptimized + │ 00:06:21 verbose #4912 > > │ debuginfo] target(s) in 3.04s │ 00:06:21 verbose #4913 > > │ 00:00:03 verbose #4 ! Running unittests spiral_builder.rs │ 00:06:21 verbose #4914 > > │ (c:\home\git\polyglot\target\spiral_builder\spiral_builder\target\debug\deps │ 00:06:21 verbose #4915 > > │ \spiral_builder_4eccc1786074220707f0458005706cb99abe3f56ece24acbac5e3f03e247 │ 00:06:21 verbose #4916 > > │ 5ae0-cd2a23b4c1c7d454.exe) │ 00:06:21 verbose #4917 > > │ 00:00:03 verbose #5 > │ 00:06:21 verbose #4918 > > │ 00:00:03 verbose #6 > running 1 test │ 00:06:21 verbose #4919 > > │ 00:00:03 verbose #7 > test module_56522788::Spiral_builder::a ... ok │ 00:06:21 verbose #4920 > > │ 00:00:03 verbose #8 > │ 00:06:21 verbose #4921 > > │ 00:00:03 verbose #9 > successes: │ 00:06:21 verbose #4922 > > │ 00:00:03 verbose #10 > │ 00:06:21 verbose #4923 > > │ 00:00:03 verbose #11 > ---- module_56522788::Spiral_builder::a stdout │ 00:06:21 verbose #4924 > > │ ---- │ 00:06:21 verbose #4925 > > │ 00:00:03 verbosected: "a" │ 00:06:21 verbose #4926 > > │ 00:00:03 verbose #13 > │ 00:06:21 verbose #4927 > > │ 00:00:03 verbose #14 > │ 00:06:21 verbose #4928 > > │ 00:00:03 verbose #15 > successes: │ 00:06:21 verbose #4929 > > │ 00:00:03 verbose #16 > module_56522788::Spiral_builder::a │ 00:06:21 verbose #4930 > > │ 00:00:03 verbose #17 > │ 00:06:21 verbose #4931 > > │ 00:00:03 verbose #18 > test result: ok. 1 passed; 0 failed; 0 ignored; │ 00:06:21 verbose #4932 > > │ 0 measured; 0 filtered out; finished in 0.00s │ 00:06:21 verbose #4933 > > │ 00:00:03 verbose #19 > │ 00:06:21 verbose #4934 > > │ 00:00:03 verbose #20 runtime.execute_with_options / result / { │ 00:06:21 verbose #4935 > > │ exit_code = 0; std_trace_length = 879 } │ 00:06:21 verbose #4936 > > │ __assert_eq / actual: 0 / expected: 0 │ 00:06:21 verbose #4937 > > │ __assert / actual: "test result: ok. 1 passed; 0 failed; 0 ignored;" / │ 00:06:21 verbose #4938 > > │ expected: " Compiling │ 00:06:21 verbose #4939 > > │ spiral_builder_4eccc1786074220707f0458005706cb99abe3f56ece24acbac5e3f03e2475 │ 00:06:21 verbose #4940 > > │ ae0 v0.0.1 │ 00:06:21 verbose #4941 > > │ (C:\home\git\polyglot\target\spiral_builder\spiral_builder\packages\Rust\4ec │ 00:06:21 verbose #4942 > > │ cc1786074220707f0458005706cb99abe3f56ece24acbac5e3f03e2475ae0) │ 00:06:21 verbose #4943 > > │ Finished `test` profile [unoptimized + debuginfo] target(s) in 3.04s[ │ 00:06:21 verbose #4944 > > │ 0m │ 00:06:21 verbose #4945 > > │ Running unittests spiral_builder.rs │ 00:06:21 verbose #4946 > > │ (c:\home\git\polyglot\target\spiral_builder\spiral_builder\target\debug\deps │ 00:06:21 verbose #4947 > > │ \spiral_builder_4eccc1786074220707f0458005706cb99abe3f56ece24acbac5e3f03e247 │ 00:06:21 verbose #4948 > > │ 5ae0-cd2a23b4c1c7d454.exe) │ 00:06:21 verbose #4949 > > │ │ 00:06:21 verbose #4950 > > │ running 1 test │ 00:06:21 verbose #4951 > > │ test module_56522788::Spiral_builder::a ... ok │ 00:06:21 verbose #4952 > > │ │ 00:06:21 verbose #4953 > > │ successes: │ 00:06:21 verbose #4954 > > │ │ 00:06:21 verbose #4955 > > │ ---- module_56522788::Spiral_builder::a stdout ---- │ 00:06:21 verbose #4956 > > │ __assert_eq / actual: "a" / expected: "a" │ 00:06:21 verbose #4957 > > │ │ 00:06:21 verbose #4958 > > │ │ 00:06:21 verbose #4959 > > │ successes: │ 00:06:21 verbose #4960 > > │ module_56522788::Spiral_builder::a │ 00:06:21 verbose #4961 > > │ │ 00:06:21 verbose #4962 > > │ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; │ 00:06:21 verbose #4963 > > │ finished in 0.00s │ 00:06:21 verbose #4964 > > │ " │ 00:06:21 verbose #4965 > > │ │ 00:06:21 verbose #4966 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:06:21 verbose #4967 > > 00:06:21 verbose #4968 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:06:21 verbose #4969 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:06:21 verbose #4970 > > │ ### run_tests_log │ 00:06:21 verbose #4971 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:06:21 verbose #4972 > > 00:06:21 verbose #4973 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:06:21 verbose #4974 > > inl run_tests_log tests : () = 00:06:21 verbose #4975 > > real 00:06:21 verbose #4976 > > inl tests = 00:06:21 verbose #4977 > > real_core.record_map 00:06:21 verbose #4978 > > fun { key value } => 00:06:21 verbose #4979 > > (fun _ => value false) : () -> () 00:06:21 verbose #4980 > > tests 00:06:21 verbose #4981 > > run_tests `(`tests) tests 00:06:21 verbose #4982 > > 00:06:21 verbose #4983 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:06:21 verbose #4984 > > //// test 00:06:21 verbose #4985 > > ///! rust -d encoding_rs encoding_rs_io 00:06:21 verbose #4986 > > 00:06:21 verbose #4987 > > fun () => 00:06:21 verbose #4988 > > run_tests_log { 00:06:21 verbose #4989 > > a = _assert_eq false 00:06:21 verbose #4990 > > } 00:06:21 verbose #4991 > > |> run 00:06:52 verbose #4992 > > 00:06:52 verbose #4993 > > ╭─[ 30.53s - return value ]────────────────────────────────────────────────────╮ 00:06:52 verbose #4994 > > │ 00:00:00 debug #1 runtime.execute_with_options / { file_name = │ 00:06:52 verbose #4995 > > │ cargo; arguments = [ │ 00:06:52 verbose #4996 > > │ "test", │ 00:06:52 verbose #4997 > > │ "--", │ 00:06:52 verbose #4998 > > │ "--show-output", │ 00:06:52 verbose #4999 > > │ ]; options = { command = cargo test -- --show-output; cancellation_token = │ 00:06:52 verbose #5000 > > │ None; environment_variables = Array(MutCell([("TEST", "1")])); on_line = │ 00:06:52 verbose #5001 > > │ None; stdin = None; trace = true; working_directory = Some( │ 00:06:52 verbose #5002 > > │ │ 00:06:52 verbose #5003 > > │ "c:\home\git\polyglot\target\spiral_builder\spiral_builder\packages\Rust\5a0 │ 00:06:52 verbose #5004 > > │ 997c5c2eae40f0ba6eb6307eabe3997f4e029f7dea650bd53279cad8ecd71", │ 00:06:52 verbose #5005 > > │ ) } } │ 00:06:52 verbose #5006 > > │ 00:00:00 verbose #2 ! Compiling │ 00:06:52 verbose #5007 > > │ spiral_builder_5a0997c5c2eae40f0ba6eb6307eabe3997f4e029f7dea650bd53279cad8ec │ 00:06:52 verbose #5008 > > │ d71 v0.0.1 │ 00:06:52 verbose #5009 > > │ (C:\home\git\polyglot\target\spiral_builder\spiral_builder\packages\Rust\5a0 │ 00:06:52 verbose #5010 > > │ 997c5c2eae40f0ba6eb6307eabe3997f4e029f7dea650bd53279cad8ecd71) │ 00:06:52 verbose #5011 > > │ 00:00:04 verbose #3 ! Finished `test` profile [unoptimized + │ 00:06:52 verbose #5012 > > │ debuginfo] target(s) in 4.21s │ 00:06:52 verbose #5013 > > │ 00:00:04 verbose #4 ! Running unittests spiral_builder.rs │ 00:06:52 verbose #5014 > > │ (c:\home\git\polyglot\target\spiral_builder\spiral_builder\target\debug\deps │ 00:06:52 verbose #5015 > > │ \spiral_builder_5a0997c5c2eae40f0ba6eb6307eabe3997f4e029f7dea650bd53279cad8e │ 00:06:52 verbose #5016 > > │ cd71-c9b08a6a4a3d6ae2.exe) │ 00:06:52 verbose #5017 > > │ 00:00:04 verbose #5 > │ 00:06:52 verbose #5018 > > │ 00:00:04 verbose #6 > running 1 test │ 00:06:52 verbose #5019 > > │ 00:00:04 verbose #7 > test module_c294edd7::Spiral_builder::a ... ok │ 00:06:52 verbose #5020 > > │ 00:00:04 verbose #8 > │ 00:06:52 verbose #5021 > > │ 00:00:04 verbose #9 > successes: │ 00:06:52 verbose #5022 > > │ 00:00:04 verbose #10 > │ 00:06:52 verbose #5023 > > │ 00:00:04 verbose #11 > ---- module_c294edd7::Spiral_builder::a stdout │ 00:06:52 verbose #5024 > > │ ---- │ 00:06:52 verbose #5025 > > │ 00:00:04 verbosealse │ 00:06:52 verbose #5026 > > │ 00:00:04 verbose #13 > │ 00:06:52 verbose #5027 > > │ 00:00:04 verbose #14 > │ 00:06:52 verbose #5028 > > │ 00:00:04 verbose #15 > successes: │ 00:06:52 verbose #5029 > > │ 00:00:04 verbose #16 > module_c294edd7::Spiral_builder::a │ 00:06:52 verbose #5030 > > │ 00:00:04 verbose #17 > │ 00:06:52 verbose #5031 > > │ 00:00:04 verbose #18 > test result: ok. 1 passed; 0 failed; 0 ignored; │ 00:06:52 verbose #5032 > > │ 0 measured; 0 filtered out; finished in 0.00s │ 00:06:52 verbose #5033 > > │ 00:00:04 verbose #19 > │ 00:06:52 verbose #5034 > > │ 00:00:04 verbose #20 runtime.execute_with_options / result / { │ 00:06:52 verbose #5035 > > │ exit_code = 0; std_trace_length = 883 } │ 00:06:52 verbose #5036 > > │ __assert_eq / actual: 0 / expected: 0 │ 00:06:52 verbose #5037 > > │ __assert / actual: "test result: ok. 1 passed; 0 failed; 0 ignored;" / │ 00:06:52 verbose #5038 > > │ expected: " Compiling │ 00:06:52 verbose #5039 > > │ spiral_builder_5a0997c5c2eae40f0ba6eb6307eabe3997f4e029f7dea650bd53279cad8ec │ 00:06:52 verbose #5040 > > │ d71 v0.0.1 │ 00:06:52 verbose #5041 > > │ (C:\home\git\polyglot\target\spiral_builder\spiral_builder\packages\Rust\5a0 │ 00:06:52 verbose #5042 > > │ 997c5c2eae40f0ba6eb6307eabe3997f4e029f7dea650bd53279cad8ecd71) │ 00:06:52 verbose #5043 > > │ Finished `test` profile [unoptimized + debuginfo] target(s) in 4.21s[ │ 00:06:52 verbose #5044 > > │ 0m │ 00:06:52 verbose #5045 > > │ Running unittests spiral_builder.rs │ 00:06:52 verbose #5046 > > │ (c:\home\git\polyglot\target\spiral_builder\spiral_builder\target\debug\deps │ 00:06:52 verbose #5047 > > │ \spiral_builder_5a0997c5c2eae40f0ba6eb6307eabe3997f4e029f7dea650bd53279cad8e │ 00:06:52 verbose #5048 > > │ cd71-c9b08a6a4a3d6ae2.exe) │ 00:06:52 verbose #5049 > > │ │ 00:06:52 verbose #5050 > > │ running 1 test │ 00:06:52 verbose #5051 > > │ test module_c294edd7::Spiral_builder::a ... ok │ 00:06:52 verbose #5052 > > │ │ 00:06:52 verbose #5053 > > │ successes: │ 00:06:52 verbose #5054 > > │ │ 00:06:52 verbose #5055 > > │ ---- module_c294edd7::Spiral_builder::a stdout ---- │ 00:06:52 verbose #5056 > > │ __assert_eq / actual: false / expected: false │ 00:06:52 verbose #5057 > > │ │ 00:06:52 verbose #5058 > > │ │ 00:06:52 verbose #5059 > > │ successes: │ 00:06:52 verbose #5060 > > │ module_c294edd7::Spiral_builder::a │ 00:06:52 verbose #5061 > > │ │ 00:06:52 verbose #5062 > > │ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; │ 00:06:52 verbose #5063 > > │ finished in 0.00s │ 00:06:52 verbose #5064 > > │ " │ 00:06:52 verbose #5065 > > │ │ 00:06:52 verbose #5066 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:06:52 verbose #5067 > 00:01:20 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 22169 } 00:06:52 verbose #5068 > 00:01:20 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:06:52 verbose #5069 > "nbconvert", 00:06:52 verbose #5070 > "c:/home/git/polyglot/lib/spiral/rust/testing.dib.ipynb", 00:06:52 verbose #5071 > "--to", 00:06:52 verbose #5072 > "html", 00:06:52 verbose #5073 > "--HTMLExporter.theme=dark", 00:06:52 verbose #5074 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/rust/testing.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:06:54 verbose #5075 > 00:01:23 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/rust/testing.dib.ipynb to html 00:06:54 verbose #5076 > 00:01:23 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:06:54 verbose #5077 > 00:01:23 verbose #7 ! validate(nb) 00:06:55 verbose #5078 > 00:01:24 verbose #8 ! [NbConvertApp] Writing 298267 bytes to c:\home\git\polyglot\lib\spiral\rust\testing.dib.html 00:06:56 verbose #5079 > 00:01:24 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 655 } 00:06:56 verbose #5080 > 00:01:24 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 655 } 00:06:56 verbose #5081 > 00:01:24 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:06:56 verbose #5082 > "-c", 00:06:56 verbose #5083 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/rust/testing.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:06:56 verbose #5084 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/rust/testing.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:06:56 verbose #5085 > 00:01:25 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:06:56 verbose #5086 > 00:01:25 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:06:56 verbose #5087 > 00:01:25 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 22883 } 00:06:56 debug #5088 runtime.execute_with_options_async / { exit_code = 0; output_length = 26295 } 00:06:56 debug #4 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path rust/testing.dib --retries 3 00:06:56 debug #5089 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path rust/near.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:06:56 verbose #5090 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "rust/near.dib", "--retries", "3"])) } 00:06:56 verbose #5091 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:06:56 verbose #5092 > "repl", 00:06:56 verbose #5093 > "--exit-after-run", 00:06:56 verbose #5094 > "--run", 00:06:56 verbose #5095 > "c:/home/git/polyglot/lib/spiral/rust/near.dib", 00:06:56 verbose #5096 > "--output-path", 00:06:56 verbose #5097 > "c:/home/git/polyglot/lib/spiral/rust/near.dib.ipynb", 00:06:56 verbose #5098 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/rust/near.dib" --output-path "c:/home/git/polyglot/lib/spiral/rust/near.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:06:58 verbose #5099 > > 00:06:58 verbose #5100 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:06:58 verbose #5101 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:06:58 verbose #5102 > > │ # near │ 00:06:58 verbose #5103 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:02 verbose #5104 > > 00:07:02 verbose #5105 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:02 verbose #5106 > > open rust 00:07:02 verbose #5107 > > open rust.rust_operators 00:07:03 verbose #5108 > > 00:07:03 verbose #5109 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:03 verbose #5110 > > //// test 00:07:03 verbose #5111 > > 00:07:03 verbose #5112 > > open testing 00:07:04 verbose #5113 > > 00:07:04 verbose #5114 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:04 verbose #5115 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:04 verbose #5116 > > │ ## near │ 00:07:04 verbose #5117 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:04 verbose #5118 > > 00:07:04 verbose #5119 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:04 verbose #5120 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:04 verbose #5121 > > │ ### vector │ 00:07:04 verbose #5122 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:04 verbose #5123 > > 00:07:04 verbose #5124 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:04 verbose #5125 > > nominal vector t = 00:07:04 verbose #5126 > > `( 00:07:04 verbose #5127 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:07:04 verbose #5128 > > Fable.Core.Emit(\"near_sdk::store::vec::Vector<$0>\")>]]\n#endif\ntype 00:07:04 verbose #5129 > > near_sdk_store_vec_Vector<'T> = class end" 00:07:04 verbose #5130 > > $'' : $'near_sdk_store_vec_Vector<`t>' 00:07:04 verbose #5131 > > ) 00:07:04 verbose #5132 > > 00:07:04 verbose #5133 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:04 verbose #5134 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:04 verbose #5135 > > │ ### lookup_map │ 00:07:04 verbose #5136 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:04 verbose #5137 > > 00:07:04 verbose #5138 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:04 verbose #5139 > > nominal lookup_map k v = 00:07:04 verbose #5140 > > `( 00:07:04 verbose #5141 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:07:04 verbose #5142 > > Fable.Core.Emit(\"near_sdk::store::LookupMap<$0, $1>\")>]]\n#endif\ntype 00:07:04 verbose #5143 > > near_sdk_store_LookupMap<'K, 'V> = class end" 00:07:04 verbose #5144 > > $'' : $'near_sdk_store_LookupMap<`k, `v>' 00:07:04 verbose #5145 > > ) 00:07:05 verbose #5146 > > 00:07:05 verbose #5147 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:05 verbose #5148 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:05 verbose #5149 > > │ ### account_id │ 00:07:05 verbose #5150 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:05 verbose #5151 > > 00:07:05 verbose #5152 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:05 verbose #5153 > > nominal account_id = 00:07:05 verbose #5154 > > `( 00:07:05 verbose #5155 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:07:05 verbose #5156 > > Fable.Core.Emit(\"near_sdk::AccountId\")>]]\n#endif\ntype near_sdk_AccountId = 00:07:05 verbose #5157 > > class end" 00:07:05 verbose #5158 > > $'' : $'near_sdk_AccountId' 00:07:05 verbose #5159 > > ) 00:07:05 verbose #5160 > > 00:07:05 verbose #5161 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:05 verbose #5162 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:05 verbose #5163 > > │ ### new_lookup_map │ 00:07:05 verbose #5164 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:05 verbose #5165 > > 00:07:05 verbose #5166 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:05 verbose #5167 > > inl new_lookup_map prefix = 00:07:05 verbose #5168 > > !\($'"near_sdk::store::LookupMap::new(!prefix)"') 00:07:06 verbose #5169 > > 00:07:06 verbose #5170 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:06 verbose #5171 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:06 verbose #5172 > > │ ### new_vector │ 00:07:06 verbose #5173 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:06 verbose #5174 > > 00:07:06 verbose #5175 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:06 verbose #5176 > > inl new_vector prefix = 00:07:06 verbose #5177 > > !\($'"near_sdk::store::vec::Vector::new(!prefix)"') 00:07:06 verbose #5178 > > 00:07:06 verbose #5179 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:06 verbose #5180 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:06 verbose #5181 > > │ ### log │ 00:07:06 verbose #5182 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:06 verbose #5183 > > 00:07:06 verbose #5184 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:06 verbose #5185 > > inl log text : () = 00:07:06 verbose #5186 > > (!\\(text, $'$"true; near_sdk::log\!(\\\"{{}}\\\", $0)"') : bool) |> ignore 00:07:07 verbose #5187 > > 00:07:07 verbose #5188 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:07 verbose #5189 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:07 verbose #5190 > > │ ### panic_str │ 00:07:07 verbose #5191 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:07 verbose #5192 > > 00:07:07 verbose #5193 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:07 verbose #5194 > > inl panic_str (text : string) : () = 00:07:07 verbose #5195 > > (!\\(text, $'$"true; near_sdk::env::panic_str(&*$0); //"') : bool) |> ignore 00:07:07 verbose #5196 > > 00:07:07 verbose #5197 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:07 verbose #5198 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:07 verbose #5199 > > │ ### lookup_get │ 00:07:07 verbose #5200 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:07 verbose #5201 > > 00:07:07 verbose #5202 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:07 verbose #5203 > > inl lookup_get forall k v. 00:07:07 verbose #5204 > > (key : k) 00:07:07 verbose #5205 > > (map : rust.ref (rust.mut' (lookup_map k v))) 00:07:07 verbose #5206 > > : optionm'.option' (rust.ref v) 00:07:07 verbose #5207 > > = 00:07:07 verbose #5208 > > !\\(key, $'$"!map.get(&$0)"') 00:07:07 verbose #5209 > > 00:07:07 verbose #5210 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:07 verbose #5211 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:07 verbose #5212 > > │ ### lookup_insert │ 00:07:07 verbose #5213 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:07 verbose #5214 > > 00:07:07 verbose #5215 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:07 verbose #5216 > > inl lookup_insert forall k v. 00:07:07 verbose #5217 > > (key : k) 00:07:07 verbose #5218 > > (value : v) 00:07:07 verbose #5219 > > (map : rust.ref (rust.mut' (lookup_map k v))) 00:07:07 verbose #5220 > > : () 00:07:07 verbose #5221 > > = 00:07:07 verbose #5222 > > (!\\((key, value), $'$"true; !map.insert(&$0, $1); //"') : bool) |> ignore 00:07:08 verbose #5223 > > 00:07:08 verbose #5224 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:08 verbose #5225 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:08 verbose #5226 > > │ ### near_token │ 00:07:08 verbose #5227 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:08 verbose #5228 > > 00:07:08 verbose #5229 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:08 verbose #5230 > > nominal near_token = 00:07:08 verbose #5231 > > `( 00:07:08 verbose #5232 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:07:08 verbose #5233 > > Fable.Core.Emit(\"near_token::NearToken\")>]]\n#endif\ntype near_token_NearToken 00:07:08 verbose #5234 > > = class end" 00:07:08 verbose #5235 > > $'' : $'near_token_NearToken' 00:07:08 verbose #5236 > > ) 00:07:08 verbose #5237 > > 00:07:08 verbose #5238 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:08 verbose #5239 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:08 verbose #5240 > > │ ### near_token_sdk │ 00:07:08 verbose #5241 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:08 verbose #5242 > > 00:07:08 verbose #5243 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:08 verbose #5244 > > nominal near_token_sdk = 00:07:08 verbose #5245 > > `( 00:07:08 verbose #5246 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:07:08 verbose #5247 > > Fable.Core.Emit(\"near_sdk::NearToken\")>]]\n#endif\ntype near_sdk_NearToken = 00:07:08 verbose #5248 > > class end" 00:07:08 verbose #5249 > > $'' : $'near_sdk_NearToken' 00:07:08 verbose #5250 > > ) 00:07:09 verbose #5251 > > 00:07:09 verbose #5252 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:09 verbose #5253 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:09 verbose #5254 > > │ ### random_seed │ 00:07:09 verbose #5255 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:09 verbose #5256 > > 00:07:09 verbose #5257 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:09 verbose #5258 > > inl random_seed () : am'.vec u8 = 00:07:09 verbose #5259 > > !\($'$"near_sdk::env::random_seed()"') 00:07:09 verbose #5260 > > 00:07:09 verbose #5261 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:09 verbose #5262 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:09 verbose #5263 > > │ ### block_timestamp │ 00:07:09 verbose #5264 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:09 verbose #5265 > > 00:07:09 verbose #5266 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:09 verbose #5267 > > inl block_timestamp () : u64 = 00:07:09 verbose #5268 > > !\($'$"near_sdk::env::block_timestamp()"') 00:07:10 verbose #5269 > > 00:07:10 verbose #5270 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:10 verbose #5271 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:10 verbose #5272 > > │ ### block_height │ 00:07:10 verbose #5273 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:10 verbose #5274 > > 00:07:10 verbose #5275 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:10 verbose #5276 > > inl block_height () : u64 = 00:07:10 verbose #5277 > > !\($'$"near_sdk::env::block_height()"') 00:07:10 verbose #5278 > > 00:07:10 verbose #5279 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:10 verbose #5280 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:10 verbose #5281 > > │ ### epoch_height │ 00:07:10 verbose #5282 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:10 verbose #5283 > > 00:07:10 verbose #5284 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:10 verbose #5285 > > inl epoch_height () : u64 = 00:07:10 verbose #5286 > > !\($'$"near_sdk::env::epoch_height()"') 00:07:10 verbose #5287 > > 00:07:10 verbose #5288 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:10 verbose #5289 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:10 verbose #5290 > > │ ### account_balance │ 00:07:10 verbose #5291 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:10 verbose #5292 > > 00:07:10 verbose #5293 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:10 verbose #5294 > > inl account_balance () : near_token = 00:07:10 verbose #5295 > > !\($'$"near_sdk::env::account_balance()"') 00:07:11 verbose #5296 > > 00:07:11 verbose #5297 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:11 verbose #5298 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:11 verbose #5299 > > │ ### signer_account_id │ 00:07:11 verbose #5300 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:11 verbose #5301 > > 00:07:11 verbose #5302 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:11 verbose #5303 > > inl signer_account_id () : account_id = 00:07:11 verbose #5304 > > !\($'$"near_sdk::env::signer_account_id()"') 00:07:11 verbose #5305 > > 00:07:11 verbose #5306 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:11 verbose #5307 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:11 verbose #5308 > > │ ### as_yoctonear │ 00:07:11 verbose #5309 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:11 verbose #5310 > > 00:07:11 verbose #5311 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:11 verbose #5312 > > inl as_yoctonear forall t. (gas : t) : rust.u128 = 00:07:11 verbose #5313 > > !\\(gas, $'"$0.as_yoctonear()"') 00:07:12 verbose #5314 > > 00:07:12 verbose #5315 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:12 verbose #5316 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:12 verbose #5317 > > │ ### near_price_in_usd │ 00:07:12 verbose #5318 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:12 verbose #5319 > > 00:07:12 verbose #5320 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:12 verbose #5321 > > inl near_price_in_usd () = 00:07:12 verbose #5322 > > 6.68f64 00:07:12 verbose #5323 > > 00:07:12 verbose #5324 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:12 verbose #5325 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:12 verbose #5326 > > │ ### gas_to_usd │ 00:07:12 verbose #5327 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:12 verbose #5328 > > 00:07:12 verbose #5329 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:12 verbose #5330 > > inl gas_to_usd (gas : u64) = 00:07:12 verbose #5331 > > (gas |> f64) / 10_000_000_000_000_000 * near_price_in_usd () 00:07:13 verbose #5332 > > 00:07:13 verbose #5333 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:13 verbose #5334 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:13 verbose #5335 > > │ ### tokens_to_usd │ 00:07:13 verbose #5336 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:13 verbose #5337 > > 00:07:13 verbose #5338 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:13 verbose #5339 > > inl tokens_to_usd (tokens : rust.u128) = 00:07:13 verbose #5340 > > (tokens |> rust.f64) / 1_000_000_000_000_000_000_000_000 * near_price_in_usd 00:07:13 verbose #5341 > > () 00:07:13 verbose #5342 > 00:00:17 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 12173 } 00:07:13 verbose #5343 > 00:00:17 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:07:13 verbose #5344 > "nbconvert", 00:07:13 verbose #5345 > "c:/home/git/polyglot/lib/spiral/rust/near.dib.ipynb", 00:07:13 verbose #5346 > "--to", 00:07:13 verbose #5347 > "html", 00:07:13 verbose #5348 > "--HTMLExporter.theme=dark", 00:07:13 verbose #5349 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/rust/near.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:07:15 verbose #5350 > 00:00:19 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/rust/near.dib.ipynb to html 00:07:15 verbose #5351 > 00:00:19 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:07:15 verbose #5352 > 00:00:19 verbose #7 ! validate(nb) 00:07:17 verbose #5353 > 00:00:20 verbose #8 ! [NbConvertApp] Writing 306383 bytes to c:\home\git\polyglot\lib\spiral\rust\near.dib.html 00:07:17 verbose #5354 > 00:00:20 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 649 } 00:07:17 verbose #5355 > 00:00:20 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 649 } 00:07:17 verbose #5356 > 00:00:20 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:07:17 verbose #5357 > "-c", 00:07:17 verbose #5358 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/rust/near.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:07:17 verbose #5359 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/rust/near.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:07:17 verbose #5360 > 00:00:21 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:07:17 verbose #5361 > 00:00:21 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:07:17 verbose #5362 > 00:00:21 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 12881 } 00:07:17 debug #5363 runtime.execute_with_options_async / { exit_code = 0; output_length = 16072 } 00:07:17 debug #5 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path rust/near.dib --retries 3 00:07:17 debug #5364 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path rust/near_workspaces.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:07:17 verbose #5365 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "rust/near_workspaces.dib", "--retries", "3"])) } 00:07:17 verbose #5366 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:07:17 verbose #5367 > "repl", 00:07:17 verbose #5368 > "--exit-after-run", 00:07:17 verbose #5369 > "--run", 00:07:17 verbose #5370 > "c:/home/git/polyglot/lib/spiral/rust/near_workspaces.dib", 00:07:17 verbose #5371 > "--output-path", 00:07:17 verbose #5372 > "c:/home/git/polyglot/lib/spiral/rust/near_workspaces.dib.ipynb", 00:07:17 verbose #5373 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/rust/near_workspaces.dib" --output-path "c:/home/git/polyglot/lib/spiral/rust/near_workspaces.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:07:20 verbose #5374 > > 00:07:20 verbose #5375 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:20 verbose #5376 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:20 verbose #5377 > > │ # near_workspaces │ 00:07:20 verbose #5378 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:23 verbose #5379 > > 00:07:23 verbose #5380 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:23 verbose #5381 > > open rust 00:07:23 verbose #5382 > > open rust.rust_operators 00:07:25 verbose #5383 > > 00:07:25 verbose #5384 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:25 verbose #5385 > > //// test 00:07:25 verbose #5386 > > 00:07:25 verbose #5387 > > open testing 00:07:25 verbose #5388 > > 00:07:25 verbose #5389 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:25 verbose #5390 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:25 verbose #5391 > > │ ## near │ 00:07:25 verbose #5392 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:25 verbose #5393 > > 00:07:25 verbose #5394 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:25 verbose #5395 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:25 verbose #5396 > > │ ### near_token_workspaces │ 00:07:25 verbose #5397 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:25 verbose #5398 > > 00:07:25 verbose #5399 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:25 verbose #5400 > > nominal near_token_workspaces = 00:07:25 verbose #5401 > > `( 00:07:25 verbose #5402 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:07:25 verbose #5403 > > Fable.Core.Emit(\"near_workspaces::types::NearToken\")>]]\n#endif\ntype 00:07:25 verbose #5404 > > near_workspaces_types_NearToken = class end" 00:07:25 verbose #5405 > > $'' : $'near_workspaces_types_NearToken' 00:07:25 verbose #5406 > > ) 00:07:26 verbose #5407 > > 00:07:26 verbose #5408 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:26 verbose #5409 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:26 verbose #5410 > > │ ### gas │ 00:07:26 verbose #5411 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:26 verbose #5412 > > 00:07:26 verbose #5413 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:26 verbose #5414 > > nominal gas = 00:07:26 verbose #5415 > > `( 00:07:26 verbose #5416 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:07:26 verbose #5417 > > Fable.Core.Emit(\"near_workspaces::types::Gas\")>]]\n#endif\ntype 00:07:26 verbose #5418 > > near_workspaces_types_Gas = class end" 00:07:26 verbose #5419 > > $'' : $'near_workspaces_types_Gas' 00:07:26 verbose #5420 > > ) 00:07:26 verbose #5421 > > 00:07:26 verbose #5422 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:26 verbose #5423 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:26 verbose #5424 > > │ ### near_workspaces_error │ 00:07:26 verbose #5425 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:26 verbose #5426 > > 00:07:26 verbose #5427 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:26 verbose #5428 > > nominal near_workspaces_error = 00:07:26 verbose #5429 > > `( 00:07:26 verbose #5430 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:07:26 verbose #5431 > > Fable.Core.Emit(\"near_workspaces::error::Error\")>]]\n#endif\ntype 00:07:26 verbose #5432 > > near_workspaces_error_Error = class end" 00:07:26 verbose #5433 > > $'' : $'near_workspaces_error_Error' 00:07:26 verbose #5434 > > ) 00:07:27 verbose #5435 > > 00:07:27 verbose #5436 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:27 verbose #5437 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:27 verbose #5438 > > │ ### sandbox │ 00:07:27 verbose #5439 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:27 verbose #5440 > > 00:07:27 verbose #5441 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:27 verbose #5442 > > nominal sandbox = 00:07:27 verbose #5443 > > `( 00:07:27 verbose #5444 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:07:27 verbose #5445 > > Fable.Core.Emit(\"near_workspaces::network::Sandbox\")>]]\n#endif\ntype 00:07:27 verbose #5446 > > near_workspaces_network_Sandbox = class end" 00:07:27 verbose #5447 > > $'' : $'near_workspaces_network_Sandbox' 00:07:27 verbose #5448 > > ) 00:07:27 verbose #5449 > > 00:07:27 verbose #5450 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:27 verbose #5451 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:27 verbose #5452 > > │ ### worker │ 00:07:27 verbose #5453 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:27 verbose #5454 > > 00:07:27 verbose #5455 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:27 verbose #5456 > > nominal worker t = 00:07:27 verbose #5457 > > `( 00:07:27 verbose #5458 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:07:27 verbose #5459 > > Fable.Core.Emit(\"near_workspaces::Worker<$0>\")>]]\n#endif\ntype 00:07:27 verbose #5460 > > near_workspaces_Worker<'T> = class end" 00:07:27 verbose #5461 > > $'' : $'near_workspaces_Worker<`t>' 00:07:27 verbose #5462 > > ) 00:07:27 verbose #5463 > > 00:07:27 verbose #5464 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:27 verbose #5465 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:27 verbose #5466 > > │ ### contract │ 00:07:27 verbose #5467 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:27 verbose #5468 > > 00:07:27 verbose #5469 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:27 verbose #5470 > > nominal contract = 00:07:27 verbose #5471 > > `( 00:07:27 verbose #5472 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:07:27 verbose #5473 > > Fable.Core.Emit(\"near_workspaces::Contract\")>]]\n#endif\ntype 00:07:27 verbose #5474 > > near_workspaces_Contract = class end" 00:07:27 verbose #5475 > > $'' : $'near_workspaces_Contract' 00:07:27 verbose #5476 > > ) 00:07:28 verbose #5477 > > 00:07:28 verbose #5478 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:28 verbose #5479 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:28 verbose #5480 > > │ ### call_transaction │ 00:07:28 verbose #5481 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:28 verbose #5482 > > 00:07:28 verbose #5483 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:28 verbose #5484 > > nominal call_transaction = 00:07:28 verbose #5485 > > `( 00:07:28 verbose #5486 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:07:28 verbose #5487 > > Fable.Core.Emit(\"near_workspaces::operations::CallTransaction\")>]]\n#endif\nty 00:07:28 verbose #5488 > > pe near_workspaces_operations_CallTransaction = class end" 00:07:28 verbose #5489 > > $'' : $'near_workspaces_operations_CallTransaction' 00:07:28 verbose #5490 > > ) 00:07:28 verbose #5491 > > 00:07:28 verbose #5492 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:28 verbose #5493 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:28 verbose #5494 > > │ ### execution_final_result │ 00:07:28 verbose #5495 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:28 verbose #5496 > > 00:07:28 verbose #5497 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:28 verbose #5498 > > nominal execution_final_result = 00:07:28 verbose #5499 > > `( 00:07:28 verbose #5500 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:07:28 verbose #5501 > > Fable.Core.Emit(\"near_workspaces::result::ExecutionFinalResult\")>]]\n#endif\nt 00:07:28 verbose #5502 > > ype near_workspaces_result_ExecutionFinalResult = class end" 00:07:28 verbose #5503 > > $'' : $'near_workspaces_result_ExecutionFinalResult' 00:07:28 verbose #5504 > > ) 00:07:29 verbose #5505 > > 00:07:29 verbose #5506 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:29 verbose #5507 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:29 verbose #5508 > > │ ### execution_result │ 00:07:29 verbose #5509 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:29 verbose #5510 > > 00:07:29 verbose #5511 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:29 verbose #5512 > > nominal execution_result t = 00:07:29 verbose #5513 > > `( 00:07:29 verbose #5514 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:07:29 verbose #5515 > > Fable.Core.Emit(\"near_workspaces::result::ExecutionResult<$0>\")>]]\n#endif\nty 00:07:29 verbose #5516 > > pe near_workspaces_result_ExecutionResult<'T> = class end" 00:07:29 verbose #5517 > > $'' : $'near_workspaces_result_ExecutionResult<`t>' 00:07:29 verbose #5518 > > ) 00:07:29 verbose #5519 > > 00:07:29 verbose #5520 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:29 verbose #5521 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:29 verbose #5522 > > │ ### execution_success │ 00:07:29 verbose #5523 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:29 verbose #5524 > > 00:07:29 verbose #5525 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:29 verbose #5526 > > nominal execution_success = 00:07:29 verbose #5527 > > `( 00:07:29 verbose #5528 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:07:29 verbose #5529 > > Fable.Core.Emit(\"near_workspaces::result::ExecutionSuccess\")>]]\n#endif\ntype 00:07:29 verbose #5530 > > near_workspaces_result_ExecutionSuccess = class end" 00:07:29 verbose #5531 > > $'' : $'near_workspaces_result_ExecutionSuccess' 00:07:29 verbose #5532 > > ) 00:07:29 verbose #5533 > > 00:07:29 verbose #5534 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:29 verbose #5535 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:29 verbose #5536 > > │ ### execution_failure │ 00:07:29 verbose #5537 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:29 verbose #5538 > > 00:07:29 verbose #5539 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:29 verbose #5540 > > nominal execution_failure = 00:07:29 verbose #5541 > > `( 00:07:29 verbose #5542 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:07:29 verbose #5543 > > Fable.Core.Emit(\"near_workspaces::result::ExecutionFailure\")>]]\n#endif\ntype 00:07:29 verbose #5544 > > near_workspaces_result_ExecutionFailure = class end" 00:07:29 verbose #5545 > > $'' : $'near_workspaces_result_ExecutionFailure' 00:07:29 verbose #5546 > > ) 00:07:30 verbose #5547 > > 00:07:30 verbose #5548 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:30 verbose #5549 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:30 verbose #5550 > > │ ### execution_outcome │ 00:07:30 verbose #5551 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:30 verbose #5552 > > 00:07:30 verbose #5553 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:30 verbose #5554 > > nominal execution_outcome = 00:07:30 verbose #5555 > > `( 00:07:30 verbose #5556 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:07:30 verbose #5557 > > Fable.Core.Emit(\"near_workspaces::result::ExecutionOutcome\")>]]\n#endif\ntype 00:07:30 verbose #5558 > > near_workspaces_result_ExecutionOutcome = class end" 00:07:30 verbose #5559 > > $'' : $'near_workspaces_result_ExecutionOutcome' 00:07:30 verbose #5560 > > ) 00:07:30 verbose #5561 > > 00:07:30 verbose #5562 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:30 verbose #5563 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:30 verbose #5564 > > │ ### sandbox_worker │ 00:07:30 verbose #5565 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:30 verbose #5566 > > 00:07:30 verbose #5567 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:30 verbose #5568 > > inl sandbox_worker () : resultm.result' (worker sandbox) near_workspaces_error = 00:07:30 verbose #5569 > > !\($'"near_workspaces::sandbox().await"') 00:07:31 verbose #5570 > > 00:07:31 verbose #5571 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:31 verbose #5572 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:31 verbose #5573 > > │ ### dev_deploy │ 00:07:31 verbose #5574 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:31 verbose #5575 > > 00:07:31 verbose #5576 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:31 verbose #5577 > > inl dev_deploy 00:07:31 verbose #5578 > > (wasm : am'.vec u8) 00:07:31 verbose #5579 > > (worker : worker sandbox) 00:07:31 verbose #5580 > > : async.future_pin (resultm.result' contract near_workspaces_error) 00:07:31 verbose #5581 > > = 00:07:31 verbose #5582 > > !\\((worker, wasm), $'"Box::pin($0.dev_deploy(&$1))"') 00:07:31 verbose #5583 > > 00:07:31 verbose #5584 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:31 verbose #5585 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:31 verbose #5586 > > │ ### call │ 00:07:31 verbose #5587 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:31 verbose #5588 > > 00:07:31 verbose #5589 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:31 verbose #5590 > > inl call (fn_name : string) (contract : contract) : call_transaction = 00:07:31 verbose #5591 > > !\\((contract, fn_name), $'"$0.call(&*$1)"') 00:07:32 verbose #5592 > > 00:07:32 verbose #5593 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:32 verbose #5594 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:32 verbose #5595 > > │ ### transact │ 00:07:32 verbose #5596 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:32 verbose #5597 > > 00:07:32 verbose #5598 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:32 verbose #5599 > > inl transact 00:07:32 verbose #5600 > > (call : call_transaction) 00:07:32 verbose #5601 > > : async.future_pin (resultm.result' execution_final_result 00:07:32 verbose #5602 > > near_workspaces_error) 00:07:32 verbose #5603 > > = 00:07:32 verbose #5604 > > !\($'"Box::pin(!call.transact())"') 00:07:32 verbose #5605 > > 00:07:32 verbose #5606 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:32 verbose #5607 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:32 verbose #5608 > > │ ### logs │ 00:07:32 verbose #5609 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:32 verbose #5610 > > 00:07:32 verbose #5611 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:32 verbose #5612 > > inl logs (result : execution_final_result) : am'.vec (rust.ref sm'.str) = 00:07:32 verbose #5613 > > !\($'"!result.logs()"') 00:07:33 verbose #5614 > > 00:07:33 verbose #5615 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:33 verbose #5616 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:33 verbose #5617 > > │ ### into_result │ 00:07:33 verbose #5618 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:33 verbose #5619 > > 00:07:33 verbose #5620 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:33 verbose #5621 > > inl into_result 00:07:33 verbose #5622 > > (result : execution_final_result) 00:07:33 verbose #5623 > > : resultm.result' execution_success execution_failure 00:07:33 verbose #5624 > > = 00:07:33 verbose #5625 > > !\\(result, $'"$0.into_result()"') 00:07:33 verbose #5626 > > 00:07:33 verbose #5627 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:33 verbose #5628 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:33 verbose #5629 > > │ ### receipt_failures │ 00:07:33 verbose #5630 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:33 verbose #5631 > > 00:07:33 verbose #5632 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:33 verbose #5633 > > inl receipt_failures (result : execution_final_result) : am'.vec (rust.ref 00:07:33 verbose #5634 > > execution_outcome) = 00:07:33 verbose #5635 > > inl result = join result 00:07:33 verbose #5636 > > !\($'"!result.receipt_failures()"') 00:07:33 verbose #5637 > > 00:07:33 verbose #5638 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:33 verbose #5639 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:33 verbose #5640 > > │ ### receipt_outcomes │ 00:07:33 verbose #5641 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:33 verbose #5642 > > 00:07:33 verbose #5643 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:33 verbose #5644 > > inl receipt_outcomes (result : execution_final_result) : am'.vec 00:07:33 verbose #5645 > > execution_outcome = 00:07:33 verbose #5646 > > inl result = join result 00:07:33 verbose #5647 > > inl result : rust.ref (am'.slice execution_outcome) = 00:07:33 verbose #5648 > > !\($'"!result.receipt_outcomes()"') 00:07:33 verbose #5649 > > result |> rust.into 00:07:34 verbose #5650 > > 00:07:34 verbose #5651 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:34 verbose #5652 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:34 verbose #5653 > > │ ### json │ 00:07:34 verbose #5654 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:34 verbose #5655 > > 00:07:34 verbose #5656 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:34 verbose #5657 > > inl json (result : execution_final_result) : resultm.result' sm'.std_string 00:07:34 verbose #5658 > > near_workspaces_error = 00:07:34 verbose #5659 > > !\\(result, $'"$0.json()"') 00:07:34 verbose #5660 > > 00:07:34 verbose #5661 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:34 verbose #5662 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:34 verbose #5663 > > │ ### borsh │ 00:07:34 verbose #5664 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:34 verbose #5665 > > 00:07:34 verbose #5666 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:34 verbose #5667 > > inl borsh (result : execution_final_result) : resultm.result' sm'.std_string 00:07:34 verbose #5668 > > near_workspaces_error = 00:07:34 verbose #5669 > > !\\(result, $'"$0.borsh()"') 00:07:35 verbose #5670 > > 00:07:35 verbose #5671 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:35 verbose #5672 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:35 verbose #5673 > > │ ### total_gas_burnt │ 00:07:35 verbose #5674 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:35 verbose #5675 > > 00:07:35 verbose #5676 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:35 verbose #5677 > > inl total_gas_burnt (result : execution_final_result) : gas = 00:07:35 verbose #5678 > > !\\(result, $'"$0.total_gas_burnt"') 00:07:35 verbose #5679 > > 00:07:35 verbose #5680 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:35 verbose #5681 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:35 verbose #5682 > > │ ### as_gas │ 00:07:35 verbose #5683 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:35 verbose #5684 > > 00:07:35 verbose #5685 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:35 verbose #5686 > > inl as_gas (gas : gas) : u64 = 00:07:35 verbose #5687 > > !\\(gas, $'"$0.as_gas()"') 00:07:36 verbose #5688 > > 00:07:36 verbose #5689 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:36 verbose #5690 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:36 verbose #5691 > > │ ### outcomes │ 00:07:36 verbose #5692 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:36 verbose #5693 > > 00:07:36 verbose #5694 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:36 verbose #5695 > > inl outcomes (result : execution_final_result) : am'.vec (rust.ref 00:07:36 verbose #5696 > > execution_outcome) = 00:07:36 verbose #5697 > > inl result = result |> rust.emit 00:07:36 verbose #5698 > > !\($'"!result.outcomes()"') 00:07:36 verbose #5699 > > 00:07:36 verbose #5700 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:36 verbose #5701 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:36 verbose #5702 > > │ ### is_success │ 00:07:36 verbose #5703 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:36 verbose #5704 > > 00:07:36 verbose #5705 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:36 verbose #5706 > > inl is_success (outcome : execution_outcome) : bool = 00:07:36 verbose #5707 > > !\\(outcome, $'"$0.is_success()"') 00:07:37 verbose #5708 > > 00:07:37 verbose #5709 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:37 verbose #5710 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:37 verbose #5711 > > │ ### gas_burnt │ 00:07:37 verbose #5712 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:37 verbose #5713 > > 00:07:37 verbose #5714 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:37 verbose #5715 > > inl gas_burnt (outcome : execution_outcome) : gas = 00:07:37 verbose #5716 > > !\\(outcome, $'"$0.gas_burnt"') 00:07:37 verbose #5717 > > 00:07:37 verbose #5718 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:37 verbose #5719 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:37 verbose #5720 > > │ ### tokens_burnt │ 00:07:37 verbose #5721 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:37 verbose #5722 > > 00:07:37 verbose #5723 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:37 verbose #5724 > > inl tokens_burnt (outcome : execution_outcome) : near_token_workspaces = 00:07:37 verbose #5725 > > !\\(outcome, $'"$0.tokens_burnt"') 00:07:37 verbose #5726 > > 00:07:37 verbose #5727 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:37 verbose #5728 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:37 verbose #5729 > > │ ### print_usd │ 00:07:37 verbose #5730 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:37 verbose #5731 > > 00:07:37 verbose #5732 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:37 verbose #5733 > > inl print_usd retry (result : execution_final_result) = 00:07:37 verbose #5734 > > inl total_gas_burnt = result |> total_gas_burnt |> as_gas 00:07:37 verbose #5735 > > inl total_gas_burnt_usd = total_gas_burnt |> near.gas_to_usd 00:07:37 verbose #5736 > > 00:07:37 verbose #5737 > > trace Debug 00:07:37 verbose #5738 > > fun () => "near_workspaces.print_usd" 00:07:37 verbose #5739 > > fun () => { retry total_gas_burnt_usd total_gas_burnt } 00:07:37 verbose #5740 > > 00:07:37 verbose #5741 > > result 00:07:37 verbose #5742 > > |> outcomes 00:07:37 verbose #5743 > > |> iter.into_iter 00:07:37 verbose #5744 > > |> iter.cloned 00:07:37 verbose #5745 > > |> iter.for_each fun outcome => 00:07:37 verbose #5746 > > inl is_success = outcome |> is_success 00:07:37 verbose #5747 > > 00:07:37 verbose #5748 > > inl gas_burnt = outcome |> gas_burnt |> as_gas 00:07:37 verbose #5749 > > inl gas_burnt_usd = gas_burnt |> near.gas_to_usd 00:07:37 verbose #5750 > > 00:07:37 verbose #5751 > > inl tokens_burnt = outcome |> tokens_burnt |> near.as_yoctonear 00:07:37 verbose #5752 > > inl tokens_burnt_usd = tokens_burnt |> near.tokens_to_usd 00:07:37 verbose #5753 > > 00:07:37 verbose #5754 > > trace Debug 00:07:37 verbose #5755 > > fun () => "near_workspaces.print_usd / outcome" 00:07:37 verbose #5756 > > fun () => { is_success gas_burnt_usd tokens_burnt_usd gas_burnt 00:07:37 verbose #5757 > > tokens_burnt } 00:07:38 verbose #5758 > 00:00:20 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 19003 } 00:07:38 verbose #5759 > 00:00:20 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:07:38 verbose #5760 > "nbconvert", 00:07:38 verbose #5761 > "c:/home/git/polyglot/lib/spiral/rust/near_workspaces.dib.ipynb", 00:07:38 verbose #5762 > "--to", 00:07:38 verbose #5763 > "html", 00:07:38 verbose #5764 > "--HTMLExporter.theme=dark", 00:07:38 verbose #5765 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/rust/near_workspaces.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:07:40 verbose #5766 > 00:00:22 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/rust/near_workspaces.dib.ipynb to html 00:07:40 verbose #5767 > 00:00:22 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:07:40 verbose #5768 > 00:00:22 verbose #7 ! validate(nb) 00:07:42 verbose #5769 > 00:00:24 verbose #8 ! [NbConvertApp] Writing 326140 bytes to c:\home\git\polyglot\lib\spiral\rust\near_workspaces.dib.html 00:07:42 verbose #5770 > 00:00:24 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 671 } 00:07:42 verbose #5771 > 00:00:24 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 671 } 00:07:42 verbose #5772 > 00:00:24 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:07:42 verbose #5773 > "-c", 00:07:42 verbose #5774 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/rust/near_workspaces.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:07:42 verbose #5775 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/rust/near_workspaces.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:07:42 verbose #5776 > 00:00:24 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:07:42 verbose #5777 > 00:00:24 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:07:42 verbose #5778 > 00:00:24 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 19733 } 00:07:42 debug #5779 runtime.execute_with_options_async / { exit_code = 0; output_length = 23305 } 00:07:42 debug #6 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path rust/near_workspaces.dib --retries 3 00:07:42 debug #5780 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path testing.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:07:42 verbose #5781 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "testing.dib", "--retries", "3"])) } 00:07:42 verbose #5782 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:07:42 verbose #5783 > "repl", 00:07:42 verbose #5784 > "--exit-after-run", 00:07:42 verbose #5785 > "--run", 00:07:42 verbose #5786 > "c:/home/git/polyglot/lib/spiral/testing.dib", 00:07:42 verbose #5787 > "--output-path", 00:07:42 verbose #5788 > "c:/home/git/polyglot/lib/spiral/testing.dib.ipynb", 00:07:42 verbose #5789 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/testing.dib" --output-path "c:/home/git/polyglot/lib/spiral/testing.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:07:44 verbose #5790 > > 00:07:44 verbose #5791 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:44 verbose #5792 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:44 verbose #5793 > > │ # testing │ 00:07:44 verbose #5794 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:44 verbose #5795 > > 00:07:44 verbose #5796 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:44 verbose #5797 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:44 verbose #5798 > > │ ## testing │ 00:07:44 verbose #5799 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:44 verbose #5800 > > 00:07:44 verbose #5801 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:44 verbose #5802 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:44 verbose #5803 > > │ ### testing_trace │ 00:07:44 verbose #5804 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:48 verbose #5805 > > 00:07:48 verbose #5806 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:48 verbose #5807 > > union testing_trace = 00:07:48 verbose #5808 > > | Console 00:07:48 verbose #5809 > > | Trace 00:07:48 verbose #5810 > > | TraceRaw 00:07:48 verbose #5811 > > | Silent 00:07:49 verbose #5812 > > 00:07:49 verbose #5813 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:49 verbose #5814 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:49 verbose #5815 > > │ ### __expect │ 00:07:49 verbose #5816 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:49 verbose #5817 > > 00:07:49 verbose #5818 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:49 verbose #5819 > > inl rec __expect fn trace' name b a = 00:07:49 verbose #5820 > > inl result = fn a b 00:07:49 verbose #5821 > > inl result = 00:07:49 verbose #5822 > > result || join result 00:07:49 verbose #5823 > > inl get_raw_text () = 00:07:49 verbose #5824 > > backend_switch { 00:07:49 verbose #5825 > > Fsharp = fun () => $'$"{!name} / actual: %A{!a} / expected: %A{!b}"' 00:07:49 verbose #5826 > > : string 00:07:49 verbose #5827 > > Python = fun () => $'f"{!name} / actual: {!a} / expected: {!b}"' : 00:07:49 verbose #5828 > > string 00:07:49 verbose #5829 > > } 00:07:49 verbose #5830 > > match trace' with 00:07:49 verbose #5831 > > | Console => 00:07:49 verbose #5832 > > inl text = get_raw_text () 00:07:49 verbose #5833 > > text |> console.write_line 00:07:49 verbose #5834 > > text 00:07:49 verbose #5835 > > | Trace => 00:07:49 verbose #5836 > > trace Info (fun () => name) fun () => { actual = a; expected = b } 00:07:49 verbose #5837 > > get_raw_text () 00:07:49 verbose #5838 > > | TraceRaw => 00:07:49 verbose #5839 > > inl text = get_raw_text () 00:07:49 verbose #5840 > > trace_raw Info fun () => text 00:07:49 verbose #5841 > > text 00:07:49 verbose #5842 > > | Silent => reflection.nameof { __expect } 00:07:49 verbose #5843 > > |> assert result 00:07:50 verbose #5844 > > 00:07:50 verbose #5845 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:07:50 verbose #5846 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:07:50 verbose #5847 > > │ ### __assert_approx_eq │ 00:07:50 verbose #5848 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:07:50 verbose #5849 > > 00:07:50 verbose #5850 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:50 verbose #5851 > > inl rec __assert_approx_eq trace e b a = 00:07:50 verbose #5852 > > __expect 00:07:50 verbose #5853 > > (fun a b => abs (b - a) < (e |> optionm.defaultWith 0.00000001)) 00:07:50 verbose #5854 > > trace 00:07:50 verbose #5855 > > (reflection.nameof { __assert_approx_eq }) 00:07:50 verbose #5856 > > b 00:07:50 verbose #5857 > > a 00:07:50 verbose #5858 > > 00:07:50 verbose #5859 > > inl _assert_approx_eq e b a = 00:07:50 verbose #5860 > > __assert_approx_eq Console e b a 00:07:50 verbose #5861 > > 00:07:50 verbose #5862 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:07:50 verbose #5863 > > //// test 00:07:50 verbose #5864 > > ///! fsharp 00:07:50 verbose #5865 > > ///! cuda 00:07:50 verbose #5866 > > ///! rust 00:07:50 verbose #5867 > > ///! typescript 00:07:50 verbose #5868 > > ///! python 00:07:50 verbose #5869 > > 00:07:50 verbose #5870 > > 12.345f64 00:07:50 verbose #5871 > > |> _assert_approx_eq (Some 0.0001f64) 12.345f64 00:08:10 verbose #5872 > > 00:08:10 verbose #5873 > > ╭─[ 19.72s - return value ]────────────────────────────────────────────────────╮ 00:08:10 verbose #5874 > > │ .py output (Cuda): │ 00:08:10 verbose #5875 > > │ __assert_approx_eq / actual: 12.345 / expected: 12.345 │ 00:08:10 verbose #5876 > > │ │ 00:08:10 verbose #5877 > > │ .rs output: │ 00:08:10 verbose #5878 > > │ __assert_approx_eq / actual: 12.345 / expected: 12.345 │ 00:08:10 verbose #5879 > > │ │ 00:08:10 verbose #5880 > > │ .ts output: │ 00:08:10 verbose #5881 > > │ __assert_approx_eq / actual: 12.345 / expected: 12.345 │ 00:08:10 verbose #5882 > > │ │ 00:08:10 verbose #5883 > > │ .py output: │ 00:08:10 verbose #5884 > > │ __assert_approx_eq / actual: 12.345 / expected: 12.345 │ 00:08:10 verbose #5885 > > │ │ 00:08:10 verbose #5886 > > │ │ 00:08:10 verbose #5887 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:10 verbose #5888 > > 00:08:10 verbose #5889 > > ╭─[ 19.73s - stdout ]──────────────────────────────────────────────────────────╮ 00:08:10 verbose #5890 > > │ .fsx output: │ 00:08:10 verbose #5891 > > │ __assert_approx_eq / actual: 12.345 / expected: 12.345 │ 00:08:10 verbose #5892 > > │ │ 00:08:10 verbose #5893 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:10 verbose #5894 > > 00:08:10 verbose #5895 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:10 verbose #5896 > > //// test 00:08:10 verbose #5897 > > //// print_code 00:08:10 verbose #5898 > > 00:08:10 verbose #5899 > > 1f64 00:08:10 verbose #5900 > > |> __assert_approx_eq Console (Some 3) 2 00:08:10 verbose #5901 > > 00:08:10 verbose #5902 > > ╭─[ 435.18ms - stdout ]────────────────────────────────────────────────────────╮ 00:08:10 verbose #5903 > > │ let rec closure0 (v0 : string) () : unit = │ 00:08:10 verbose #5904 > > │ let v1 : (string -> unit) = System.Console.WriteLine │ 00:08:10 verbose #5905 > > │ v1 v0 │ 00:08:10 verbose #5906 > > │ and method0 () : unit = │ 00:08:10 verbose #5907 > > │ let v0 : string = "__assert_approx_eq" │ 00:08:10 verbose #5908 > > │ let v1 : string = $"{v0} / actual: %A{1.0} / expected: %A{2.0}" │ 00:08:10 verbose #5909 > > │ let v4 : unit = () │ 00:08:10 verbose #5910 > > │ let v5 : (unit -> unit) = closure0(v1) │ 00:08:10 verbose #5911 > > │ let v6 : unit = (fun () -> v5 (); v4) () │ 00:08:10 verbose #5912 > > │ () │ 00:08:10 verbose #5913 > > │ method0() │ 00:08:10 verbose #5914 > > │ │ 00:08:10 verbose #5915 > > │ __assert_approx_eq / actual: 1.0 / expected: 2.0 │ 00:08:10 verbose #5916 > > │ │ 00:08:10 verbose #5917 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:10 verbose #5918 > > 00:08:10 verbose #5919 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:10 verbose #5920 > > //// test 00:08:10 verbose #5921 > > //// print_code 00:08:10 verbose #5922 > > 00:08:10 verbose #5923 > > (dyn 1f64) 00:08:10 verbose #5924 > > |> _assert_approx_eq (Some 3) 2 00:08:11 verbose #5925 > > 00:08:11 verbose #5926 > > ╭─[ 581.24ms - stdout ]────────────────────────────────────────────────────────╮ 00:08:11 verbose #5927 > > │ let rec method1 (v0 : bool) : bool = │ 00:08:11 verbose #5928 > > │ v0 │ 00:08:11 verbose #5929 > > │ and closure0 (v0 : string) () : unit = │ 00:08:11 verbose #5930 > > │ let v1 : (string -> unit) = System.Console.WriteLine │ 00:08:11 verbose #5931 > > │ v1 v0 │ 00:08:11 verbose #5932 > > │ and method0 () : unit = │ 00:08:11 verbose #5933 > > │ let v0 : float = 1.0 │ 00:08:11 verbose #5934 > > │ let v1 : float = 2.0 - v0 │ 00:08:11 verbose #5935 > > │ let v2 : float = -v1 │ 00:08:11 verbose #5936 > > │ let v3 : bool = v1 >= v2 │ 00:08:11 verbose #5937 > > │ let v4 : float = │ 00:08:11 verbose #5938 > > │ if v3 then │ 00:08:11 verbose #5939 > > │ v1 │ 00:08:11 verbose #5940 > > │ else │ 00:08:11 verbose #5941 > > │ v2 │ 00:08:11 verbose #5942 > > │ let v5 : bool = v4 < 3.0 │ 00:08:11 verbose #5943 > > │ let v7 : bool = │ 00:08:11 verbose #5944 > > │ if v5 then │ 00:08:11 verbose #5945 > > │ true │ 00:08:11 verbose #5946 > > │ else │ 00:08:11 verbose #5947 > > │ method1(v5) │ 00:08:11 verbose #5948 > > │ let v8 : string = "__assert_approx_eq" │ 00:08:11 verbose #5949 > > │ let v9 : string = $"{v8} / actual: %A{v0} / expected: %A{2.0}" │ 00:08:11 verbose #5950 > > │ let v12 : unit = () │ 00:08:11 verbose #5951 > > │ let v13 : (unit -> unit) = closure0(v9) │ 00:08:11 verbose #5952 > > │ let v14 : unit = (fun () -> v13 (); v12) () │ 00:08:11 verbose #5953 > > │ let v16 : bool = v7 = false │ 00:08:11 verbose #5954 > > │ if v16 then │ 00:08:11 verbose #5955 > > │ failwith<unit> v9 │ 00:08:11 verbose #5956 > > │ method0() │ 00:08:11 verbose #5957 > > │ │ 00:08:11 verbose #5958 > > │ __assert_approx_eq / actual: 1.0 / expected: 2.0 │ 00:08:11 verbose #5959 > > │ │ 00:08:11 verbose #5960 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:11 verbose #5961 > > 00:08:11 verbose #5962 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:08:11 verbose #5963 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:08:11 verbose #5964 > > │ ### __assert_eq │ 00:08:11 verbose #5965 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:11 verbose #5966 > > 00:08:11 verbose #5967 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:11 verbose #5968 > > inl rec __assert_eq trace b a = 00:08:11 verbose #5969 > > __expect (=) trace (reflection.nameof { __assert_eq }) b a 00:08:11 verbose #5970 > > 00:08:11 verbose #5971 > > inl _assert_eq b a = 00:08:11 verbose #5972 > > __assert_eq Console b a 00:08:11 verbose #5973 > > 00:08:11 verbose #5974 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:08:11 verbose #5975 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:08:11 verbose #5976 > > │ ### __assert_eq' │ 00:08:11 verbose #5977 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:11 verbose #5978 > > 00:08:11 verbose #5979 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:11 verbose #5980 > > inl rec __assert_eq' trace b a = 00:08:11 verbose #5981 > > __expect (=.) trace (reflection.nameof { __assert_eq' }) b a 00:08:11 verbose #5982 > > 00:08:11 verbose #5983 > > inl _assert_eq' b a = 00:08:11 verbose #5984 > > __assert_eq' Console b a 00:08:12 verbose #5985 > > 00:08:12 verbose #5986 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:08:12 verbose #5987 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:08:12 verbose #5988 > > │ ### __assert_ne │ 00:08:12 verbose #5989 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:12 verbose #5990 > > 00:08:12 verbose #5991 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:12 verbose #5992 > > inl rec __assert_ne trace b a = 00:08:12 verbose #5993 > > __expect (<>.) trace (reflection.nameof { __assert_ne }) b a 00:08:12 verbose #5994 > > 00:08:12 verbose #5995 > > inl _assert_ne b a = 00:08:12 verbose #5996 > > __assert_ne Console b a 00:08:12 verbose #5997 > > 00:08:12 verbose #5998 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:08:12 verbose #5999 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:08:12 verbose #6000 > > │ ### __assert_gt │ 00:08:12 verbose #6001 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:12 verbose #6002 > > 00:08:12 verbose #6003 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:12 verbose #6004 > > inl rec __assert_gt trace b a = 00:08:12 verbose #6005 > > __expect (>) trace (reflection.nameof { __assert_gt }) b a 00:08:12 verbose #6006 > > 00:08:12 verbose #6007 > > inl _assert_gt b a = 00:08:12 verbose #6008 > > __assert_gt Console b a 00:08:13 verbose #6009 > > 00:08:13 verbose #6010 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:08:13 verbose #6011 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:08:13 verbose #6012 > > │ ### __assert_ge │ 00:08:13 verbose #6013 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:13 verbose #6014 > > 00:08:13 verbose #6015 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:13 verbose #6016 > > inl rec __assert_ge trace b a = 00:08:13 verbose #6017 > > __expect (>=) trace (reflection.nameof { __assert_ge }) b a 00:08:13 verbose #6018 > > 00:08:13 verbose #6019 > > inl _assert_ge b a = 00:08:13 verbose #6020 > > __assert_ge Console b a 00:08:13 verbose #6021 > > 00:08:13 verbose #6022 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:08:13 verbose #6023 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:08:13 verbose #6024 > > │ ### __assert_lt │ 00:08:13 verbose #6025 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:13 verbose #6026 > > 00:08:13 verbose #6027 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:13 verbose #6028 > > inl rec __assert_lt trace b a = 00:08:13 verbose #6029 > > __expect (<) trace (reflection.nameof { __assert_lt }) b a 00:08:13 verbose #6030 > > 00:08:13 verbose #6031 > > inl _assert_lt b a = 00:08:13 verbose #6032 > > __assert_lt Console b a 00:08:14 verbose #6033 > > 00:08:14 verbose #6034 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:08:14 verbose #6035 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:08:14 verbose #6036 > > │ ### __assert_le │ 00:08:14 verbose #6037 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:14 verbose #6038 > > 00:08:14 verbose #6039 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:14 verbose #6040 > > inl rec __assert_le trace b a = 00:08:14 verbose #6041 > > __expect (<=) trace (reflection.nameof { __assert_le }) b a 00:08:14 verbose #6042 > > 00:08:14 verbose #6043 > > inl _assert_le b a = 00:08:14 verbose #6044 > > __assert_le Console b a 00:08:14 verbose #6045 > > 00:08:14 verbose #6046 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:08:14 verbose #6047 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:08:14 verbose #6048 > > │ ### __assert │ 00:08:14 verbose #6049 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:14 verbose #6050 > > 00:08:14 verbose #6051 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:14 verbose #6052 > > inl rec __assert fn trace b a = 00:08:14 verbose #6053 > > __expect fn trace (reflection.nameof { __assert }) a b 00:08:14 verbose #6054 > > 00:08:14 verbose #6055 > > inl _assert fn b a = 00:08:14 verbose #6056 > > __assert fn Console b a 00:08:14 verbose #6057 > > 00:08:14 verbose #6058 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:08:14 verbose #6059 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:08:14 verbose #6060 > > │ ### __assert_between │ 00:08:14 verbose #6061 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:14 verbose #6062 > > 00:08:14 verbose #6063 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:14 verbose #6064 > > inl rec __assert_between trace a b actual = 00:08:14 verbose #6065 > > inl assert_between actual (a, b) = 00:08:14 verbose #6066 > > __assert_ge Silent a actual 00:08:14 verbose #6067 > > __assert_le Silent b actual 00:08:14 verbose #6068 > > true 00:08:14 verbose #6069 > > __expect assert_between trace (reflection.nameof { __assert_between }) (a, 00:08:14 verbose #6070 > > b) actual 00:08:14 verbose #6071 > > 00:08:14 verbose #6072 > > inl _assert_between a b actual = 00:08:14 verbose #6073 > > __assert_between Console a b actual 00:08:15 verbose #6074 > > 00:08:15 verbose #6075 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:15 verbose #6076 > > inl rec _assert_fn fn list = 00:08:15 verbose #6077 > > list 00:08:15 verbose #6078 > > |> listm.rev 00:08:15 verbose #6079 > > |> listm.map fun input, expected => join 00:08:15 verbose #6080 > > input 00:08:15 verbose #6081 > > |> fn 00:08:15 verbose #6082 > > |> resultm.get 00:08:15 verbose #6083 > > |> fun x => 00:08:15 verbose #6084 > > inl expected' = join expected 00:08:15 verbose #6085 > > inl name = reflection.nameof { _assert_fn } 00:08:15 verbose #6086 > > try 00:08:15 verbose #6087 > > fun () => 00:08:15 verbose #6088 > > console.write_line "" 00:08:15 verbose #6089 > > trace Verbose 00:08:15 verbose #6090 > > fun () => name 00:08:15 verbose #6091 > > fun () => { input } 00:08:15 verbose #6092 > > x 00:08:15 verbose #6093 > > |> _assert_eq' expected' 00:08:15 verbose #6094 > > true 00:08:15 verbose #6095 > > fun ex => 00:08:15 verbose #6096 > > trace Critical 00:08:15 verbose #6097 > > fun () => 00:08:15 verbose #6098 > > $'$"{!name} / error"' 00:08:15 verbose #6099 > > fun () => { ex expected } 00:08:15 verbose #6100 > > Some false 00:08:15 verbose #6101 > > |> optionm.value 00:08:15 verbose #6102 > > |> listm'.filter not 00:08:15 verbose #6103 > > |> function 00:08:15 verbose #6104 > > | [[]] => () 00:08:15 verbose #6105 > > | x => failwith $'$"{!x}"' 00:08:15 verbose #6106 > > 00:08:15 verbose #6107 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:08:15 verbose #6108 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:08:15 verbose #6109 > > │ ## fsharp │ 00:08:15 verbose #6110 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:15 verbose #6111 > > 00:08:15 verbose #6112 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:08:15 verbose #6113 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:08:15 verbose #6114 > > │ ### __assert_contains │ 00:08:15 verbose #6115 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:15 verbose #6116 > > 00:08:15 verbose #6117 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:15 verbose #6118 > > inl rec __assert_contains forall t u. (trace : testing_trace) (b : t) (a : u) : 00:08:15 verbose #6119 > > () = 00:08:15 verbose #6120 > > __expect 00:08:15 verbose #6121 > > fun a b => 00:08:15 verbose #6122 > > a 00:08:15 verbose #6123 > > |> $'List.ofSeq' 00:08:15 verbose #6124 > > |> fun x => x : listm'.list' t 00:08:15 verbose #6125 > > |> $'List.tryFind' ((=) b) 00:08:15 verbose #6126 > > |> optionm'.unbox 00:08:15 verbose #6127 > > |> fun (x : option t) => x <> None 00:08:15 verbose #6128 > > trace 00:08:15 verbose #6129 > > // TODO: forall nameof (Cannot dyn a forall into a runtime var.) 00:08:15 verbose #6130 > > // Metavars that are not part of the enclosing function's signature are 00:08:15 verbose #6131 > > not allowed. They need to be values. 00:08:15 verbose #6132 > > // Got: {__assert_contains : testing_trace -> _ -> _ -> ()} -> string 00:08:15 verbose #6133 > > // (reflection.nameof { __assert_contains }) 00:08:15 verbose #6134 > > "__assert_contains" 00:08:15 verbose #6135 > > b 00:08:15 verbose #6136 > > a 00:08:15 verbose #6137 > > 00:08:15 verbose #6138 > > inl _assert_contains b a = 00:08:15 verbose #6139 > > __assert_contains Console b a 00:08:16 verbose #6140 > > 00:08:16 verbose #6141 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:16 verbose #6142 > > //// test 00:08:16 verbose #6143 > > 00:08:16 verbose #6144 > > ;[[ "a"; "b"; "c" ]] 00:08:16 verbose #6145 > > |> _assert_contains "b" 00:08:17 verbose #6146 > > 00:08:17 verbose #6147 > > ╭─[ 1.05s - stdout ]───────────────────────────────────────────────────────────╮ 00:08:17 verbose #6148 > > │ __assert_contains / actual: [|"a"; "b"; "c"|] / expected: "b" │ 00:08:17 verbose #6149 > > │ │ 00:08:17 verbose #6150 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:17 verbose #6151 > > 00:08:17 verbose #6152 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:17 verbose #6153 > > //// test 00:08:17 verbose #6154 > > 00:08:17 verbose #6155 > > "abcd" 00:08:17 verbose #6156 > > |> _assert_contains 'b' 00:08:17 verbose #6157 > > 00:08:17 verbose #6158 > > ╭─[ 472.86ms - stdout ]────────────────────────────────────────────────────────╮ 00:08:17 verbose #6159 > > │ __assert_contains / actual: "abcd" / expected: 'b' │ 00:08:17 verbose #6160 > > │ │ 00:08:17 verbose #6161 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:17 verbose #6162 > > 00:08:17 verbose #6163 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:08:17 verbose #6164 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:08:17 verbose #6165 > > │ ### _throws │ 00:08:17 verbose #6166 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:17 verbose #6167 > > 00:08:17 verbose #6168 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:17 verbose #6169 > > inl _throws (fn : () -> ()) : option exn = 00:08:17 verbose #6170 > > inl none = None : option exn 00:08:17 verbose #6171 > > inl some (s : exn) = Some s 00:08:17 verbose #6172 > > $'try !fn (); !none with ex -> ex |> !some ' 00:08:18 verbose #6173 > > 00:08:18 verbose #6174 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:08:18 verbose #6175 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:08:18 verbose #6176 > > │ ### print_and_return │ 00:08:18 verbose #6177 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:18 verbose #6178 > > 00:08:18 verbose #6179 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:18 verbose #6180 > > inl rec print_and_return x = 00:08:18 verbose #6181 > > inl name = reflection.nameof { print_and_return } 00:08:18 verbose #6182 > > $'printfn $"{!name} / x: {!x}"' 00:08:18 verbose #6183 > > x 00:08:18 verbose #6184 > 00:00:36 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 18916 } 00:08:18 verbose #6185 > 00:00:36 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:08:18 verbose #6186 > "nbconvert", 00:08:18 verbose #6187 > "c:/home/git/polyglot/lib/spiral/testing.dib.ipynb", 00:08:18 verbose #6188 > "--to", 00:08:18 verbose #6189 > "html", 00:08:18 verbose #6190 > "--HTMLExporter.theme=dark", 00:08:18 verbose #6191 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/testing.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:08:20 verbose #6192 > 00:00:38 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/testing.dib.ipynb to html 00:08:20 verbose #6193 > 00:00:38 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:08:20 verbose #6194 > 00:00:38 verbose #7 ! validate(nb) 00:08:22 verbose #6195 > 00:00:39 verbose #8 ! [NbConvertApp] Writing 318408 bytes to c:\home\git\polyglot\lib\spiral\testing.dib.html 00:08:22 verbose #6196 > 00:00:39 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 645 } 00:08:22 verbose #6197 > 00:00:39 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 645 } 00:08:22 verbose #6198 > 00:00:39 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:08:22 verbose #6199 > "-c", 00:08:22 verbose #6200 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/testing.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:08:22 verbose #6201 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/testing.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:08:22 verbose #6202 > 00:00:40 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:08:22 verbose #6203 > 00:00:40 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:08:22 verbose #6204 > 00:00:40 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 19620 } 00:08:22 debug #6205 runtime.execute_with_options_async / { exit_code = 0; output_length = 23095 } 00:08:22 debug #7 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path testing.dib --retries 3 00:08:22 debug #6206 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path guid.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:08:22 verbose #6207 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "guid.dib", "--retries", "3"])) } 00:08:22 verbose #6208 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:08:22 verbose #6209 > "repl", 00:08:22 verbose #6210 > "--exit-after-run", 00:08:22 verbose #6211 > "--run", 00:08:22 verbose #6212 > "c:/home/git/polyglot/lib/spiral/guid.dib", 00:08:22 verbose #6213 > "--output-path", 00:08:22 verbose #6214 > "c:/home/git/polyglot/lib/spiral/guid.dib.ipynb", 00:08:22 verbose #6215 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/guid.dib" --output-path "c:/home/git/polyglot/lib/spiral/guid.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:08:25 verbose #6216 > > 00:08:25 verbose #6217 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:08:25 verbose #6218 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:08:25 verbose #6219 > > │ # guid │ 00:08:25 verbose #6220 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:28 verbose #6221 > > 00:08:28 verbose #6222 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:28 verbose #6223 > > //// test 00:08:28 verbose #6224 > > 00:08:28 verbose #6225 > > open testing 00:08:30 verbose #6226 > > 00:08:30 verbose #6227 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:08:30 verbose #6228 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:08:30 verbose #6229 > > │ ## guid │ 00:08:30 verbose #6230 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:30 verbose #6231 > > 00:08:30 verbose #6232 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:08:30 verbose #6233 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:08:30 verbose #6234 > > │ ### guid │ 00:08:30 verbose #6235 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:30 verbose #6236 > > 00:08:30 verbose #6237 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:30 verbose #6238 > > nominal guid_python = 00:08:30 verbose #6239 > > `( 00:08:30 verbose #6240 > > global "import uuid" 00:08:30 verbose #6241 > > $'' : $'uuid.UUID' 00:08:30 verbose #6242 > > ) 00:08:30 verbose #6243 > > type guid_switch = 00:08:30 verbose #6244 > > { 00:08:30 verbose #6245 > > Fsharp : $'System.Guid' 00:08:30 verbose #6246 > > Python : guid_python 00:08:30 verbose #6247 > > } 00:08:30 verbose #6248 > > nominal guid = $'backend_switch `(guid_switch)' 00:08:30 verbose #6249 > > 00:08:30 verbose #6250 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:08:30 verbose #6251 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:08:30 verbose #6252 > > │ ### new_guid │ 00:08:30 verbose #6253 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:30 verbose #6254 > > 00:08:30 verbose #6255 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:30 verbose #6256 > > inl new_guid (x : string) : guid = 00:08:30 verbose #6257 > > x |> convert 00:08:31 verbose #6258 > > 00:08:31 verbose #6259 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:08:31 verbose #6260 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:08:31 verbose #6261 > > │ ### new_raw_guid │ 00:08:31 verbose #6262 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:31 verbose #6263 > > 00:08:31 verbose #6264 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:31 verbose #6265 > > inl new_raw_guid () : guid = 00:08:31 verbose #6266 > > backend_switch { 00:08:31 verbose #6267 > > Fsharp = fun () => $'System.Guid.NewGuid' () : guid 00:08:31 verbose #6268 > > Python = fun () => $'uuid.uuid4()' : guid 00:08:31 verbose #6269 > > } 00:08:31 verbose #6270 > > 00:08:31 verbose #6271 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:08:31 verbose #6272 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:08:31 verbose #6273 > > │ ### hash_guid │ 00:08:31 verbose #6274 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:31 verbose #6275 > > 00:08:31 verbose #6276 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:31 verbose #6277 > > type hash_guid = guid 00:08:31 verbose #6278 > > 00:08:31 verbose #6279 > > let hash_guid (~hash : string) : hash_guid = 00:08:31 verbose #6280 > > run_target function 00:08:31 verbose #6281 > > | Rust (Contract) => fun () => null () 00:08:31 verbose #6282 > > | _ => fun () => 00:08:31 verbose #6283 > > inl hash = hash |> sm'.pad_left 32i32 '0' 00:08:31 verbose #6284 > > backend_switch { 00:08:31 verbose #6285 > > Fsharp = fun () => 00:08:31 verbose #6286 > > $'`hash_guid 00:08:31 verbose #6287 > > $"{!hash.[[0..7]]}-{!hash.[[8..11]]}-{!hash.[[12..15]]}-{!hash.[[16..19]]}-{!has 00:08:31 verbose #6288 > > h.[[20..31]]}"' : hash_guid 00:08:31 verbose #6289 > > Python = fun () => 00:08:31 verbose #6290 > > $'f"{!hash[[0:8]]}-{!hash[[8:12]]}-{!hash[[12:16]]}-{!hash[[16:20]]}-{!hash[[20: 00:08:31 verbose #6291 > > 32]]}"' : hash_guid 00:08:31 verbose #6292 > > } 00:08:32 verbose #6293 > > 00:08:32 verbose #6294 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:32 verbose #6295 > > //// test 00:08:32 verbose #6296 > > ///! fsharp 00:08:32 verbose #6297 > > ///! cuda 00:08:32 verbose #6298 > > ///! rust 00:08:32 verbose #6299 > > ///! typescript 00:08:32 verbose #6300 > > ///! python 00:08:32 verbose #6301 > > 00:08:32 verbose #6302 > > "" 00:08:32 verbose #6303 > > |> hash_guid 00:08:32 verbose #6304 > > |> _assert_eq' (new_guid "00000000-0000-0000-0000-000000000000") 00:08:32 verbose #6305 > > 00:08:32 verbose #6306 > > "123456789012345678901234567890123" 00:08:32 verbose #6307 > > |> hash_guid 00:08:32 verbose #6308 > > |> _assert_eq' (new_guid "12345678-9012-3456-7890-123456789012") 00:08:51 verbose #6309 > > 00:08:51 verbose #6310 > > ╭─[ 19.47s - return value ]────────────────────────────────────────────────────╮ 00:08:51 verbose #6311 > > │ │ 00:08:51 verbose #6312 > > │ .py output (Cuda): │ 00:08:51 verbose #6313 > > │ __assert_eq' / actual: 00000000-0000-0000-0000-000000000000 / expected: │ 00:08:51 verbose #6314 > > │ 00000000-0000-0000-0000-000000000000 │ 00:08:51 verbose #6315 > > │ __assert_eq' / actual: 12345678-9012-3456-7890-123456789012 / expected: │ 00:08:51 verbose #6316 > > │ 12345678-9012-3456-7890-123456789012 │ 00:08:51 verbose #6317 > > │ │ 00:08:51 verbose #6318 > > │ │ 00:08:51 verbose #6319 > > │ .rs output: │ 00:08:51 verbose #6320 > > │ __assert_eq' / actual: Guid(00000000-0000-0000-0000-000000000000) / │ 00:08:51 verbose #6321 > > │ expected: Guid(00000000-0000-0000-0000-000000000000) │ 00:08:51 verbose #6322 > > │ __assert_eq' / actual: Guid(12345678-9012-3456-7890-123456789012) / │ 00:08:51 verbose #6323 > > │ expected: Guid(12345678-9012-3456-7890-123456789012) │ 00:08:51 verbose #6324 > > │ │ 00:08:51 verbose #6325 > > │ │ 00:08:51 verbose #6326 > > │ .ts output: │ 00:08:51 verbose #6327 > > │ __assert_eq' / actual: 00000000-0000-0000-0000-000000000000 / expected: │ 00:08:51 verbose #6328 > > │ 00000000-0000-0000-0000-000000000000 │ 00:08:51 verbose #6329 > > │ __assert_eq' / actual: 12345678-9012-3456-7890-123456789012 / expected: │ 00:08:51 verbose #6330 > > │ 12345678-9012-3456-7890-123456789012 │ 00:08:51 verbose #6331 > > │ │ 00:08:51 verbose #6332 > > │ │ 00:08:51 verbose #6333 > > │ .py output: │ 00:08:51 verbose #6334 > > │ __assert_eq' / actual: 00000000-0000-0000-0000-000000000000 / expected: │ 00:08:51 verbose #6335 > > │ 00000000-0000-0000-0000-000000000000 │ 00:08:51 verbose #6336 > > │ __assert_eq' / actual: 12345678-9012-3456-7890-123456789012 / expected: │ 00:08:51 verbose #6337 > > │ 12345678-9012-3456-7890-123456789012 │ 00:08:51 verbose #6338 > > │ │ 00:08:51 verbose #6339 > > │ │ 00:08:51 verbose #6340 > > │ │ 00:08:51 verbose #6341 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:51 verbose #6342 > > 00:08:51 verbose #6343 > > ╭─[ 19.47s - stdout ]──────────────────────────────────────────────────────────╮ 00:08:51 verbose #6344 > > │ .fsx output: │ 00:08:51 verbose #6345 > > │ __assert_eq' / actual: 00000000-0000-0000-0000-000000000000 / expected: │ 00:08:51 verbose #6346 > > │ 00000000-0000-0000-0000-000000000000 │ 00:08:51 verbose #6347 > > │ __assert_eq' / actual: 12345678-9012-3456-7890-123456789012 / expected: │ 00:08:51 verbose #6348 > > │ 12345678-9012-3456-7890-123456789012 │ 00:08:51 verbose #6349 > > │ │ 00:08:51 verbose #6350 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:51 verbose #6351 > > 00:08:51 verbose #6352 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:08:51 verbose #6353 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:08:51 verbose #6354 > > │ ## main │ 00:08:51 verbose #6355 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:08:51 verbose #6356 > > 00:08:51 verbose #6357 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:08:51 verbose #6358 > > inl main () = 00:08:51 verbose #6359 > > $'let new_guid x = !new_guid x' : () 00:08:51 verbose #6360 > > $'let hash_guid x = !hash_guid x' : () 00:08:51 verbose #6361 > > $'let new_raw_guid x = !new_raw_guid x' : () 00:08:52 verbose #6362 > 00:00:29 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 7553 } 00:08:52 verbose #6363 > 00:00:29 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:08:52 verbose #6364 > "nbconvert", 00:08:52 verbose #6365 > "c:/home/git/polyglot/lib/spiral/guid.dib.ipynb", 00:08:52 verbose #6366 > "--to", 00:08:52 verbose #6367 > "html", 00:08:52 verbose #6368 > "--HTMLExporter.theme=dark", 00:08:52 verbose #6369 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/guid.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:08:54 verbose #6370 > 00:00:31 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/guid.dib.ipynb to html 00:08:54 verbose #6371 > 00:00:31 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:08:54 verbose #6372 > 00:00:31 verbose #7 ! validate(nb) 00:08:55 verbose #6373 > 00:00:32 verbose #8 ! [NbConvertApp] Writing 284653 bytes to c:\home\git\polyglot\lib\spiral\guid.dib.html 00:08:55 verbose #6374 > 00:00:32 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 639 } 00:08:55 verbose #6375 > 00:00:32 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 639 } 00:08:55 verbose #6376 > 00:00:32 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:08:55 verbose #6377 > "-c", 00:08:55 verbose #6378 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/guid.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:08:55 verbose #6379 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/guid.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:08:56 verbose #6380 > 00:00:33 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:08:56 verbose #6381 > 00:00:33 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:08:56 verbose #6382 > 00:00:33 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 8251 } 00:08:56 debug #6383 runtime.execute_with_options_async / { exit_code = 0; output_length = 11201 } 00:08:56 debug #8 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path guid.dib --retries 3 00:08:56 debug #6384 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path async.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:08:56 verbose #6385 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "async.dib", "--retries", "3"])) } 00:08:56 verbose #6386 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:08:56 verbose #6387 > "repl", 00:08:56 verbose #6388 > "--exit-after-run", 00:08:56 verbose #6389 > "--run", 00:08:56 verbose #6390 > "c:/home/git/polyglot/lib/spiral/async.dib", 00:08:56 verbose #6391 > "--output-path", 00:08:56 verbose #6392 > "c:/home/git/polyglot/lib/spiral/async.dib.ipynb", 00:08:56 verbose #6393 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/async.dib" --output-path "c:/home/git/polyglot/lib/spiral/async.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:08:58 verbose #6394 > > 00:08:58 verbose #6395 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:08:58 verbose #6396 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:08:58 verbose #6397 > > │ # async │ 00:08:58 verbose #6398 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:02 verbose #6399 > > 00:09:02 verbose #6400 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:02 verbose #6401 > > //// test 00:09:02 verbose #6402 > > 00:09:02 verbose #6403 > > open testing 00:09:03 verbose #6404 > > 00:09:03 verbose #6405 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:03 verbose #6406 > > open rust 00:09:03 verbose #6407 > > open rust_operators 00:09:03 verbose #6408 > > 00:09:03 verbose #6409 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:03 verbose #6410 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:03 verbose #6411 > > │ ## rust │ 00:09:03 verbose #6412 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:03 verbose #6413 > > 00:09:03 verbose #6414 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:03 verbose #6415 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:03 verbose #6416 > > │ ### future │ 00:09:03 verbose #6417 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:03 verbose #6418 > > 00:09:03 verbose #6419 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:03 verbose #6420 > > nominal future t = 00:09:03 verbose #6421 > > `( 00:09:03 verbose #6422 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:09:03 verbose #6423 > > Fable.Core.Emit(\"std::future::Future<Output = $0>\")>]]\n#endif\ntype 00:09:03 verbose #6424 > > std_future_Future<'T> = class end" 00:09:03 verbose #6425 > > $'' : $'std_future_Future<`t>' 00:09:03 verbose #6426 > > ) 00:09:04 verbose #6427 > > 00:09:04 verbose #6428 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:04 verbose #6429 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:04 verbose #6430 > > │ ### future_pin │ 00:09:04 verbose #6431 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:04 verbose #6432 > > 00:09:04 verbose #6433 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:04 verbose #6434 > > type future_pin t = rust.pin (rust.box (rust.dyn' (future t))) 00:09:04 verbose #6435 > > 00:09:04 verbose #6436 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:04 verbose #6437 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:04 verbose #6438 > > │ ### future_pin_send │ 00:09:04 verbose #6439 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:04 verbose #6440 > > 00:09:04 verbose #6441 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:04 verbose #6442 > > type future_pin_send t = rust.pin (rust.box (rust.send (rust.dyn' (future t)))) 00:09:05 verbose #6443 > > 00:09:05 verbose #6444 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:05 verbose #6445 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:05 verbose #6446 > > │ ### block_on │ 00:09:05 verbose #6447 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:05 verbose #6448 > > 00:09:05 verbose #6449 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:05 verbose #6450 > > inl block_on forall t. (fn : future_pin t) : t = 00:09:05 verbose #6451 > > inl runtime : infer = 00:09:05 verbose #6452 > > 00:09:05 verbose #6453 > > !\($'$"tokio::runtime::Builder::new_multi_thread().enable_all().build().unwrap() 00:09:05 verbose #6454 > > "') 00:09:05 verbose #6455 > > !\\(fn, $'"!runtime.handle().block_on($0)"') 00:09:05 verbose #6456 > > 00:09:05 verbose #6457 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:05 verbose #6458 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:05 verbose #6459 > > │ ### block_on' │ 00:09:05 verbose #6460 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:05 verbose #6461 > > 00:09:05 verbose #6462 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:05 verbose #6463 > > inl block_on' forall t. (fn : future_pin t) : t = 00:09:05 verbose #6464 > > !\\(fn, $'"futures_lite::future::block_on($0)"') 00:09:05 verbose #6465 > > 00:09:05 verbose #6466 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:05 verbose #6467 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:05 verbose #6468 > > │ ### block_on'' │ 00:09:05 verbose #6469 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:05 verbose #6470 > > 00:09:05 verbose #6471 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:05 verbose #6472 > > inl block_on'' forall t. (fn : future_pin t) : t = 00:09:05 verbose #6473 > > !\\(fn, $'"futures::executor::block_on($0)"') 00:09:06 verbose #6474 > > 00:09:06 verbose #6475 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:06 verbose #6476 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:06 verbose #6477 > > │ ### block_on''' │ 00:09:06 verbose #6478 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:06 verbose #6479 > > 00:09:06 verbose #6480 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:06 verbose #6481 > > inl block_on''' forall t. (fn : future_pin t) : t = 00:09:06 verbose #6482 > > !\\(fn, $'"async_std::task::block_on($0)"') 00:09:06 verbose #6483 > > 00:09:06 verbose #6484 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:06 verbose #6485 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:06 verbose #6486 > > │ ### block_on_send │ 00:09:06 verbose #6487 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:06 verbose #6488 > > 00:09:06 verbose #6489 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:06 verbose #6490 > > inl block_on_send forall t. (fn : future_pin_send t) : t = 00:09:06 verbose #6491 > > !\($'"tokio::runtime::block_on(!fn)"') 00:09:07 verbose #6492 > > 00:09:07 verbose #6493 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:07 verbose #6494 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:07 verbose #6495 > > │ ### stream_ext │ 00:09:07 verbose #6496 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:07 verbose #6497 > > 00:09:07 verbose #6498 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:07 verbose #6499 > > nominal stream_ext = 00:09:07 verbose #6500 > > `( 00:09:07 verbose #6501 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:09:07 verbose #6502 > > Fable.Core.Emit(\"tokio_stream::StreamExt\")>]]\n#endif\ntype 00:09:07 verbose #6503 > > tokio_stream_StreamExt = class end" 00:09:07 verbose #6504 > > $'' : $'tokio_stream_StreamExt' 00:09:07 verbose #6505 > > ) 00:09:07 verbose #6506 > > 00:09:07 verbose #6507 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:07 verbose #6508 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:07 verbose #6509 > > │ ### join_handle │ 00:09:07 verbose #6510 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:07 verbose #6511 > > 00:09:07 verbose #6512 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:07 verbose #6513 > > nominal join_handle t = 00:09:07 verbose #6514 > > `( 00:09:07 verbose #6515 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:09:07 verbose #6516 > > Fable.Core.Emit(\"tokio::task::JoinHandle<$0>\")>]]\n#endif\ntype 00:09:07 verbose #6517 > > tokio_task_JoinHandle<'T> = class end" 00:09:07 verbose #6518 > > $'' : $'tokio_task_JoinHandle<`t>' 00:09:07 verbose #6519 > > ) 00:09:08 verbose #6520 > > 00:09:08 verbose #6521 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:08 verbose #6522 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:08 verbose #6523 > > │ ### stream_collect │ 00:09:08 verbose #6524 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:08 verbose #6525 > > 00:09:08 verbose #6526 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:08 verbose #6527 > > inl stream_collect forall t u. 00:09:08 verbose #6528 > > (stream : t) 00:09:08 verbose #6529 > > : future_pin (am'.vec u) 00:09:08 verbose #6530 > > = 00:09:08 verbose #6531 > > !\($'"Box::pin(tokio_stream::StreamExt::collect(!stream))"') 00:09:08 verbose #6532 > > 00:09:08 verbose #6533 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:08 verbose #6534 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:08 verbose #6535 > > │ ### stream_next │ 00:09:08 verbose #6536 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:08 verbose #6537 > > 00:09:08 verbose #6538 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:08 verbose #6539 > > inl stream_next forall t u. 00:09:08 verbose #6540 > > (stream : t) 00:09:08 verbose #6541 > > : future_pin (optionm'.option' u) 00:09:08 verbose #6542 > > = 00:09:08 verbose #6543 > > !\($'"let mut !stream = !stream"') 00:09:08 verbose #6544 > > !\($'"Box::pin(tokio_stream::StreamExt::next(&mut !stream))"') 00:09:09 verbose #6545 > > 00:09:09 verbose #6546 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:09 verbose #6547 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:09 verbose #6548 > > │ ### stream_filter_map │ 00:09:09 verbose #6549 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:09 verbose #6550 > > 00:09:09 verbose #6551 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:09 verbose #6552 > > inl stream_filter_map forall t u v. 00:09:09 verbose #6553 > > (fn : u -> optionm'.option' v) 00:09:09 verbose #6554 > > (stream : t) 00:09:09 verbose #6555 > > : infer' v 00:09:09 verbose #6556 > > = 00:09:09 verbose #6557 > > inl fn = join fn 00:09:09 verbose #6558 > > !\($'"tokio_stream::StreamExt::filter_map(!stream, |x| !fn(x))"') 00:09:09 verbose #6559 > > 00:09:09 verbose #6560 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:09 verbose #6561 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:09 verbose #6562 > > │ ### spawn │ 00:09:09 verbose #6563 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:09 verbose #6564 > > 00:09:09 verbose #6565 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:09 verbose #6566 > > inl spawn forall t. (fn : future_pin_send t) : join_handle t = 00:09:09 verbose #6567 > > !\($'"tokio::runtime::spawn(!fn)"') 00:09:09 verbose #6568 > > 00:09:09 verbose #6569 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:09 verbose #6570 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:09 verbose #6571 > > │ ### try_join_all │ 00:09:09 verbose #6572 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:09 verbose #6573 > > 00:09:09 verbose #6574 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:09 verbose #6575 > > nominal try_join_all t = 00:09:09 verbose #6576 > > `( 00:09:09 verbose #6577 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:09:09 verbose #6578 > > Fable.Core.Emit(\"futures::future::TryJoinAll<$0>\")>]]\n#endif\ntype 00:09:09 verbose #6579 > > futures_future_TryJoinAll<'T> = class end" 00:09:09 verbose #6580 > > $'' : $'futures_future_TryJoinAll<`t>' 00:09:09 verbose #6581 > > ) 00:09:09 verbose #6582 > > 00:09:09 verbose #6583 > > inl try_join_all forall t. (x : am'.vec (future_pin (resultm.result' t 00:09:09 verbose #6584 > > sm'.std_string))) : try_join_all (future_pin (resultm.result' t sm'.std_string)) 00:09:09 verbose #6585 > > = 00:09:09 verbose #6586 > > inl x = join x 00:09:09 verbose #6587 > > !\($'"futures::future::try_join_all(!x)"') 00:09:10 verbose #6588 > > 00:09:10 verbose #6589 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:10 verbose #6590 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:10 verbose #6591 > > │ ### fuse │ 00:09:10 verbose #6592 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:10 verbose #6593 > > 00:09:10 verbose #6594 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:10 verbose #6595 > > nominal fuse t = 00:09:10 verbose #6596 > > `( 00:09:10 verbose #6597 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:09:10 verbose #6598 > > Fable.Core.Emit(\"tokio::prelude::stream::Fuse<$0>\")>]]\n#endif\ntype 00:09:10 verbose #6599 > > tokio_prelude_stream_Fuse<'T> = class end" 00:09:10 verbose #6600 > > $'' : $'tokio_prelude_stream_Fuse<`t>' 00:09:10 verbose #6601 > > ) 00:09:10 verbose #6602 > > 00:09:10 verbose #6603 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:10 verbose #6604 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:10 verbose #6605 > > │ ### future_fuse │ 00:09:10 verbose #6606 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:10 verbose #6607 > > 00:09:10 verbose #6608 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:10 verbose #6609 > > inl future_fuse forall t. (x : future_pin t) : fuse (future_pin t) = 00:09:10 verbose #6610 > > !\($'"futures::future::FutureExt::fuse(!x)"') 00:09:11 verbose #6611 > > 00:09:11 verbose #6612 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:11 verbose #6613 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:11 verbose #6614 > > │ ### join_all │ 00:09:11 verbose #6615 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:11 verbose #6616 > > 00:09:11 verbose #6617 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:11 verbose #6618 > > nominal join_all t = 00:09:11 verbose #6619 > > `( 00:09:11 verbose #6620 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:09:11 verbose #6621 > > Fable.Core.Emit(\"futures::future::JoinAll<$0>\")>]]\n#endif\ntype 00:09:11 verbose #6622 > > futures_future_JoinAll<'T> = class end" 00:09:11 verbose #6623 > > $'' : $'futures_future_JoinAll<`t>' 00:09:11 verbose #6624 > > ) 00:09:11 verbose #6625 > > 00:09:11 verbose #6626 > > inl join_all forall t. (x : am'.vec (future_pin t)) : join_all (future_pin t) = 00:09:11 verbose #6627 > > inl x = join x 00:09:11 verbose #6628 > > !\($'"futures::future::join_all(!x)"') 00:09:11 verbose #6629 > > 00:09:11 verbose #6630 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:11 verbose #6631 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:11 verbose #6632 > > │ ### join_all_send │ 00:09:11 verbose #6633 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:11 verbose #6634 > > 00:09:11 verbose #6635 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:11 verbose #6636 > > inl join_all_send forall t. (x : am'.vec (future_pin_send t)) : join_all 00:09:11 verbose #6637 > > (future_pin_send t) = 00:09:11 verbose #6638 > > inl x = join x 00:09:11 verbose #6639 > > !\($'"futures::future::join_all(!x)"') 00:09:12 verbose #6640 > > 00:09:12 verbose #6641 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:12 verbose #6642 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:12 verbose #6643 > > │ ### await_handle │ 00:09:12 verbose #6644 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:12 verbose #6645 > > 00:09:12 verbose #6646 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:12 verbose #6647 > > inl await_handle forall t. (x : join_handle t) : t = 00:09:12 verbose #6648 > > !\($'"!x.await"') 00:09:12 verbose #6649 > > 00:09:12 verbose #6650 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:12 verbose #6651 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:12 verbose #6652 > > │ ### await_all │ 00:09:12 verbose #6653 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:12 verbose #6654 > > 00:09:12 verbose #6655 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:12 verbose #6656 > > inl await_all forall t. (x : join_all (future_pin t)) : am'.vec t = 00:09:12 verbose #6657 > > !\($'"!x.await"') 00:09:12 verbose #6658 > > 00:09:12 verbose #6659 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:12 verbose #6660 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:12 verbose #6661 > > │ ### await_all_send │ 00:09:12 verbose #6662 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:12 verbose #6663 > > 00:09:12 verbose #6664 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:12 verbose #6665 > > inl await_all_send forall t. (x : join_all (future_pin_send t)) : am'.vec t = 00:09:12 verbose #6666 > > !\($'"!x.await"') 00:09:13 verbose #6667 > > 00:09:13 verbose #6668 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:13 verbose #6669 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:13 verbose #6670 > > │ ### try_await_all │ 00:09:13 verbose #6671 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:13 verbose #6672 > > 00:09:13 verbose #6673 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:13 verbose #6674 > > inl try_await_all forall t. (x : try_join_all (future_pin (resultm.result' t 00:09:13 verbose #6675 > > sm'.std_string))) : resultm.result' (am'.vec t) sm'.std_string = 00:09:13 verbose #6676 > > !\($'"!x.await"') 00:09:13 verbose #6677 > > 00:09:13 verbose #6678 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:13 verbose #6679 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:13 verbose #6680 > > │ ### try_await_all_send │ 00:09:13 verbose #6681 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:13 verbose #6682 > > 00:09:13 verbose #6683 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:13 verbose #6684 > > inl try_await_all_send forall t. (x : try_join_all (future_pin_send 00:09:13 verbose #6685 > > (resultm.result' t sm'.std_string))) : resultm.result' (am'.vec t) 00:09:13 verbose #6686 > > sm'.std_string = 00:09:13 verbose #6687 > > !\($'"!x.await"') 00:09:14 verbose #6688 > > 00:09:14 verbose #6689 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:14 verbose #6690 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:14 verbose #6691 > > │ ### await │ 00:09:14 verbose #6692 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:14 verbose #6693 > > 00:09:14 verbose #6694 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:14 verbose #6695 > > inl await forall t. (x : future_pin t) : t = 00:09:14 verbose #6696 > > !\($'"!x.await"') 00:09:14 verbose #6697 > > 00:09:14 verbose #6698 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:14 verbose #6699 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:14 verbose #6700 > > │ ### await │ 00:09:14 verbose #6701 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:14 verbose #6702 > > 00:09:14 verbose #6703 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:14 verbose #6704 > > inl await_send forall t. (x : future_pin_send t) : t = 00:09:14 verbose #6705 > > !\($'"!x.await"') 00:09:15 verbose #6706 > > 00:09:15 verbose #6707 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:15 verbose #6708 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:15 verbose #6709 > > │ ### into_iter │ 00:09:15 verbose #6710 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:15 verbose #6711 > > 00:09:15 verbose #6712 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:15 verbose #6713 > > nominal into_iter t = 00:09:15 verbose #6714 > > `( 00:09:15 verbose #6715 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:09:15 verbose #6716 > > Fable.Core.Emit(\"rayon::vec::IntoIter<$0>\")>]]\n#endif\ntype 00:09:15 verbose #6717 > > rayon_vec_IntoIter<'T> = class end" 00:09:15 verbose #6718 > > $'' : $'rayon_vec_IntoIter<`t>' 00:09:15 verbose #6719 > > ) 00:09:15 verbose #6720 > > 00:09:15 verbose #6721 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:15 verbose #6722 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:15 verbose #6723 > > │ ### into_par_iter │ 00:09:15 verbose #6724 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:15 verbose #6725 > > 00:09:15 verbose #6726 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:15 verbose #6727 > > inl into_par_iter forall t. (x : am'.vec t) : into_iter t = 00:09:15 verbose #6728 > > !\\(x, $'"rayon::iter::IntoParallelIterator::into_par_iter($0)"') 00:09:15 verbose #6729 > > 00:09:15 verbose #6730 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:15 verbose #6731 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:15 verbose #6732 > > │ ### par_iter │ 00:09:15 verbose #6733 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:15 verbose #6734 > > 00:09:15 verbose #6735 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:15 verbose #6736 > > inl par_iter forall t. (x : am'.vec t) : into_iter t = 00:09:15 verbose #6737 > > !\($'"rayon::iter::IntoParallelIterator::par_iter(!x)"') 00:09:16 verbose #6738 > > 00:09:16 verbose #6739 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:16 verbose #6740 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:16 verbose #6741 > > │ ### iter_map │ 00:09:16 verbose #6742 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:16 verbose #6743 > > 00:09:16 verbose #6744 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:16 verbose #6745 > > nominal iter_map t u = 00:09:16 verbose #6746 > > `( 00:09:16 verbose #6747 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:09:16 verbose #6748 > > Fable.Core.Emit(\"rayon::iter::Map<$0, _>\")>]]\n#endif\ntype rayon_iter_Map<'T> 00:09:16 verbose #6749 > > = class end" 00:09:16 verbose #6750 > > $'' : $'rayon_iter_Map<`t>' 00:09:16 verbose #6751 > > ) 00:09:16 verbose #6752 > > 00:09:16 verbose #6753 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:16 verbose #6754 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:16 verbose #6755 > > │ ### par_map │ 00:09:16 verbose #6756 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:16 verbose #6757 > > 00:09:16 verbose #6758 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:16 verbose #6759 > > inl par_map forall t u. (fn : t -> u) (ar : into_iter t) : iter_map (into_iter 00:09:16 verbose #6760 > > t) u = 00:09:16 verbose #6761 > > !\\((ar, fn), $'"rayon::iter::ParallelIterator::map($0, |x| $1(x))"') 00:09:17 verbose #6762 > > 00:09:17 verbose #6763 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:17 verbose #6764 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:17 verbose #6765 > > │ ### par_collect │ 00:09:17 verbose #6766 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:17 verbose #6767 > > 00:09:17 verbose #6768 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:17 verbose #6769 > > inl par_collect forall t u. (iter : iter_map (into_iter t) u) : am'.vec u = 00:09:17 verbose #6770 > > !\\(iter, $'"rayon::iter::ParallelIterator::collect($0)"') 00:09:17 verbose #6771 > > 00:09:17 verbose #6772 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:17 verbose #6773 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:17 verbose #6774 > > │ ### try_join_all_iter │ 00:09:17 verbose #6775 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:17 verbose #6776 > > 00:09:17 verbose #6777 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:17 verbose #6778 > > inl try_join_all_iter forall t. (x : am'.vec (future_pin_send (resultm.result' t 00:09:17 verbose #6779 > > sm'.std_string))) : try_join_all (future_pin_send (resultm.result' t 00:09:17 verbose #6780 > > sm'.std_string)) = 00:09:17 verbose #6781 > > inl x = join x 00:09:17 verbose #6782 > > !\($'"futures::future::try_join_all(!x)"') 00:09:18 verbose #6783 > > 00:09:18 verbose #6784 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:18 verbose #6785 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:18 verbose #6786 > > │ ### future_init │ 00:09:18 verbose #6787 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:18 verbose #6788 > > 00:09:18 verbose #6789 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:18 verbose #6790 > > inl future_init forall t. (move : bool) (x : () -> t) : infer' t = 00:09:18 verbose #6791 > > if move 00:09:18 verbose #6792 > > then (!\($'"true; let __future_init = Box::pin(async move { //"') : bool) |> 00:09:18 verbose #6793 > > ignore 00:09:18 verbose #6794 > > else (!\($'"true; let __future_init = Box::pin(async { //"') : bool) |> 00:09:18 verbose #6795 > > ignore 00:09:18 verbose #6796 > > 00:09:18 verbose #6797 > > inl is_unit : bool = 00:09:18 verbose #6798 > > real 00:09:18 verbose #6799 > > typecase t with 00:09:18 verbose #6800 > > | () => true 00:09:18 verbose #6801 > > | _ => false 00:09:18 verbose #6802 > > 00:09:18 verbose #6803 > > inl x' = x () 00:09:18 verbose #6804 > > inl x' = join x' 00:09:18 verbose #6805 > > 00:09:18 verbose #6806 > > inl depth = 00:09:18 verbose #6807 > > if is_unit 00:09:18 verbose #6808 > > then 2, 1 00:09:18 verbose #6809 > > else 1, 0 00:09:18 verbose #6810 > > 00:09:18 verbose #6811 > > x' |> rust.fix_closure depth 00:09:18 verbose #6812 > > 00:09:18 verbose #6813 > > !\($'"__future_init"') 00:09:18 verbose #6814 > > 00:09:18 verbose #6815 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:18 verbose #6816 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:18 verbose #6817 > > │ ### new_future │ 00:09:18 verbose #6818 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:18 verbose #6819 > > 00:09:18 verbose #6820 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:18 verbose #6821 > > inl new_future forall t. (x : () -> t) : future_pin t = 00:09:18 verbose #6822 > > inl result = future_init false x 00:09:18 verbose #6823 > > !\($'"!result"') 00:09:19 verbose #6824 > > 00:09:19 verbose #6825 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:19 verbose #6826 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:19 verbose #6827 > > │ ### new_future_move │ 00:09:19 verbose #6828 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:19 verbose #6829 > > 00:09:19 verbose #6830 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:19 verbose #6831 > > inl new_future_move forall t. (x : () -> t) : future_pin t = 00:09:19 verbose #6832 > > inl result = future_init true x 00:09:19 verbose #6833 > > !\($'"!result"') 00:09:19 verbose #6834 > > 00:09:19 verbose #6835 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:19 verbose #6836 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:19 verbose #6837 > > │ ### new_future_send │ 00:09:19 verbose #6838 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:19 verbose #6839 > > 00:09:19 verbose #6840 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:19 verbose #6841 > > inl new_future_send forall t. (x : () -> t) : future_pin_send t = 00:09:19 verbose #6842 > > inl result = future_init false x 00:09:19 verbose #6843 > > !\($'"!result"') 00:09:19 verbose #6844 > > 00:09:19 verbose #6845 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:19 verbose #6846 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:19 verbose #6847 > > │ ### new_future_move_send │ 00:09:19 verbose #6848 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:19 verbose #6849 > > 00:09:19 verbose #6850 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:19 verbose #6851 > > inl new_future_move_send forall t. (x : () -> t) : future_pin_send t = 00:09:19 verbose #6852 > > inl result = future_init true x 00:09:19 verbose #6853 > > !\($'"!result"') 00:09:20 verbose #6854 > > 00:09:20 verbose #6855 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:20 verbose #6856 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:20 verbose #6857 > > │ ## fsharp │ 00:09:20 verbose #6858 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:20 verbose #6859 > > 00:09:20 verbose #6860 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:20 verbose #6861 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:20 verbose #6862 > > │ ### async │ 00:09:20 verbose #6863 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:20 verbose #6864 > > 00:09:20 verbose #6865 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:20 verbose #6866 > > nominal async t = $'Async<`t>' 00:09:20 verbose #6867 > > 00:09:20 verbose #6868 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:20 verbose #6869 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:20 verbose #6870 > > │ ### task │ 00:09:20 verbose #6871 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:20 verbose #6872 > > 00:09:20 verbose #6873 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:20 verbose #6874 > > nominal task t = 00:09:20 verbose #6875 > > `( 00:09:20 verbose #6876 > > typecase t with 00:09:20 verbose #6877 > > | () => $'' : $'System.Threading.Tasks.Task' 00:09:20 verbose #6878 > > | _ => $'' : $'System.Threading.Tasks.Task<`t>' 00:09:20 verbose #6879 > > ) 00:09:21 verbose #6880 > > 00:09:21 verbose #6881 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:21 verbose #6882 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:21 verbose #6883 > > │ ### new_async_unit │ 00:09:21 verbose #6884 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:21 verbose #6885 > > 00:09:21 verbose #6886 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:21 verbose #6887 > > inl new_async_unit forall t. (fn : () -> ()) : async t = 00:09:21 verbose #6888 > > run_target function 00:09:21 verbose #6889 > > | Fsharp (Native) => fun () => 00:09:21 verbose #6890 > > inl result : optionm'.option' (async t) = optionm'.none' () 00:09:21 verbose #6891 > > $'let mutable _!result = !result ' 00:09:21 verbose #6892 > > $'async {' 00:09:21 verbose #6893 > > fn () 00:09:21 verbose #6894 > > real 00:09:21 verbose #6895 > > typecase t with 00:09:21 verbose #6896 > > | () => $'()' : () 00:09:21 verbose #6897 > > | _ => () 00:09:21 verbose #6898 > > $'}' 00:09:21 verbose #6899 > > $'|> fun x -> _!result <- Some x' 00:09:21 verbose #6900 > > $'match _!result with Some x -> x | None -> failwith 00:09:21 verbose #6901 > > "async.new_async_unit / _!result=None"' 00:09:21 verbose #6902 > > | _ => fun () => null () 00:09:21 verbose #6903 > > 00:09:21 verbose #6904 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:21 verbose #6905 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:21 verbose #6906 > > │ ### new_async │ 00:09:21 verbose #6907 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:21 verbose #6908 > > 00:09:21 verbose #6909 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:21 verbose #6910 > > inl new_async forall t. (fn : () -> t) : async t = 00:09:21 verbose #6911 > > new_async_unit (fn >> ignore) 00:09:22 verbose #6912 > > 00:09:22 verbose #6913 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:22 verbose #6914 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:22 verbose #6915 > > │ ### new_task │ 00:09:22 verbose #6916 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:22 verbose #6917 > > 00:09:22 verbose #6918 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:22 verbose #6919 > > inl new_task forall t. (fn : () -> t) : task t = 00:09:22 verbose #6920 > > run_target function 00:09:22 verbose #6921 > > | Fsharp (Native) => fun () => 00:09:22 verbose #6922 > > inl result : optionm'.option' (task t) = optionm'.none' () 00:09:22 verbose #6923 > > $'let mutable _!result = !result ' 00:09:22 verbose #6924 > > $'task {' 00:09:22 verbose #6925 > > fn () |> ignore 00:09:22 verbose #6926 > > $'}' 00:09:22 verbose #6927 > > $'|> fun x -> _!result <- Some x' 00:09:22 verbose #6928 > > $'match _!result with Some x -> x | None -> failwith "async.new_task 00:09:22 verbose #6929 > > / _!result=None"' 00:09:22 verbose #6930 > > | _ => fun () => null () 00:09:22 verbose #6931 > > 00:09:22 verbose #6932 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:22 verbose #6933 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:22 verbose #6934 > > │ ### await_task │ 00:09:22 verbose #6935 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:22 verbose #6936 > > 00:09:22 verbose #6937 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:22 verbose #6938 > > inl await_task forall t. (a : task t) : async t = 00:09:22 verbose #6939 > > run_target function 00:09:22 verbose #6940 > > | Fsharp (Native) => fun () => 00:09:22 verbose #6941 > > a |> $'Async.AwaitTask' 00:09:22 verbose #6942 > > | _ => fun () => null () 00:09:23 verbose #6943 > > 00:09:23 verbose #6944 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:23 verbose #6945 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:23 verbose #6946 > > │ ### ignore │ 00:09:23 verbose #6947 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:23 verbose #6948 > > 00:09:23 verbose #6949 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:23 verbose #6950 > > inl ignore forall t. (a : async t) : async () = 00:09:23 verbose #6951 > > run_target function 00:09:23 verbose #6952 > > | Fsharp (Native) => fun () => 00:09:23 verbose #6953 > > a |> $'Async.Ignore' 00:09:23 verbose #6954 > > | _ => fun () => null () 00:09:23 verbose #6955 > > 00:09:23 verbose #6956 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:23 verbose #6957 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:23 verbose #6958 > > │ ### run_synchronously │ 00:09:23 verbose #6959 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:23 verbose #6960 > > 00:09:23 verbose #6961 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:23 verbose #6962 > > inl run_synchronously forall t. (a : async t) : t = 00:09:23 verbose #6963 > > run_target function 00:09:23 verbose #6964 > > | Fsharp (Native) => fun () => 00:09:23 verbose #6965 > > a |> $'Async.RunSynchronously' 00:09:23 verbose #6966 > > | _ => fun () => null () 00:09:24 verbose #6967 > > 00:09:24 verbose #6968 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:24 verbose #6969 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:24 verbose #6970 > > │ ### start │ 00:09:24 verbose #6971 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:24 verbose #6972 > > 00:09:24 verbose #6973 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:24 verbose #6974 > > inl start (a : async ()) : () = 00:09:24 verbose #6975 > > run_target function 00:09:24 verbose #6976 > > | Fsharp (Native) => fun () => 00:09:24 verbose #6977 > > a |> $'Async.Start' 00:09:24 verbose #6978 > > | _ => fun () => null () 00:09:24 verbose #6979 > > 00:09:24 verbose #6980 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:24 verbose #6981 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:24 verbose #6982 > > │ ### start_child │ 00:09:24 verbose #6983 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:24 verbose #6984 > > 00:09:24 verbose #6985 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:24 verbose #6986 > > inl start_child forall t. (a : async t) : async (async t) = 00:09:24 verbose #6987 > > run_target function 00:09:24 verbose #6988 > > | Fsharp (Native) => fun () => 00:09:24 verbose #6989 > > a |> $'Async.StartChild' 00:09:24 verbose #6990 > > | _ => fun () => null () 00:09:24 verbose #6991 > > 00:09:24 verbose #6992 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:24 verbose #6993 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:24 verbose #6994 > > │ ### start_child_timeout │ 00:09:24 verbose #6995 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:24 verbose #6996 > > 00:09:24 verbose #6997 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:24 verbose #6998 > > inl start_child_timeout forall t. (timeout : i32) (a : async t) : async (async 00:09:24 verbose #6999 > > t) = 00:09:24 verbose #7000 > > run_target function 00:09:24 verbose #7001 > > | Fsharp (Native) => fun () => 00:09:24 verbose #7002 > > $'Async.StartChild (!a, !timeout)' 00:09:24 verbose #7003 > > | _ => fun () => null () 00:09:25 verbose #7004 > > 00:09:25 verbose #7005 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:25 verbose #7006 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:25 verbose #7007 > > │ ### start_immediate │ 00:09:25 verbose #7008 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:25 verbose #7009 > > 00:09:25 verbose #7010 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:25 verbose #7011 > > inl start_immediate forall t. (a : async t) : () = 00:09:25 verbose #7012 > > run_target function 00:09:25 verbose #7013 > > | Fsharp (Native) => fun () => 00:09:25 verbose #7014 > > a |> $'Async.StartImmediate' 00:09:25 verbose #7015 > > | _ => fun () => null () 00:09:25 verbose #7016 > > 00:09:25 verbose #7017 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:25 verbose #7018 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:25 verbose #7019 > > │ ### task_canceled_exception │ 00:09:25 verbose #7020 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:25 verbose #7021 > > 00:09:25 verbose #7022 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:25 verbose #7023 > > nominal task_canceled_exception = 00:09:25 verbose #7024 > > $'System.Threading.Tasks.TaskCanceledException' 00:09:26 verbose #7025 > > 00:09:26 verbose #7026 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:26 verbose #7027 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:26 verbose #7028 > > │ ### sleep │ 00:09:26 verbose #7029 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:26 verbose #7030 > > 00:09:26 verbose #7031 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:26 verbose #7032 > > inl sleep (ms : i32) : async () = 00:09:26 verbose #7033 > > run_target function 00:09:26 verbose #7034 > > | Fsharp (Native) => fun () => 00:09:26 verbose #7035 > > ms |> $'Async.Sleep' 00:09:26 verbose #7036 > > | _ => fun () => null () 00:09:26 verbose #7037 > > 00:09:26 verbose #7038 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:26 verbose #7039 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:26 verbose #7040 > > │ ### do │ 00:09:26 verbose #7041 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:26 verbose #7042 > > 00:09:26 verbose #7043 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:26 verbose #7044 > > inl do (a : async ()) : () = 00:09:26 verbose #7045 > > $'do\! !a ' 00:09:26 verbose #7046 > > 00:09:26 verbose #7047 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:26 verbose #7048 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:26 verbose #7049 > > │ ### let' │ 00:09:26 verbose #7050 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:26 verbose #7051 > > 00:09:26 verbose #7052 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:26 verbose #7053 > > inl let' forall t. (a : async t) : t = 00:09:26 verbose #7054 > > $'let\! !a = !a ' 00:09:26 verbose #7055 > > $'!a ' 00:09:27 verbose #7056 > > 00:09:27 verbose #7057 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:27 verbose #7058 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:27 verbose #7059 > > │ ### return_await │ 00:09:27 verbose #7060 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:27 verbose #7061 > > 00:09:27 verbose #7062 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:27 verbose #7063 > > inl return_await forall t. (a : async t) : () = 00:09:27 verbose #7064 > > $'return\! !a ' 00:09:27 verbose #7065 > > 00:09:27 verbose #7066 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:27 verbose #7067 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:27 verbose #7068 > > │ ### return_await' │ 00:09:27 verbose #7069 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:27 verbose #7070 > > 00:09:27 verbose #7071 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:27 verbose #7072 > > inl return_await' forall t. (a : async t) : t = 00:09:27 verbose #7073 > > $'return\! !a ' 00:09:28 verbose #7074 > > 00:09:28 verbose #7075 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:28 verbose #7076 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:28 verbose #7077 > > │ ### map │ 00:09:28 verbose #7078 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:28 verbose #7079 > > 00:09:28 verbose #7080 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:28 verbose #7081 > > inl map forall t u. (fn : t -> u) (a : async t) : async u = 00:09:28 verbose #7082 > > fun () => 00:09:28 verbose #7083 > > inl x = a |> let' 00:09:28 verbose #7084 > > fn x |> return 00:09:28 verbose #7085 > > |> new_async_unit 00:09:28 verbose #7086 > > 00:09:28 verbose #7087 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:28 verbose #7088 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:28 verbose #7089 > > │ ### catch' │ 00:09:28 verbose #7090 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:28 verbose #7091 > > 00:09:28 verbose #7092 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:28 verbose #7093 > > inl catch' forall t e. (a : async t) : async (choice2' t e) = 00:09:28 verbose #7094 > > run_target function 00:09:28 verbose #7095 > > | Fsharp (Native) => fun () => 00:09:28 verbose #7096 > > a |> $'Async.Catch' 00:09:28 verbose #7097 > > | _ => fun () => null () 00:09:29 verbose #7098 > > 00:09:29 verbose #7099 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:29 verbose #7100 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:29 verbose #7101 > > │ ### catch │ 00:09:29 verbose #7102 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:29 verbose #7103 > > 00:09:29 verbose #7104 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:29 verbose #7105 > > inl catch forall t e. (a : async t) : async (result t e) = 00:09:29 verbose #7106 > > a 00:09:29 verbose #7107 > > |> catch' 00:09:29 verbose #7108 > > |> map choice2_unbox 00:09:29 verbose #7109 > > |> map function 00:09:29 verbose #7110 > > | C1of2 result => Ok result 00:09:29 verbose #7111 > > | C2of2 ex => Error ex 00:09:29 verbose #7112 > > 00:09:29 verbose #7113 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:29 verbose #7114 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:29 verbose #7115 > > │ ### run_with_timeout_async │ 00:09:29 verbose #7116 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:29 verbose #7117 > > 00:09:29 verbose #7118 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:29 verbose #7119 > > inl run_with_timeout_async forall t. (timeout : i32) (fn : async t) : async 00:09:29 verbose #7120 > > (option t) = 00:09:29 verbose #7121 > > run_target function 00:09:29 verbose #7122 > > | Fsharp (Native) => fun () => 00:09:29 verbose #7123 > > fun () => 00:09:29 verbose #7124 > > inl child = fn |> start_child_timeout timeout |> let' 00:09:29 verbose #7125 > > child 00:09:29 verbose #7126 > > |> catch 00:09:29 verbose #7127 > > |> map function 00:09:29 verbose #7128 > > | Ok result => Some result 00:09:29 verbose #7129 > > | Error ex when ex |> sm'.format_debug |> sm'.contains 00:09:29 verbose #7130 > > "System.TimeoutException" => 00:09:29 verbose #7131 > > trace Verbose 00:09:29 verbose #7132 > > fun () => $'"async.run_with_timeout_async"' 00:09:29 verbose #7133 > > fun () => { timeout } 00:09:29 verbose #7134 > > None 00:09:29 verbose #7135 > > | Error (ex : exn) => 00:09:29 verbose #7136 > > trace Critical 00:09:29 verbose #7137 > > fun () => $'$"async.run_with_timeout_async**"' 00:09:29 verbose #7138 > > fun () => { timeout ex = ex |> sm'.format_exception 00:09:29 verbose #7139 > > } 00:09:29 verbose #7140 > > None 00:09:29 verbose #7141 > > |> return_await 00:09:29 verbose #7142 > > |> new_async_unit 00:09:29 verbose #7143 > > | _ => fun () => null () 00:09:30 verbose #7144 > > 00:09:30 verbose #7145 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:30 verbose #7146 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:30 verbose #7147 > > │ ### run_with_timeout │ 00:09:30 verbose #7148 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:30 verbose #7149 > > 00:09:30 verbose #7150 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:30 verbose #7151 > > inl run_with_timeout timeout fn = 00:09:30 verbose #7152 > > fn 00:09:30 verbose #7153 > > |> run_with_timeout_async timeout 00:09:30 verbose #7154 > > |> run_synchronously 00:09:30 verbose #7155 > > 00:09:30 verbose #7156 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:30 verbose #7157 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:30 verbose #7158 > > │ ### cancellation_token │ 00:09:30 verbose #7159 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:30 verbose #7160 > > 00:09:30 verbose #7161 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:30 verbose #7162 > > inl cancellation_token () : async threading.cancellation_token = 00:09:30 verbose #7163 > > $'Async.CancellationToken' 00:09:30 verbose #7164 > > 00:09:30 verbose #7165 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:30 verbose #7166 > > inl default_cancellation_token () : threading.cancellation_token = 00:09:30 verbose #7167 > > $'Async.DefaultCancellationToken' 00:09:31 verbose #7168 > > 00:09:31 verbose #7169 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:31 verbose #7170 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:31 verbose #7171 > > │ ### merge_cancellation_token_with_default_async │ 00:09:31 verbose #7172 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:31 verbose #7173 > > 00:09:31 verbose #7174 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:31 verbose #7175 > > inl merge_cancellation_token_with_default_async 00:09:31 verbose #7176 > > (token : threading.cancellation_token) 00:09:31 verbose #7177 > > : async threading.cancellation_token 00:09:31 verbose #7178 > > = 00:09:31 verbose #7179 > > run_target function 00:09:31 verbose #7180 > > | Fsharp (Native) => fun () => 00:09:31 verbose #7181 > > fun () => 00:09:31 verbose #7182 > > inl ct = cancellation_token () |> let' 00:09:31 verbose #7183 > > inl dct = default_cancellation_token () 00:09:31 verbose #7184 > > inl cts = threading.create_linked_token_source ;[[ ct; dct; 00:09:31 verbose #7185 > > token ]] 00:09:31 verbose #7186 > > cts |> threading.cancellation_source_token |> return 00:09:31 verbose #7187 > > |> new_async_unit 00:09:31 verbose #7188 > > | _ => fun () => null () 00:09:31 verbose #7189 > > 00:09:31 verbose #7190 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:31 verbose #7191 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:31 verbose #7192 > > │ ### with_trace_level │ 00:09:31 verbose #7193 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:31 verbose #7194 > > 00:09:31 verbose #7195 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:31 verbose #7196 > > inl with_trace_level forall t. level fn : _ t = new_async fun () => 00:09:31 verbose #7197 > > inl trace_state = get_trace_state_or_init None 00:09:31 verbose #7198 > > inl old_trace_level = *trace_state.level 00:09:31 verbose #7199 > > inl trace_level = trace_state.level 00:09:31 verbose #7200 > > try_finally 00:09:31 verbose #7201 > > fun () => 00:09:31 verbose #7202 > > trace_level <- level 00:09:31 verbose #7203 > > fn |> return_await 00:09:31 verbose #7204 > > fun () => 00:09:31 verbose #7205 > > trace_level <- old_trace_level 00:09:32 verbose #7206 > > 00:09:32 verbose #7207 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:32 verbose #7208 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:32 verbose #7209 > > │ ### value_task │ 00:09:32 verbose #7210 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:32 verbose #7211 > > 00:09:32 verbose #7212 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:32 verbose #7213 > > nominal value_task = $'System.Threading.Tasks.ValueTask' 00:09:32 verbose #7214 > > 00:09:32 verbose #7215 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:32 verbose #7216 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:32 verbose #7217 > > │ ### value_task_as_task │ 00:09:32 verbose #7218 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:32 verbose #7219 > > 00:09:32 verbose #7220 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:32 verbose #7221 > > inl value_task_as_task (task : value_task) : task () = 00:09:32 verbose #7222 > > $'!task.AsTask' () 00:09:33 verbose #7223 > > 00:09:33 verbose #7224 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:33 verbose #7225 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:33 verbose #7226 > > │ ### await_value_task_unit │ 00:09:33 verbose #7227 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:33 verbose #7228 > > 00:09:33 verbose #7229 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:33 verbose #7230 > > inl await_value_task_unit (task : value_task) : async () = 00:09:33 verbose #7231 > > task |> value_task_as_task |> await_task 00:09:33 verbose #7232 > > 00:09:33 verbose #7233 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:33 verbose #7234 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:33 verbose #7235 > > │ ## main │ 00:09:33 verbose #7236 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:33 verbose #7237 > > 00:09:33 verbose #7238 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:33 verbose #7239 > > inl main () = 00:09:33 verbose #7240 > > $'let merge_cancellation_token_with_default_async x = 00:09:33 verbose #7241 > > !merge_cancellation_token_with_default_async x' : () 00:09:34 verbose #7242 > 00:00:38 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 41785 } 00:09:34 verbose #7243 > 00:00:38 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:09:34 verbose #7244 > "nbconvert", 00:09:34 verbose #7245 > "c:/home/git/polyglot/lib/spiral/async.dib.ipynb", 00:09:34 verbose #7246 > "--to", 00:09:34 verbose #7247 > "html", 00:09:34 verbose #7248 > "--HTMLExporter.theme=dark", 00:09:34 verbose #7249 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/async.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:09:37 verbose #7250 > 00:00:40 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/async.dib.ipynb to html 00:09:37 verbose #7251 > 00:00:40 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:09:37 verbose #7252 > 00:00:40 verbose #7 ! validate(nb) 00:09:39 verbose #7253 > 00:00:42 verbose #8 ! [NbConvertApp] Writing 403592 bytes to c:\home\git\polyglot\lib\spiral\async.dib.html 00:09:39 verbose #7254 > 00:00:43 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 641 } 00:09:39 verbose #7255 > 00:00:43 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 641 } 00:09:39 verbose #7256 > 00:00:43 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:09:39 verbose #7257 > "-c", 00:09:39 verbose #7258 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/async.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:09:39 verbose #7259 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/async.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:09:39 verbose #7260 > 00:00:43 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:09:39 verbose #7261 > 00:00:43 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:09:39 verbose #7262 > 00:00:43 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 42485 } 00:09:39 debug #7263 runtime.execute_with_options_async / { exit_code = 0; output_length = 46850 } 00:09:39 debug #9 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path async.dib --retries 3 00:09:39 debug #7264 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path runtime.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:09:39 verbose #7265 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "runtime.dib", "--retries", "3"])) } 00:09:39 verbose #7266 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:09:39 verbose #7267 > "repl", 00:09:39 verbose #7268 > "--exit-after-run", 00:09:39 verbose #7269 > "--run", 00:09:39 verbose #7270 > "c:/home/git/polyglot/lib/spiral/runtime.dib", 00:09:39 verbose #7271 > "--output-path", 00:09:39 verbose #7272 > "c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb", 00:09:39 verbose #7273 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/runtime.dib" --output-path "c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:09:41 verbose #7274 > > 00:09:41 verbose #7275 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:41 verbose #7276 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:41 verbose #7277 > > │ # runtime │ 00:09:41 verbose #7278 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:45 verbose #7279 > > 00:09:45 verbose #7280 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:45 verbose #7281 > > open rust 00:09:45 verbose #7282 > > open rust_operators 00:09:45 verbose #7283 > > open sm'_operators 00:09:46 verbose #7284 > > 00:09:46 verbose #7285 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:46 verbose #7286 > > //// test 00:09:46 verbose #7287 > > 00:09:46 verbose #7288 > > open testing 00:09:46 verbose #7289 > > open file_system_operators 00:09:47 verbose #7290 > > 00:09:47 verbose #7291 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:47 verbose #7292 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:47 verbose #7293 > > │ ## runtime │ 00:09:47 verbose #7294 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:47 verbose #7295 > > 00:09:47 verbose #7296 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:09:47 verbose #7297 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:09:47 verbose #7298 > > │ ### split_args │ 00:09:47 verbose #7299 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:09:47 verbose #7300 > > 00:09:47 verbose #7301 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:47 verbose #7302 > > let split_args (args : string) : result (array_base string) string = 00:09:47 verbose #7303 > > open parsing 00:09:47 verbose #7304 > > inl esc = [[ '\\'; '`' ]] 00:09:47 verbose #7305 > > inl quotes = [[ '"' ]] 00:09:47 verbose #7306 > > inl special = esc ++ quotes 00:09:47 verbose #7307 > > inl p_esc_char c = 00:09:47 verbose #7308 > > p_char c >>. any_char () |>> fun c' => $'$"{!c}{!c'}"' 00:09:47 verbose #7309 > > inl p_word = special |> none_of |>> sm'.obj_to_string 00:09:47 verbose #7310 > > inl p_plain = special ++ [[ ' ' ]] |> none_of |> many1_chars 00:09:47 verbose #7311 > > inl p_text = p_word |> many1_strings 00:09:47 verbose #7312 > > inl p_esc = esc |> listm.map p_esc_char |> choice 00:09:47 verbose #7313 > > inl p_quoted = (p_word <|> p_esc) |> many |>> sm'.concat_list "" 00:09:47 verbose #7314 > > inl p_quoted_all = p_quoted |> between (p_char '"') (p_char '"') 00:09:47 verbose #7315 > > inl p_esc_root = p_esc >>% "" >>. (p_word |> many) |>> sm'.concat_list "" 00:09:47 verbose #7316 > > inl p_content = p_plain <|> p_quoted_all <|> p_esc_root 00:09:47 verbose #7317 > > inl p_args = spaces1 () |> sep_by p_content 00:09:47 verbose #7318 > > args 00:09:47 verbose #7319 > > |> parse p_args 00:09:47 verbose #7320 > > |> resultm.map (fst >> listm'.box >> listm'.to_array') 00:09:47 verbose #7321 > > 00:09:47 verbose #7322 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:09:47 verbose #7323 > > //// test 00:09:47 verbose #7324 > > ///! fsharp 00:09:47 verbose #7325 > > ////! cuda // Only stack allocated primitive types (i8,i16,i32,i64 and 00:09:47 verbose #7326 > > u8,u16,u32,u64 and f32,f64 and bool) are allowed in CuPy arrays. 00:09:47 verbose #7327 > > ///! rust 00:09:47 verbose #7328 > > ///! typescript 00:09:47 verbose #7329 > > ///! python 00:09:47 verbose #7330 > > 00:09:47 verbose #7331 > > [[ 00:09:47 verbose #7332 > > "a b c", 00:09:47 verbose #7333 > > ;[[ "a"; "b"; "c" ]] 00:09:47 verbose #7334 > > 00:09:47 verbose #7335 > > "e f \"g h\" i", 00:09:47 verbose #7336 > > ;[[ "e"; "f"; "g h"; "i" ]] 00:09:47 verbose #7337 > > 00:09:47 verbose #7338 > > "\"j k\" \"l\" \"m\"", 00:09:47 verbose #7339 > > ;[[ "j k"; "l"; "m" ]] 00:09:47 verbose #7340 > > 00:09:47 verbose #7341 > > "s -t \"u \`\"v\`\" w\"", 00:09:47 verbose #7342 > > ;[[ "s"; "-t"; "u \`\"v\`\" w" ]] 00:09:47 verbose #7343 > > 00:09:47 verbose #7344 > > "n -o \"p \\\"q\\\" r\"", 00:09:47 verbose #7345 > > ;[[ "n"; "-o"; "p \\\"q\\\" r" ]] 00:09:47 verbose #7346 > > 00:09:47 verbose #7347 > > "r -s \"t \\\"u\\\"\"", 00:09:47 verbose #7348 > > ;[[ "r"; "-s"; "t \\\"u\\\"" ]] 00:09:47 verbose #7349 > > 00:09:47 verbose #7350 > > $'$"x -y \\\"$z -a \'(b=\\\\\\"c-id=)[[a-fA-F0-9]]{{8}}\', {{ \`$_[[1]] + 00:09:47 verbose #7351 > > \`$d++ }}\\\""', 00:09:47 verbose #7352 > > ;[[ "x"; "-y"; "$z -a '(b=\\\"c-id=)[[a-fA-F0-9]]{8}', { `$_[[1]] + `$d++ }" 00:09:47 verbose #7353 > > ]] 00:09:47 verbose #7354 > > 00:09:47 verbose #7355 > > "e -f \"$g -h '(i=`\"j-id=)[[a-fA-F0-9]]{8}', { `$_[[1]] + `$k++ }\"", 00:09:47 verbose #7356 > > ;[[ "e"; "-f"; "$g -h '(i=`\"j-id=)[[a-fA-F0-9]]{8}', { `$_[[1]] + `$k++ }" 00:09:47 verbose #7357 > > ]] 00:09:47 verbose #7358 > > 00:09:47 verbose #7359 > > $'$"--l \\\\\\"\'\'\' m \'\'\'\\\\\\" "', 00:09:47 verbose #7360 > > ;[[ "--l"; "''' m '''" ]] 00:09:47 verbose #7361 > > 00:09:47 verbose #7362 > > $'$"n --o --p q --r \\\"s:/t u/v.w\\\" --x \\\"y:/z.a\\\" --b c.d 00:09:47 verbose #7363 > > \\\"\\\\e{{f-g}}\\\" h.i \\\"j (k)\\\""', 00:09:47 verbose #7364 > > ;[[ "n"; "--o"; "--p"; "q"; "--r"; "s:/t u/v.w"; "--x"; "y:/z.a"; "--b"; 00:09:47 verbose #7365 > > "c.d"; "\\e{f-g}"; "h.i"; "j (k)" ]] 00:09:47 verbose #7366 > > 00:09:47 verbose #7367 > > $'\@$"l ""m n:\\o.p"""', 00:09:47 verbose #7368 > > ;[[ "l"; "m n:\\o.p" ]] 00:09:47 verbose #7369 > > ]] 00:09:47 verbose #7370 > > |> _assert_fn split_args 00:10:21 verbose #7371 > > 00:10:21 verbose #7372 > > ╭─[ 33.90s - return value ]────────────────────────────────────────────────────╮ 00:10:21 verbose #7373 > > │ │ 00:10:21 verbose #7374 > > │ .rs output: │ 00:10:21 verbose #7375 > > │ │ 00:10:21 verbose #7376 > > │ 00:00:00 verbose #1 _assert_fn / { input = a b c } │ 00:10:21 verbose #7377 > > │ __assert_eq' / actual: Array(MutCell(["a", "b", "c"])) / expected: │ 00:10:21 verbose #7378 > > │ Array(MutCell(["a", "b", "c"])) │ 00:10:21 verbose #7379 > > │ │ 00:10:21 verbose #7380 > > │ 00:00:00 verbose #2 _assert_fn / { input = e f "g h" i } │ 00:10:21 verbose #7381 > > │ __assert_eq' / actual: Array(MutCell(["e", "f", "g h", "i"])) / expected: │ 00:10:21 verbose #7382 > > │ Array(MutCell(["e", "f", "g h", "i"])) │ 00:10:21 verbose #7383 > > │ │ 00:10:21 verbose #7384 > > │ 00:00:00 verbose #3 _assert_fn / { input = "j k" "l" "m" } │ 00:10:21 verbose #7385 > > │ __assert_eq' / actual: Array(MutCell(["j k", "l", "m"])) / expected: │ 00:10:21 verbose #7386 > > │ Array(MutCell(["j k", "l", "m"])) │ 00:10:21 verbose #7387 > > │ │ 00:10:21 verbose #7388 > > │ 00:00:00 verbose #4 _assert_fn / { input = s -t "u `"v`" w" } │ 00:10:21 verbose #7389 > > │ __assert_eq' / actual: Array(MutCell(["s", "-t", "u `"v`" w"])) / expected: │ 00:10:21 verbose #7390 > > │ Array(MutCell(["s", "-t", "u `"v`" w"])) │ 00:10:21 verbose #7391 > > │ │ 00:10:21 verbose #7392 > > │ 00:00:00 verbose #5 _assert_fn / { input = n -o "p \"q\" r" } │ 00:10:21 verbose #7393 > > │ __assert_eq' / actual: Array(MutCell(["n", "-o", "p \"q\" r"])) / expected: │ 00:10:21 verbose #7394 > > │ Array(MutCell(["n", "-o", "p \"q\" r"])) │ 00:10:21 verbose #7395 > > │ │ 00:10:21 verbose #7396 > > │ 00:00:00 verbose #6 _assert_fn / { input = r -s "t \"u\"" } │ 00:10:21 verbose #7397 > > │ __assert_eq' / actual: Array(MutCell(["r", "-s", "t \"u\""])) / expected: │ 00:10:21 verbose #7398 > > │ Array(MutCell(["r", "-s", "t \"u\""])) │ 00:10:21 verbose #7399 > > │ │ 00:10:21 verbose #7400 > > │ 00:00:00 verbose #7 _assert_fn / { input = x -y "$z -a '(b=\"c-id=)[ │ 00:10:21 verbose #7401 > > │ a-fA-F0-9]{8}', { `$_[1] + `$d++ }" } │ 00:10:21 verbose #7402 > > │ __assert_eq' / actual: Array(MutCell(["x", "-y", "$z -a '(b=\"c-id=)[ │ 00:10:21 verbose #7403 > > │ a-fA-F0-9]{8}', { `$_[1] + `$d++ }"])) / expected: Array(MutCell(["x", "-y", │ 00:10:21 verbose #7404 > > │ "$z -a '(b=\"c-id=)[a-fA-F0-9]{8}', { `$_[1] + `$d++ }"])) │ 00:10:21 verbose #7405 > > │ │ 00:10:21 verbose #7406 > > │ 00:00:00 verbose #8 _assert_fn / { input = e -f "$g -h '(i=`"j-id=)[ │ 00:10:21 verbose #7407 > > │ a-fA-F...__assert_eq' / actual: ['n', '-o', 'p \\"q\\" r'] / expected: ['n', │ 00:10:21 verbose #7408 > > │ '-o', 'p \\"q\\" r'] │ 00:10:21 verbose #7409 > > │ │ 00:10:21 verbose #7410 > > │ 00:00:00 verbose #6 _assert_fn / { input = r -s "t \"u\"" } │ 00:10:21 verbose #7411 > > │ __assert_eq' / actual: ['r', '-s', 't \\"u\\"'] / expected: ['r', '-s', 't │ 00:10:21 verbose #7412 > > │ \\"u\\"'] │ 00:10:21 verbose #7413 > > │ │ 00:10:21 verbose #7414 > > │ 00:00:00 verbose #7 _assert_fn / { input = x -y "$z -a '(b=\"c-id=)[ │ 00:10:21 verbose #7415 > > │ a-fA-F0-9]{8}', { `$_[1] + `$d++ }" } │ 00:10:21 verbose #7416 > > │ __assert_eq' / actual: ['x', '-y', '$z -a \'(b=\\"c-id=)[a-fA-F0-9]{8}\', { │ 00:10:21 verbose #7417 > > │ `$_[1] + `$d++ }'] / expected: ['x', '-y', '$z -a \'(b=\\"c-id=)[ │ 00:10:21 verbose #7418 > > │ a-fA-F0-9]{8}\', { `$_[1] + `$d++ }'] │ 00:10:21 verbose #7419 > > │ │ 00:10:21 verbose #7420 > > │ 00:00:00 verbose #8 _assert_fn / { input = e -f "$g -h '(i=`"j-id=)[ │ 00:10:21 verbose #7421 > > │ a-fA-F0-9]{8}', { `$_[1] + `$k++ }" } │ 00:10:21 verbose #7422 > > │ __assert_eq' / actual: ['e', '-f', '$g -h \'(i=`"j-id=)[a-fA-F0-9]{8}\', { │ 00:10:21 verbose #7423 > > │ `$_[1] + `$k++ }'] / expected: ['e', '-f', '$g -h \'(i=`"j-id=)[ │ 00:10:21 verbose #7424 > > │ a-fA-F0-9]{8}\', { `$_[1] + `$k++ }'] │ 00:10:21 verbose #7425 > > │ │ 00:10:21 verbose #7426 > > │ 00:00:00 verbose #9 _assert_fn / { input = --l \"''' m '''\" } │ 00:10:21 verbose #7427 > > │ __assert_eq' / actual: ['--l', "''' m '''"] / expected: ['--l', "''' m '''"] │ 00:10:21 verbose #7428 > > │ │ 00:10:21 verbose #7429 > > │ 00:00:00 verbose #10 _assert_fn / { input = n --o --p q --r "s:/t │ 00:10:21 verbose #7430 > > │ u/v.w" --x "y:/z.a" --b c.d "\e{f-g}" h.i "j (k)" } │ 00:10:21 verbose #7431 > > │ __assert_eq' / actual: ['n', '--o', '--p', 'q', '--r', 's:/t u/v.w', '--x', │ 00:10:21 verbose #7432 > > │ 'y:/z.a', '--b', 'c.d', '\\e{f-g}', 'h.i', 'j (k)'] / expected: ['n', '--o', │ 00:10:21 verbose #7433 > > │ '--p', 'q', '--r', 's:/t u/v.w', '--x', 'y:/z.a', '--b', 'c.d', '\\e{f-g}', │ 00:10:21 verbose #7434 > > │ 'h.i', 'j (k)'] │ 00:10:21 verbose #7435 > > │ │ 00:10:21 verbose #7436 > > │ 00:00:00 verbose #11 _assert_fn / { input = l "m n:\o.p" } │ 00:10:21 verbose #7437 > > │ __assert_eq' / actual: ['l', 'm n:\\o.p'] / expected: ['l', 'm n:\\o.p'] │ 00:10:21 verbose #7438 > > │ │ 00:10:21 verbose #7439 > > │ │ 00:10:21 verbose #7440 > > │ │ 00:10:21 verbose #7441 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:21 verbose #7442 > > 00:10:21 verbose #7443 > > ╭─[ 33.92s - stdout ]──────────────────────────────────────────────────────────╮ 00:10:21 verbose #7444 > > │ .fsx output: │ 00:10:21 verbose #7445 > > │ │ 00:10:21 verbose #7446 > > │ 00:00:00 verbose #1 _assert_fn / { input = a b c } │ 00:10:21 verbose #7447 > > │ __assert_eq' / actual: [|"a"; "b"; "c"|] / expected: [|"a"; "b"; "c"|] │ 00:10:21 verbose #7448 > > │ │ 00:10:21 verbose #7449 > > │ 00:00:00 verbose #2 _assert_fn / { input = e f "g h" i } │ 00:10:21 verbose #7450 > > │ __assert_eq' / actual: [|"e"; "f"; "g h"; "i"|] / expected: [|"e"; "f"; "g │ 00:10:21 verbose #7451 > > │ h"; "i"|] │ 00:10:21 verbose #7452 > > │ │ 00:10:21 verbose #7453 > > │ 00:00:00 verbose #3 _assert_fn / { input = "j k" "l" "m" } │ 00:10:21 verbose #7454 > > │ __assert_eq' / actual: [|"j k"; "l"; "m"|] / expected: [|"j k"; "l"; "m"|] │ 00:10:21 verbose #7455 > > │ │ 00:10:21 verbose #7456 > > │ 00:00:00 verbose #4 _assert_fn / { input = s -t "u `"v`" w" } │ 00:10:21 verbose #7457 > > │ __assert_eq' / actual: [|"s"; "-t"; "u `"v`" w"|] / expected: [|"s"; "-t"; │ 00:10:21 verbose #7458 > > │ "u `"v`" w"|] │ 00:10:21 verbose #7459 > > │ │ 00:10:21 verbose #7460 > > │ 00:00:00 verbose #5 _assert_fn / { input = n -o "p \"q\" r" } │ 00:10:21 verbose #7461 > > │ __assert_eq' / actual: [|"n"; "-o"; "p \"q\" r"|] / expected: [|"n"; "-o"; │ 00:10:21 verbose #7462 > > │ "p \"q\" r"|] │ 00:10:21 verbose #7463 > > │ │ 00:10:21 verbose #7464 > > │ 00:00:00 verbose #6 _assert_fn / { input = r -s "t \"u\"" } │ 00:10:21 verbose #7465 > > │ __assert_eq' / actual: [|"r"; "-s"; "t \"u\""|] / expected: [|"r"; "-s"; "t │ 00:10:21 verbose #7466 > > │ \"u\""|] │ 00:10:21 verbose #7467 > > │ │ 00:10:21 verbose #7468 > > │ 00:00:00 verbose #7 _assert_fn / { input = x -y "$z -a '(b=\"c-id=)[ │ 00:10:21 verbose #7469 > > │ a-fA-F0-9]{8}', { `$_[1] + `$d++ }" } │ 00:10:21 verbose #7470 > > │ __assert_eq' / actual: [|"x"; "-y"; "$z -a '(b=\"c-id=)[a-fA-F0-9]{8}', { │ 00:10:21 verbose #7471 > > │ `$_[1] + `$d++ }"|] / expected: [|"x"; "-y"; "$z -a '(b=\"c-id=)[ │ 00:10:21 verbose #7472 > > │ a-fA-F0-9]{8}', { `$_[1] + `$d++ }"|] │ 00:10:21 verbose #7473 > > │ │ 00:10:21 verbose #7474 > > │ 00:00:00 verbose #8 _assert_fn / { input = e -f "$g -h '(i=`"j-id=)[ │ 00:10:21 verbose #7475 > > │ a-fA-F0-9]{8}', { `$_[1] + `$k++ }" } │ 00:10:21 verbose #7476 > > │ __assert_eq' / actual: [|"e"; "-f"; "$g -h '(i=`"j-id=)[a-fA-F0-9]{8}', { │ 00:10:21 verbose #7477 > > │ `$_[1] + `$k++ }"|] / expected: [|"e"; "-f"; "$g -h '(i=`"j-id=)[ │ 00:10:21 verbose #7478 > > │ a-fA-F0-9]{8}', { `$_[1] + `$k++ }"|] │ 00:10:21 verbose #7479 > > │ │ 00:10:21 verbose #7480 > > │ 00:00:00 verbose #9 _assert_fn / { input = --l \"''' m '''\" } │ 00:10:21 verbose #7481 > > │ __assert_eq' / actual: [|"--l"; "''' m '''"|] / expected: [|"--l"; "''' m │ 00:10:21 verbose #7482 > > │ '''"|] │ 00:10:21 verbose #7483 > > │ │ 00:10:21 verbose #7484 > > │ 00:00:00 verbose #10 _assert_fn / { input = n --o --p q --r "s:/t │ 00:10:21 verbose #7485 > > │ u/v.w" --x "y:/z.a" --b c.d "\e{f-g}" h.i "j (k)" } │ 00:10:21 verbose #7486 > > │ __assert_eq' / actual: [|"n"; "--o"; "--p"; "q"; "--r"; "s:/t u/v.w"; "--x"; │ 00:10:21 verbose #7487 > > │ "y:/z.a"; "--b"; "c.d"; │ 00:10:21 verbose #7488 > > │ "\e{f-g}"; "h.i"; "j (k)"|] / expected: [|"n"; "--o"; "--p"; "q"; "--r"; │ 00:10:21 verbose #7489 > > │ "s:/t u/v.w"; "--x"; "y:/z.a"; "--b"; "c.d"; │ 00:10:21 verbose #7490 > > │ "\e{f-g}"; "h.i"; "j (k)"|] │ 00:10:21 verbose #7491 > > │ │ 00:10:21 verbose #7492 > > │ 00:00:00 verbose #11 _assert_fn / { input = l "m n:\o.p" } │ 00:10:21 verbose #7493 > > │ __assert_eq' / actual: [|"l"; "m n:\o.p"|] / expected: [|"l"; "m n:\o.p"|] │ 00:10:21 verbose #7494 > > │ │ 00:10:21 verbose #7495 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:21 verbose #7496 > > 00:10:21 verbose #7497 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:10:21 verbose #7498 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:10:21 verbose #7499 > > │ ### split_command │ 00:10:21 verbose #7500 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:21 verbose #7501 > > 00:10:21 verbose #7502 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:10:21 verbose #7503 > > let split_command (command : string) : result (string * option string) string = 00:10:21 verbose #7504 > > open parsing 00:10:21 verbose #7505 > > inl quotes = [[ '"'; '\'' ]] 00:10:21 verbose #7506 > > inl p_quoted_char = quotes |> listm.map p_char |> choice 00:10:21 verbose #7507 > > inl normalize = function '\\' => '/' | c => c 00:10:21 verbose #7508 > > inl p_quoted = quotes |> none_of |>> normalize |> many_chars |> between 00:10:21 verbose #7509 > > p_quoted_char p_quoted_char 00:10:21 verbose #7510 > > inl p_unquoted = quotes ++ [[ ' ' ]] |> none_of |>> normalize |> many1_chars 00:10:21 verbose #7511 > > inl p_path = p_quoted <|> p_unquoted <|> eof () >>% "" .>> spaces () 00:10:21 verbose #7512 > > inl p_args = p_char ' ' |> opt >>. (any_char () |> many1_chars) 00:10:21 verbose #7513 > > inl p_command = p_path .>>. (p_args |> opt) 00:10:21 verbose #7514 > > command 00:10:21 verbose #7515 > > |> parse p_command 00:10:21 verbose #7516 > > |> resultm.map fst 00:10:22 verbose #7517 > > 00:10:22 verbose #7518 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:10:22 verbose #7519 > > //// test 00:10:22 verbose #7520 > > ///! fsharp 00:10:22 verbose #7521 > > ////! cuda // Only stack allocated primitive types (i8,i16,i32,i64 and 00:10:22 verbose #7522 > > u8,u16,u32,u64 and f32,f64 and bool) are allowed in CuPy arrays. 00:10:22 verbose #7523 > > ///! rust 00:10:22 verbose #7524 > > ///! typescript 00:10:22 verbose #7525 > > ///! python 00:10:22 verbose #7526 > > 00:10:22 verbose #7527 > > [[ 00:10:22 verbose #7528 > > "", 00:10:22 verbose #7529 > > ("", None) 00:10:22 verbose #7530 > > 00:10:22 verbose #7531 > > "/a/b/c", 00:10:22 verbose #7532 > > ("/a/b/c", None) 00:10:22 verbose #7533 > > 00:10:22 verbose #7534 > > "d e.f", 00:10:22 verbose #7535 > > ("d", Some "e.f") 00:10:22 verbose #7536 > > 00:10:22 verbose #7537 > > $'"""..\\..\\g.h i.j k.l"""', 00:10:22 verbose #7538 > > ("../../g.h", Some "i.j k.l") 00:10:22 verbose #7539 > > 00:10:22 verbose #7540 > > $'\@"m:\\n\\o.p ""q.r s.t"""', 00:10:22 verbose #7541 > > ("m:/n/o.p", Some $'\@"""q.r s.t"""') 00:10:22 verbose #7542 > > 00:10:22 verbose #7543 > > $'\@"""..\\..\\u v\\w.x"" ""y z.a"" b.c"', 00:10:22 verbose #7544 > > ("../../u v/w.x", Some $'\@"""y z.a"" b.c"') 00:10:22 verbose #7545 > > 00:10:22 verbose #7546 > > $'\@"""..\\..\\d e.f"" -g \\\\""h i\\\\"""', 00:10:22 verbose #7547 > > ("../../d e.f", Some $'\@"-g \\\\""h i\\\\"""') 00:10:22 verbose #7548 > > 00:10:22 verbose #7549 > > $'\@"..\\..\\j k.l -m \\\\""n o\\\\"""', 00:10:22 verbose #7550 > > ("../../j", Some $'\@"k.l -m \\\\""n o\\\\"""') 00:10:22 verbose #7551 > > ]] 00:10:22 verbose #7552 > > |> _assert_fn split_command 00:10:52 verbose #7553 > > 00:10:52 verbose #7554 > > ╭─[ 30.66s - return value ]────────────────────────────────────────────────────╮ 00:10:52 verbose #7555 > > │ │ 00:10:52 verbose #7556 > > │ .rs output: │ 00:10:52 verbose #7557 > > │ │ 00:10:52 verbose #7558 > > │ 00:00:00 verbose #1 _assert_fn / { input = } │ 00:10:52 verbose #7559 > > │ __assert_eq' / actual: ("", US1_1) / expected: ("", US1_1) │ 00:10:52 verbose #7560 > > │ │ 00:10:52 verbose #7561 > > │ 00:00:00 verbose #2 _assert_fn / { input = /a/b/c } │ 00:10:52 verbose #7562 > > │ __assert_eq' / actual: ("/a/b/c", US1_1) / expected: ("/a/b/c", US1_1) │ 00:10:52 verbose #7563 > > │ │ 00:10:52 verbose #7564 > > │ 00:00:00 verbose #3 _assert_fn / { input = d e.f } │ 00:10:52 verbose #7565 > > │ __assert_eq' / actual: ("d", US1_0("e.f")) / expected: ("d", US1_0("e.f")) │ 00:10:52 verbose #7566 > > │ │ 00:10:52 verbose #7567 > > │ 00:00:00 verbose #4 _assert_fn / { input = ..\..\g.h i.j k.l } │ 00:10:52 verbose #7568 > > │ __assert_eq' / actual: ("../../g.h", US1_0("i.j k.l")) / expected: │ 00:10:52 verbose #7569 > > │ ("../../g.h", US1_0("i.j k.l")) │ 00:10:52 verbose #7570 > > │ │ 00:10:52 verbose #7571 > > │ 00:00:00 verbose #5 _assert_fn / { input = m:\n\o.p "q.r s.t" } │ 00:10:52 verbose #7572 > > │ __assert_eq' / actual: ("m:/n/o.p", US1_0(""q.r s.t"")) / expected: │ 00:10:52 verbose #7573 > > │ ("m:/n/o.p", US1_0(""q.r s.t"")) │ 00:10:52 verbose #7574 > > │ │ 00:10:52 verbose #7575 > > │ 00:00:00 verbose #6 _assert_fn / { input = "..\..\u v\w.x" "y z.a" b.c │ 00:10:52 verbose #7576 > > │ } │ 00:10:52 verbose #7577 > > │ __assert_eq' / actual: ("../../u v/w.x", US1_0(""y z.a" b.c")) / expected: │ 00:10:52 verbose #7578 > > │ ("../../u v/w.x", US1_0(""y z.a" b.c")) │ 00:10:52 verbose #7579 > > │ │ 00:10:52 verbose #7580 > > │ 00:00:00 verbose #7 _assert_fn / { input = "..\..\d e.f" -g \\"h i\\" │ 00:10:52 verbose #7581 > > │ } │ 00:10:52 verbose #7582 > > │ __assert_eq' / actual: ("../../d e.f", US1_0("-g \\"h i\\"")) / expected: │ 00:10:52 verbose #7583 > > │ ("../../d e.f", US1_0("-g \\"h i\\"")) │ 00:10:52 verbose #7584 > > │ │ 00:10:52 verbose #7585 > > │ 00:00:00 verbose #8 _assert_fn / { input = ..\..\j k.l -m \\"n o\\" } │ 00:10:52 verbose #7586 > > │ __assert_eq' / actual: ("../../j", US1_0("k.l -m \\"n o\\"")) / expected: │ 00:10:52 verbose #7587 > > │ ("../../j", US1_0("k.l -m \\"n o\\"")) │ 00:10:52 verbose #7588 > > │ │ 00:10:52 verbose #7589 > > │ │ 00:10:52 verbose #7590 > > │ .ts output: │ 00:10:52 verbose #7591 > > │ │ 00:10:52 verbose #7592 > > │ 00:00:00 verbose #1 _assert_fn / { input = } │ 00:10:52 verbose #7593 > > │ __assert_eq' / actual: ,US1_1 / expected: ,US1_1 │ 00:10:52 verbose #7594 > > │ │ 00:10:52 verbose #7595 > > │ 00:00:00 verbose #2 _assert_fn /... #8 _assert_fn / { input = ..\..\j │ 00:10:52 verbose #7596 > > │ k.l -m \\"n o\\" } │ 00:10:52 verbose #7597 > > │ __assert_eq' / actual: ../../j,US1_0 (k.l -m \\"n o\\") / expected: │ 00:10:52 verbose #7598 > > │ ../../j,US1_0 (k.l -m \\"n o\\") │ 00:10:52 verbose #7599 > > │ │ 00:10:52 verbose #7600 > > │ │ 00:10:52 verbose #7601 > > │ .py output: │ 00:10:52 verbose #7602 > > │ │ 00:10:52 verbose #7603 > > │ 00:00:00 verbose #1 _assert_fn / { input = } │ 00:10:52 verbose #7604 > > │ __assert_eq' / actual: ('', US1_1) / expected: ('', US1_1) │ 00:10:52 verbose #7605 > > │ │ 00:10:52 verbose #7606 > > │ 00:00:00 verbose #2 _assert_fn / { input = /a/b/c } │ 00:10:52 verbose #7607 > > │ __assert_eq' / actual: ('/a/b/c', US1_1) / expected: ('/a/b/c', US1_1) │ 00:10:52 verbose #7608 > > │ │ 00:10:52 verbose #7609 > > │ 00:00:00 verbose #3 _assert_fn / { input = d e.f } │ 00:10:52 verbose #7610 > > │ __assert_eq' / actual: ('d', US1_0 "e.f") / expected: ('d', US1_0 "e.f") │ 00:10:52 verbose #7611 > > │ │ 00:10:52 verbose #7612 > > │ 00:00:00 verbose #4 _assert_fn / { input = ..\..\g.h i.j k.l } │ 00:10:52 verbose #7613 > > │ __assert_eq' / actual: ('../../g.h', US1_0 ("i.j k.l")) / expected: │ 00:10:52 verbose #7614 > > │ ('../../g.h', US1_0 ("i.j k.l")) │ 00:10:52 verbose #7615 > > │ │ 00:10:52 verbose #7616 > > │ 00:00:00 verbose #5 _assert_fn / { input = m:\n\o.p "q.r s.t" } │ 00:10:52 verbose #7617 > > │ __assert_eq' / actual: ('m:/n/o.p', US1_0 (""q.r s.t"")) / expected: │ 00:10:52 verbose #7618 > > │ ('m:/n/o.p', US1_0 (""q.r s.t"")) │ 00:10:52 verbose #7619 > > │ │ 00:10:52 verbose #7620 > > │ 00:00:00 verbose #6 _assert_fn / { input = "..\..\u v\w.x" "y z.a" b.c │ 00:10:52 verbose #7621 > > │ } │ 00:10:52 verbose #7622 > > │ __assert_eq' / actual: ('../../u v/w.x', US1_0 (""y z.a" b.c")) / expected: │ 00:10:52 verbose #7623 > > │ ('../../u v/w.x', US1_0 (""y z.a" b.c")) │ 00:10:52 verbose #7624 > > │ │ 00:10:52 verbose #7625 > > │ 00:00:00 verbose #7 _assert_fn / { input = "..\..\d e.f" -g \\"h i\\" } │ 00:10:52 verbose #7626 > > │ __assert_eq' / actual: ('../../d e.f', US1_0 ("-g \\"h i\\"")) / expected: │ 00:10:52 verbose #7627 > > │ ('../../d e.f', US1_0 ("-g \\"h i\\"")) │ 00:10:52 verbose #7628 > > │ │ 00:10:52 verbose #7629 > > │ 00:00:00 verbose #8 _assert_fn / { input = ..\..\j k.l -m \\"n o\\" } │ 00:10:52 verbose #7630 > > │ __assert_eq' / actual: ('../../j', US1_0 ("k.l -m \\"n o\\"")) / expected: │ 00:10:52 verbose #7631 > > │ ('../../j', US1_0 ("k.l -m \\"n o\\"")) │ 00:10:52 verbose #7632 > > │ │ 00:10:52 verbose #7633 > > │ │ 00:10:52 verbose #7634 > > │ │ 00:10:52 verbose #7635 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:52 verbose #7636 > > 00:10:52 verbose #7637 > > ╭─[ 30.67s - stdout ]──────────────────────────────────────────────────────────╮ 00:10:52 verbose #7638 > > │ .fsx output: │ 00:10:52 verbose #7639 > > │ │ 00:10:52 verbose #7640 > > │ 00:00:00 verbose #1 _assert_fn / { input = } │ 00:10:52 verbose #7641 > > │ __assert_eq' / actual: struct ("", US1_1) / expected: struct ("", US1_1) │ 00:10:52 verbose #7642 > > │ │ 00:10:52 verbose #7643 > > │ 00:00:00 verbose #2 _assert_fn / { input = /a/b/c } │ 00:10:52 verbose #7644 > > │ __assert_eq' / actual: struct ("/a/b/c", US1_1) / expected: struct │ 00:10:52 verbose #7645 > > │ ("/a/b/c", US1_1) │ 00:10:52 verbose #7646 > > │ │ 00:10:52 verbose #7647 > > │ 00:00:00 verbose #3 _assert_fn / { input = d e.f } │ 00:10:52 verbose #7648 > > │ __assert_eq' / actual: struct ("d", US1_0 "e.f") / expected: struct ("d", │ 00:10:52 verbose #7649 > > │ US1_0 "e.f") │ 00:10:52 verbose #7650 > > │ │ 00:10:52 verbose #7651 > > │ 00:00:00 verbose #4 _assert_fn / { input = ..\..\g.h i.j k.l } │ 00:10:52 verbose #7652 > > │ __assert_eq' / actual: struct ("../../g.h", US1_0 "i.j k.l") / expected: │ 00:10:52 verbose #7653 > > │ struct ("../../g.h", US1_0 "i.j k.l") │ 00:10:52 verbose #7654 > > │ │ 00:10:52 verbose #7655 > > │ 00:00:00 verbose #5 _assert_fn / { input = m:\n\o.p "q.r s.t" } │ 00:10:52 verbose #7656 > > │ __assert_eq' / actual: struct ("m:/n/o.p", US1_0 ""q.r s.t"") / expected: │ 00:10:52 verbose #7657 > > │ struct ("m:/n/o.p", US1_0 ""q.r s.t"") │ 00:10:52 verbose #7658 > > │ │ 00:10:52 verbose #7659 > > │ 00:00:00 verbose #6 _assert_fn / { input = "..\..\u v\w.x" "y z.a" b.c │ 00:10:52 verbose #7660 > > │ } │ 00:10:52 verbose #7661 > > │ __assert_eq' / actual: struct ("../../u v/w.x", US1_0 ""y z.a" b.c") / │ 00:10:52 verbose #7662 > > │ expected: struct ("../../u v/w.x", US1_0 ""y z.a" b.c") │ 00:10:52 verbose #7663 > > │ │ 00:10:52 verbose #7664 > > │ 00:00:00 verbose #7 _assert_fn / { input = "..\..\d e.f" -g \\"h i\\" } │ 00:10:52 verbose #7665 > > │ __assert_eq' / actual: struct ("../../d e.f", US1_0 "-g \\"h i\\"") / │ 00:10:52 verbose #7666 > > │ expected: struct ("../../d e.f", US1_0 "-g \\"h i\\"") │ 00:10:52 verbose #7667 > > │ │ 00:10:52 verbose #7668 > > │ 00:00:00 verbose #8 _assert_fn / { input = ..\..\j k.l -m \\"n o\\" } │ 00:10:52 verbose #7669 > > │ __assert_eq' / actual: struct ("../../j", US1_0 "k.l -m \\"n o\\"") / │ 00:10:52 verbose #7670 > > │ expected: struct ("../../j", US1_0 "k.l -m \\"n o\\"") │ 00:10:52 verbose #7671 > > │ │ 00:10:52 verbose #7672 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:52 verbose #7673 > > 00:10:52 verbose #7674 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:10:52 verbose #7675 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:10:52 verbose #7676 > > │ ### execution_line │ 00:10:52 verbose #7677 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:52 verbose #7678 > > 00:10:52 verbose #7679 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:10:52 verbose #7680 > > type execution_line = 00:10:52 verbose #7681 > > { 00:10:52 verbose #7682 > > process_id : int 00:10:52 verbose #7683 > > line : string 00:10:52 verbose #7684 > > error : bool 00:10:52 verbose #7685 > > } 00:10:53 verbose #7686 > > 00:10:53 verbose #7687 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:10:53 verbose #7688 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:10:53 verbose #7689 > > │ ## rust │ 00:10:53 verbose #7690 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:53 verbose #7691 > > 00:10:53 verbose #7692 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:10:53 verbose #7693 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:10:53 verbose #7694 > > │ ### process_child │ 00:10:53 verbose #7695 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:53 verbose #7696 > > 00:10:53 verbose #7697 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:10:53 verbose #7698 > > nominal process_child = 00:10:53 verbose #7699 > > `( 00:10:53 verbose #7700 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:10:53 verbose #7701 > > Fable.Core.Emit(\"std::process::Child\")>]]\n#endif\ntype std_process_Child = 00:10:53 verbose #7702 > > class end" 00:10:53 verbose #7703 > > $'' : $'std_process_Child' 00:10:53 verbose #7704 > > ) 00:10:53 verbose #7705 > > 00:10:53 verbose #7706 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:10:53 verbose #7707 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:10:53 verbose #7708 > > │ ### process_child_stdin │ 00:10:53 verbose #7709 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:53 verbose #7710 > > 00:10:53 verbose #7711 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:10:53 verbose #7712 > > nominal process_child_stdin = 00:10:53 verbose #7713 > > `( 00:10:53 verbose #7714 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:10:53 verbose #7715 > > Fable.Core.Emit(\"std::process::ChildStdin\")>]]\n#endif\ntype 00:10:53 verbose #7716 > > std_process_ChildStdin = class end" 00:10:53 verbose #7717 > > $'' : $'std_process_ChildStdin' 00:10:53 verbose #7718 > > ) 00:10:53 verbose #7719 > > 00:10:53 verbose #7720 > > inl process_child_stdin 00:10:53 verbose #7721 > > (child : rust.ref (rust.mut' process_child)) 00:10:53 verbose #7722 > > : rust.ref (rust.mut' (optionm'.option' process_child_stdin)) 00:10:53 verbose #7723 > > = 00:10:53 verbose #7724 > > !\\(child, $'"&mut $0.stdin"') 00:10:54 verbose #7725 > > 00:10:54 verbose #7726 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:10:54 verbose #7727 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:10:54 verbose #7728 > > │ ## runtime │ 00:10:54 verbose #7729 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:54 verbose #7730 > > 00:10:54 verbose #7731 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:10:54 verbose #7732 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:10:54 verbose #7733 > > │ ### execution_options │ 00:10:54 verbose #7734 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:54 verbose #7735 > > 00:10:54 verbose #7736 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:10:54 verbose #7737 > > type execution_options = 00:10:54 verbose #7738 > > { 00:10:54 verbose #7739 > > command : string 00:10:54 verbose #7740 > > cancellation_token : optionm'.option' threading.cancellation_token 00:10:54 verbose #7741 > > environment_variables : array_base (string * string) 00:10:54 verbose #7742 > > on_line : optionm'.option' (execution_line -> async.async ()) 00:10:54 verbose #7743 > > stdin : optionm'.option' (threading.arc (threading.mutex 00:10:54 verbose #7744 > > process_child_stdin) -> ()) 00:10:54 verbose #7745 > > trace : bool 00:10:54 verbose #7746 > > working_directory : optionm'.option' string 00:10:54 verbose #7747 > > } 00:10:54 verbose #7748 > > 00:10:54 verbose #7749 > > inl execution_options (fn : execution_options -> execution_options) : 00:10:54 verbose #7750 > > execution_options = 00:10:54 verbose #7751 > > { 00:10:54 verbose #7752 > > command = "" 00:10:54 verbose #7753 > > cancellation_token = None |> optionm'.box 00:10:54 verbose #7754 > > environment_variables = ;[[]] 00:10:54 verbose #7755 > > on_line = None |> optionm'.box 00:10:54 verbose #7756 > > stdin = None |> optionm'.box 00:10:54 verbose #7757 > > trace = true 00:10:54 verbose #7758 > > working_directory = None |> optionm'.box 00:10:54 verbose #7759 > > } 00:10:54 verbose #7760 > > |> fn 00:10:54 verbose #7761 > > 00:10:54 verbose #7762 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:10:54 verbose #7763 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:10:54 verbose #7764 > > │ ## rust │ 00:10:54 verbose #7765 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:54 verbose #7766 > > 00:10:54 verbose #7767 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:10:54 verbose #7768 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:10:54 verbose #7769 > > │ ### process_child_stderr │ 00:10:54 verbose #7770 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:54 verbose #7771 > > 00:10:54 verbose #7772 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:10:54 verbose #7773 > > nominal process_child_stderr = 00:10:54 verbose #7774 > > `( 00:10:54 verbose #7775 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:10:54 verbose #7776 > > Fable.Core.Emit(\"std::process::ChildStderr\")>]]\n#endif\ntype 00:10:54 verbose #7777 > > std_process_ChildStderr = class end" 00:10:54 verbose #7778 > > $'' : $'std_process_ChildStderr' 00:10:54 verbose #7779 > > ) 00:10:54 verbose #7780 > > 00:10:54 verbose #7781 > > inl process_child_stderr 00:10:54 verbose #7782 > > (child : rust.ref (rust.mut' process_child)) 00:10:54 verbose #7783 > > : rust.ref (rust.mut' (optionm'.option' process_child_stderr)) 00:10:54 verbose #7784 > > = 00:10:54 verbose #7785 > > !\\(child, $'"&mut $0.stderr"') 00:10:55 verbose #7786 > > 00:10:55 verbose #7787 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:10:55 verbose #7788 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:10:55 verbose #7789 > > │ ### process_child_stdout │ 00:10:55 verbose #7790 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:55 verbose #7791 > > 00:10:55 verbose #7792 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:10:55 verbose #7793 > > nominal process_child_stdout = 00:10:55 verbose #7794 > > `( 00:10:55 verbose #7795 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:10:55 verbose #7796 > > Fable.Core.Emit(\"std::process::ChildStdout\")>]]\n#endif\ntype 00:10:55 verbose #7797 > > std_process_ChildStdout = class end" 00:10:55 verbose #7798 > > $'' : $'std_process_ChildStdout' 00:10:55 verbose #7799 > > ) 00:10:55 verbose #7800 > > 00:10:55 verbose #7801 > > inl process_child_stdout 00:10:55 verbose #7802 > > (child : rust.ref (rust.mut' process_child)) 00:10:55 verbose #7803 > > : rust.ref (rust.mut' (optionm'.option' process_child_stdout)) 00:10:55 verbose #7804 > > = 00:10:55 verbose #7805 > > !\\(child, $'"&mut $0.stdout"') 00:10:55 verbose #7806 > > 00:10:55 verbose #7807 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:10:55 verbose #7808 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:10:55 verbose #7809 > > │ ### process_command │ 00:10:55 verbose #7810 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:55 verbose #7811 > > 00:10:55 verbose #7812 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:10:55 verbose #7813 > > nominal process_command = 00:10:55 verbose #7814 > > `( 00:10:55 verbose #7815 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:10:55 verbose #7816 > > Fable.Core.Emit(\"std::process::Command\")>]]\n#endif\ntype std_process_Command 00:10:55 verbose #7817 > > = class end" 00:10:55 verbose #7818 > > $'' : $'std_process_Command' 00:10:55 verbose #7819 > > ) 00:10:55 verbose #7820 > > 00:10:55 verbose #7821 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:10:55 verbose #7822 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:10:55 verbose #7823 > > │ ### process_stdio │ 00:10:55 verbose #7824 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:55 verbose #7825 > > 00:10:55 verbose #7826 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:10:55 verbose #7827 > > nominal process_stdio = 00:10:55 verbose #7828 > > `( 00:10:55 verbose #7829 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:10:55 verbose #7830 > > Fable.Core.Emit(\"std::process::Stdio\")>]]\n#endif\ntype std_process_Stdio = 00:10:55 verbose #7831 > > class end" 00:10:55 verbose #7832 > > $'' : $'std_process_Stdio' 00:10:55 verbose #7833 > > ) 00:10:56 verbose #7834 > > 00:10:56 verbose #7835 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:10:56 verbose #7836 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:10:56 verbose #7837 > > │ ### process_output │ 00:10:56 verbose #7838 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:56 verbose #7839 > > 00:10:56 verbose #7840 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:10:56 verbose #7841 > > nominal process_output = 00:10:56 verbose #7842 > > `( 00:10:56 verbose #7843 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:10:56 verbose #7844 > > Fable.Core.Emit(\"std::process::Output\")>]]\n#endif\ntype std_process_Output = 00:10:56 verbose #7845 > > class end" 00:10:56 verbose #7846 > > $'' : $'std_process_Output' 00:10:56 verbose #7847 > > ) 00:10:56 verbose #7848 > > 00:10:56 verbose #7849 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:10:56 verbose #7850 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:10:56 verbose #7851 > > │ ### process_exit_status │ 00:10:56 verbose #7852 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:56 verbose #7853 > > 00:10:56 verbose #7854 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:10:56 verbose #7855 > > nominal process_exit_status = 00:10:56 verbose #7856 > > `( 00:10:56 verbose #7857 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:10:56 verbose #7858 > > Fable.Core.Emit(\"std::process::ExitStatus\")>]]\n#endif\ntype 00:10:56 verbose #7859 > > std_process_ExitStatus = class end" 00:10:56 verbose #7860 > > $'' : $'std_process_ExitStatus' 00:10:56 verbose #7861 > > ) 00:10:57 verbose #7862 > > 00:10:57 verbose #7863 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:10:57 verbose #7864 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:10:57 verbose #7865 > > │ ### process_output_status │ 00:10:57 verbose #7866 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:57 verbose #7867 > > 00:10:57 verbose #7868 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:10:57 verbose #7869 > > inl process_output_status (output : process_output) : process_exit_status = 00:10:57 verbose #7870 > > !\\(output, $'"$0.status"') 00:10:57 verbose #7871 > > 00:10:57 verbose #7872 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:10:57 verbose #7873 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:10:57 verbose #7874 > > │ ### process_exit_status_code │ 00:10:57 verbose #7875 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:57 verbose #7876 > > 00:10:57 verbose #7877 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:10:57 verbose #7878 > > inl process_exit_status_code (status : process_exit_status) : optionm'.option' 00:10:57 verbose #7879 > > i32 = 00:10:57 verbose #7880 > > !\\(status, $'"$0.code()"') 00:10:58 verbose #7881 > > 00:10:58 verbose #7882 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:10:58 verbose #7883 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:10:58 verbose #7884 > > │ ### stdin_write_all │ 00:10:58 verbose #7885 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:58 verbose #7886 > > 00:10:58 verbose #7887 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:10:58 verbose #7888 > > inl stdin_write_all (stdin : threading.mutex_guard process_child_stdin) (text : 00:10:58 verbose #7889 > > string) : () = 00:10:58 verbose #7890 > > inl stream = text |> sm'.as_bytes 00:10:58 verbose #7891 > > inl stdin = join stdin 00:10:58 verbose #7892 > > (!\($'"true; let mut !stdin = !stdin"') : bool) |> ignore 00:10:58 verbose #7893 > > (!\\(stdin, $'"true; std::io::Write::write_all(&mut *$0, 00:10:58 verbose #7894 > > !stream).unwrap()"') : bool) |> ignore 00:10:58 verbose #7895 > > 00:10:58 verbose #7896 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:10:58 verbose #7897 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:10:58 verbose #7898 > > │ ### stdin_flush │ 00:10:58 verbose #7899 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:58 verbose #7900 > > 00:10:58 verbose #7901 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:10:58 verbose #7902 > > inl stdin_flush (stdin : threading.mutex_guard process_child_stdin) : () = 00:10:58 verbose #7903 > > inl stdin = join stdin 00:10:58 verbose #7904 > > (!\($'"true; let mut !stdin = !stdin"') : bool) |> ignore 00:10:58 verbose #7905 > > (!\\(stdin, $'"true; std::io::Write::flush(&mut *$0).unwrap()"') : bool) |> 00:10:58 verbose #7906 > > ignore 00:10:59 verbose #7907 > > 00:10:59 verbose #7908 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:10:59 verbose #7909 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:10:59 verbose #7910 > > │ ### new_process_command │ 00:10:59 verbose #7911 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:59 verbose #7912 > > 00:10:59 verbose #7913 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:10:59 verbose #7914 > > inl new_process_command (file_name : string) : process_command = 00:10:59 verbose #7915 > > !\\(file_name, $'"std::process::Command::new(&*$0)"') 00:10:59 verbose #7916 > > 00:10:59 verbose #7917 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:10:59 verbose #7918 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:10:59 verbose #7919 > > │ ### process_stdio_piped │ 00:10:59 verbose #7920 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:59 verbose #7921 > > 00:10:59 verbose #7922 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:10:59 verbose #7923 > > inl process_stdio_piped () : process_stdio = 00:10:59 verbose #7924 > > !\($'"std::process::Stdio::piped()"') 00:10:59 verbose #7925 > > 00:10:59 verbose #7926 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:10:59 verbose #7927 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:10:59 verbose #7928 > > │ ### process_command_args │ 00:10:59 verbose #7929 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:10:59 verbose #7930 > > 00:10:59 verbose #7931 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:10:59 verbose #7932 > > inl process_command_args (args : am'.vec sm'.std_string) (c : process_command) : 00:10:59 verbose #7933 > > rust.ref (rust.mut' process_command) = 00:10:59 verbose #7934 > > (!\($'"true; let mut !c = !c"') : bool) |> ignore 00:10:59 verbose #7935 > > !\\((c, args), $'"std::process::Command::args(&mut $0, &*$1)"') 00:11:00 verbose #7936 > > 00:11:00 verbose #7937 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:00 verbose #7938 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:00 verbose #7939 > > │ ### process_command_stdout │ 00:11:00 verbose #7940 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:00 verbose #7941 > > 00:11:00 verbose #7942 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:00 verbose #7943 > > inl process_command_stdout (stdio : process_stdio) (c : rust.ref (rust.mut' 00:11:00 verbose #7944 > > process_command)) : rust.ref (rust.mut' process_command) = 00:11:00 verbose #7945 > > !\\(c, $'"std::process::Command::stdout($0, std::process::Stdio::piped())"') 00:11:00 verbose #7946 > > 00:11:00 verbose #7947 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:00 verbose #7948 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:00 verbose #7949 > > │ ### process_command_stderr │ 00:11:00 verbose #7950 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:00 verbose #7951 > > 00:11:00 verbose #7952 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:00 verbose #7953 > > inl process_command_stderr (stdio : process_stdio) (c : rust.ref (rust.mut' 00:11:00 verbose #7954 > > process_command)) : rust.ref (rust.mut' process_command) = 00:11:00 verbose #7955 > > !\\(c, $'"std::process::Command::stderr($0, std::process::Stdio::piped())"') 00:11:01 verbose #7956 > > 00:11:01 verbose #7957 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:01 verbose #7958 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:01 verbose #7959 > > │ ### process_command_stdin │ 00:11:01 verbose #7960 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:01 verbose #7961 > > 00:11:01 verbose #7962 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:01 verbose #7963 > > inl process_command_stdin (stdio : process_stdio) (c : rust.ref (rust.mut' 00:11:01 verbose #7964 > > process_command)) : rust.ref (rust.mut' process_command) = 00:11:01 verbose #7965 > > !\\(c, $'"std::process::Command::stdin($0, std::process::Stdio::piped())"') 00:11:01 verbose #7966 > > 00:11:01 verbose #7967 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:01 verbose #7968 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:01 verbose #7969 > > │ ### process_command_current_dir │ 00:11:01 verbose #7970 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:01 verbose #7971 > > 00:11:01 verbose #7972 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:01 verbose #7973 > > inl process_command_current_dir 00:11:01 verbose #7974 > > (dir : string) 00:11:01 verbose #7975 > > (c : rust.ref (rust.mut' process_command)) 00:11:01 verbose #7976 > > : rust.ref (rust.mut' process_command) 00:11:01 verbose #7977 > > = 00:11:01 verbose #7978 > > !\\(dir, $'"std::process::Command::current_dir(!c, &*$0)"') 00:11:02 verbose #7979 > > 00:11:02 verbose #7980 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:02 verbose #7981 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:02 verbose #7982 > > │ ### process_command_env │ 00:11:02 verbose #7983 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:02 verbose #7984 > > 00:11:02 verbose #7985 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:02 verbose #7986 > > inl process_command_env 00:11:02 verbose #7987 > > (key : string) 00:11:02 verbose #7988 > > (value : string) 00:11:02 verbose #7989 > > (c : rust.ref (rust.mut' process_command)) 00:11:02 verbose #7990 > > : rust.ref (rust.mut' process_command) 00:11:02 verbose #7991 > > = 00:11:02 verbose #7992 > > !\\((key, value), $'"std::process::Command::env(!c, &*$0, &*$1)"') 00:11:02 verbose #7993 > > 00:11:02 verbose #7994 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:02 verbose #7995 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:02 verbose #7996 > > │ ### process_command_spawn │ 00:11:02 verbose #7997 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:02 verbose #7998 > > 00:11:02 verbose #7999 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:02 verbose #8000 > > inl process_command_spawn 00:11:02 verbose #8001 > > (c : rust.ref (rust.mut' process_command)) 00:11:02 verbose #8002 > > : resultm.result' process_child stream.io_error 00:11:02 verbose #8003 > > = 00:11:02 verbose #8004 > > !\\(c, $'"std::process::Command::spawn($0)"') 00:11:03 verbose #8005 > > 00:11:03 verbose #8006 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:03 verbose #8007 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:03 verbose #8008 > > │ ### child_wait_with_output │ 00:11:03 verbose #8009 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:03 verbose #8010 > > 00:11:03 verbose #8011 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:03 verbose #8012 > > inl child_wait_with_output 00:11:03 verbose #8013 > > (child : process_child) 00:11:03 verbose #8014 > > : resultm.result' process_output stream.io_error 00:11:03 verbose #8015 > > = 00:11:03 verbose #8016 > > !\\(child, $'"$0.wait_with_output()"') 00:11:03 verbose #8017 > > 00:11:03 verbose #8018 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:03 verbose #8019 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:03 verbose #8020 > > │ ### stdio_line │ 00:11:03 verbose #8021 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:03 verbose #8022 > > 00:11:03 verbose #8023 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:03 verbose #8024 > > inl stdio_line 00:11:03 verbose #8025 > > (stdio : result () ()) 00:11:03 verbose #8026 > > (trace' : bool) 00:11:03 verbose #8027 > > (channel_sender : threading.arc (threading.mutex (threading.channel_sender 00:11:03 verbose #8028 > > sm'.std_string))) 00:11:03 verbose #8029 > > (line : resultm.result' sm'.std_string stream.io_error) 00:11:03 verbose #8030 > > : resultm.result' () sm'.std_string 00:11:03 verbose #8031 > > = 00:11:03 verbose #8032 > > inl highlight text = 00:11:03 verbose #8033 > > $'$"\\u001b[[4;7m{!text}\\u001b[[0m"' 00:11:03 verbose #8034 > > inl line = 00:11:03 verbose #8035 > > match 00:11:03 verbose #8036 > > line 00:11:03 verbose #8037 > > |> resultm.map_error' sm'.format' 00:11:03 verbose #8038 > > |> resultm.unbox' 00:11:03 verbose #8039 > > with 00:11:03 verbose #8040 > > | Ok line => 00:11:03 verbose #8041 > > inl line = 00:11:03 verbose #8042 > > line 00:11:03 verbose #8043 > > |> sm'.from_std_string 00:11:03 verbose #8044 > > // |> sm'.as_bytes 00:11:03 verbose #8045 > > // |> am'.slice_to_vec 00:11:03 verbose #8046 > > |> sm'.encoding_encode' (sm'.encoding_utf8' ()) 00:11:03 verbose #8047 > > |> rust.cow_as_ref 00:11:03 verbose #8048 > > |> sm'.str_from_utf8 00:11:03 verbose #8049 > > // |> sm'.utf8_decode 00:11:03 verbose #8050 > > |> resultm.unwrap' 00:11:03 verbose #8051 > > |> sm'.ref_to_std_string 00:11:03 verbose #8052 > > // String::from_utf8_lossy(line.as_bytes()).into() 00:11:03 verbose #8053 > > inl line_log = line |> sm'.from_std_string 00:11:03 verbose #8054 > > inl text = 00:11:03 verbose #8055 > > match stdio with 00:11:03 verbose #8056 > > | Ok () => $'$"> {!line_log}"' 00:11:03 verbose #8057 > > | Error () => $'$"\! {!line_log}"' 00:11:03 verbose #8058 > > if trace' 00:11:03 verbose #8059 > > then trace Verbose (fun () => text) id 00:11:03 verbose #8060 > > else text |> console.write_line 00:11:03 verbose #8061 > > match stdio with 00:11:03 verbose #8062 > > | Ok () => line 00:11:03 verbose #8063 > > | Error () => line |> highlight |> sm'.to_std_string 00:11:03 verbose #8064 > > | Error e => 00:11:03 verbose #8065 > > trace Critical 00:11:03 verbose #8066 > > fun () => $'$"runtime.stdio_line"' 00:11:03 verbose #8067 > > fun () => { e } 00:11:03 verbose #8068 > > e |> highlight |> sm'.to_std_string 00:11:03 verbose #8069 > > channel_sender 00:11:03 verbose #8070 > > |> threading.arc_mutex_lock 00:11:03 verbose #8071 > > |> resultm.unwrap' 00:11:03 verbose #8072 > > |> threading.mutex_guard_ref 00:11:03 verbose #8073 > > |> threading.channel_send line 00:11:03 verbose #8074 > > |> resultm.map_error' sm'.format' 00:11:04 verbose #8075 > > 00:11:04 verbose #8076 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:04 verbose #8077 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:04 verbose #8078 > > │ ### command │ 00:11:04 verbose #8079 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:04 verbose #8080 > > 00:11:04 verbose #8081 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:04 verbose #8082 > > nominal command = 00:11:04 verbose #8083 > > `( 00:11:04 verbose #8084 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:11:04 verbose #8085 > > Fable.Core.Emit(\"clap::Command\")>]]\n#endif\ntype clap_Command = class end" 00:11:04 verbose #8086 > > $'' : $'clap_Command' 00:11:04 verbose #8087 > > ) 00:11:04 verbose #8088 > > 00:11:04 verbose #8089 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:04 verbose #8090 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:04 verbose #8091 > > │ ### new_command │ 00:11:04 verbose #8092 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:04 verbose #8093 > > 00:11:04 verbose #8094 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:04 verbose #8095 > > inl new_command (s : rust.static_ref sm'.str) : command = 00:11:04 verbose #8096 > > !\\(s, $'"clap::Command::new($0)"') 00:11:05 verbose #8097 > > 00:11:05 verbose #8098 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:05 verbose #8099 > > //// test 00:11:05 verbose #8100 > > ///! rust -d clap 00:11:05 verbose #8101 > > 00:11:05 verbose #8102 > > ##"command" 00:11:05 verbose #8103 > > |> new_command 00:11:05 verbose #8104 > > |> sm'.format_pretty 00:11:05 verbose #8105 > > |> _assert sm'.contains "\"command\"" 00:11:23 verbose #8106 > > 00:11:23 verbose #8107 > > ╭─[ 18.29s - return value ]────────────────────────────────────────────────────╮ 00:11:23 verbose #8108 > > │ __assert / actual: ""command"" / expected: "Command { │ 00:11:23 verbose #8109 > > │ name: "command", │ 00:11:23 verbose #8110 > > │ long_flag: None, │ 00:11:23 verbose #8111 > > │ short_flag: None, │ 00:11:23 verbose #8112 > > │ display_name: None, │ 00:11:23 verbose #8113 > > │ bin_name: None, │ 00:11:23 verbose #8114 > > │ author: None, │ 00:11:23 verbose #8115 > > │ version: None, │ 00:11:23 verbose #8116 > > │ long_version: None, │ 00:11:23 verbose #8117 > > │ about: None, │ 00:11:23 verbose #8118 > > │ long_about: None, │ 00:11:23 verbose #8119 > > │ before_help: None, │ 00:11:23 verbose #8120 > > │ before_long_help: None, │ 00:11:23 verbose #8121 > > │ after_help: None, │ 00:11:23 verbose #8122 > > │ after_long_help: None, │ 00:11:23 verbose #8123 > > │ aliases: [], │ 00:11:23 verbose #8124 > > │ short_flag_aliases: [], │ 00:11:23 verbose #8125 > > │ long_flag_aliases: [], │ 00:11:23 verbose #8126 > > │ usage_str: None, │ 00:11:23 verbose #8127 > > │ usage_name: None, │ 00:11:23 verbose #8128 > > │ help_str: None, │ 00:11:23 verbose #8129 > > │ disp_ord: None, │ 00:11:23 verbose #8130 > > │ template: None, │ 00:11:23 verbose #8131 > > │ settings: AppFlags( │ 00:11:23 verbose #8132 > > │ 0, │ 00:11:23 verbose #8133 > > │ ), │ 00:11:23 verbose #8134 > > │ g_settings: AppFlags( │ 00:11:23 verbose #8135 > > │ 0, │ 00:11:23 verbose #8136 > > │ ), │ 00:11:23 verbose #8137 > > │ args: MKeyMap { │ 00:11:23 verbose #8138 > > │ args: [], │ 00:11:23 verbose #8139 > > │ keys: [], │ 00:11:23 verbose #8140 > > │ }, │ 00:11:23 verbose #8141 > > │ subcommands: [], │ 00:11:23 verbose #8142 > > │ groups: [], │ 00:11:23 verbose #8143 > > │ current_help_heading: None, │ 00:11:23 verbose #8144 > > │ current_disp_ord: Some( │ 00:11:23 verbose #8145 > > │ 0, │ 00:11:23 verbose #8146 > > │ ), │ 00:11:23 verbose #8147 > > │ subcommand_value_name: None, │ 00:11:23 verbose #8148 > > │ subcommand_heading: None, │ 00:11:23 verbose #8149 > > │ external_value_parser: None, │ 00:11:23 verbose #8150 > > │ long_help_exists: false, │ 00:11:23 verbose #8151 > > │ deferred: None, │ 00:11:23 verbose #8152 > > │ app_ext: Extensions { │ 00:11:23 verbose #8153 > > │ extensions: FlatMap { │ 00:11:23 verbose #8154 > > │ keys: [], │ 00:11:23 verbose #8155 > > │ values: [], │ 00:11:23 verbose #8156 > > │ }, │ 00:11:23 verbose #8157 > > │ }, │ 00:11:23 verbose #8158 > > │ }" │ 00:11:23 verbose #8159 > > │ │ 00:11:23 verbose #8160 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:23 verbose #8161 > > 00:11:23 verbose #8162 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:23 verbose #8163 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:23 verbose #8164 > > │ ### arg │ 00:11:23 verbose #8165 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:23 verbose #8166 > > 00:11:23 verbose #8167 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:23 verbose #8168 > > nominal arg = 00:11:23 verbose #8169 > > `( 00:11:23 verbose #8170 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:11:23 verbose #8171 > > Fable.Core.Emit(\"clap::Arg\")>]]\n#endif\ntype clap_Arg = class end" 00:11:23 verbose #8172 > > $'' : $'clap_Arg' 00:11:23 verbose #8173 > > ) 00:11:24 verbose #8174 > > 00:11:24 verbose #8175 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:24 verbose #8176 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:24 verbose #8177 > > │ ### new_arg │ 00:11:24 verbose #8178 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:24 verbose #8179 > > 00:11:24 verbose #8180 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:24 verbose #8181 > > inl new_arg (s : rust.static_ref sm'.str) : arg = 00:11:24 verbose #8182 > > !\\(s, $'"clap::Arg::new($0)"') 00:11:24 verbose #8183 > > 00:11:24 verbose #8184 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:24 verbose #8185 > > //// test 00:11:24 verbose #8186 > > ///! rust -d clap 00:11:24 verbose #8187 > > 00:11:24 verbose #8188 > > ##"arg" 00:11:24 verbose #8189 > > |> new_arg 00:11:24 verbose #8190 > > |> sm'.format_pretty 00:11:24 verbose #8191 > > |> _assert sm'.contains "\"arg\"" 00:11:43 verbose #8192 > > 00:11:43 verbose #8193 > > ╭─[ 19.24s - return value ]────────────────────────────────────────────────────╮ 00:11:43 verbose #8194 > > │ __assert / actual: ""arg"" / expected: "Arg { │ 00:11:43 verbose #8195 > > │ id: "arg", │ 00:11:43 verbose #8196 > > │ help: None, │ 00:11:43 verbose #8197 > > │ long_help: None, │ 00:11:43 verbose #8198 > > │ action: None, │ 00:11:43 verbose #8199 > > │ value_parser: None, │ 00:11:43 verbose #8200 > > │ blacklist: [], │ 00:11:43 verbose #8201 > > │ settings: ArgFlags( │ 00:11:43 verbose #8202 > > │ 0, │ 00:11:43 verbose #8203 > > │ ), │ 00:11:43 verbose #8204 > > │ overrides: [], │ 00:11:43 verbose #8205 > > │ groups: [], │ 00:11:43 verbose #8206 > > │ requires: [], │ 00:11:43 verbose #8207 > > │ r_ifs: [], │ 00:11:43 verbose #8208 > > │ r_unless: [], │ 00:11:43 verbose #8209 > > │ short: None, │ 00:11:43 verbose #8210 > > │ long: None, │ 00:11:43 verbose #8211 > > │ aliases: [], │ 00:11:43 verbose #8212 > > │ short_aliases: [], │ 00:11:43 verbose #8213 > > │ disp_ord: None, │ 00:11:43 verbose #8214 > > │ val_names: [], │ 00:11:43 verbose #8215 > > │ num_vals: None, │ 00:11:43 verbose #8216 > > │ val_delim: None, │ 00:11:43 verbose #8217 > > │ default_vals: [], │ 00:11:43 verbose #8218 > > │ default_vals_ifs: [], │ 00:11:43 verbose #8219 > > │ terminator: None, │ 00:11:43 verbose #8220 > > │ index: None, │ 00:11:43 verbose #8221 > > │ help_heading: None, │ 00:11:43 verbose #8222 > > │ default_missing_vals: [], │ 00:11:43 verbose #8223 > > │ ext: Extensions { │ 00:11:43 verbose #8224 > > │ extensions: FlatMap { │ 00:11:43 verbose #8225 > > │ keys: [], │ 00:11:43 verbose #8226 > > │ values: [], │ 00:11:43 verbose #8227 > > │ }, │ 00:11:43 verbose #8228 > > │ }, │ 00:11:43 verbose #8229 > > │ }" │ 00:11:43 verbose #8230 > > │ │ 00:11:43 verbose #8231 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:43 verbose #8232 > > 00:11:43 verbose #8233 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:43 verbose #8234 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:43 verbose #8235 > > │ ### command_arg │ 00:11:43 verbose #8236 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:43 verbose #8237 > > 00:11:43 verbose #8238 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:43 verbose #8239 > > inl command_arg (arg : arg) (command : command) : command = 00:11:43 verbose #8240 > > !\\((command, arg), $'"clap::Command::arg($0, $1)"') 00:11:44 verbose #8241 > > 00:11:44 verbose #8242 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:44 verbose #8243 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:44 verbose #8244 > > │ ### arg_required │ 00:11:44 verbose #8245 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:44 verbose #8246 > > 00:11:44 verbose #8247 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:44 verbose #8248 > > inl arg_required (value : bool) (arg : arg) : arg = 00:11:44 verbose #8249 > > !\\((arg, value), $'"$0.required($1)"') 00:11:44 verbose #8250 > > 00:11:44 verbose #8251 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:44 verbose #8252 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:44 verbose #8253 > > │ ### arg_require_equals │ 00:11:44 verbose #8254 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:44 verbose #8255 > > 00:11:44 verbose #8256 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:44 verbose #8257 > > inl arg_require_equals (value : bool) (arg : arg) : arg = 00:11:44 verbose #8258 > > !\\((arg, value), $'"$0.require_equals($1)"') 00:11:45 verbose #8259 > > 00:11:45 verbose #8260 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:45 verbose #8261 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:45 verbose #8262 > > │ ### arg_default_value │ 00:11:45 verbose #8263 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:45 verbose #8264 > > 00:11:45 verbose #8265 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:45 verbose #8266 > > inl arg_default_value (value : string) (arg : arg) : arg = 00:11:45 verbose #8267 > > inl value = #value 00:11:45 verbose #8268 > > !\\((arg, value), $'"$0.default_value($1)"') 00:11:45 verbose #8269 > > 00:11:45 verbose #8270 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:45 verbose #8271 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:45 verbose #8272 > > │ ### arg_default_missing_value │ 00:11:45 verbose #8273 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:45 verbose #8274 > > 00:11:45 verbose #8275 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:45 verbose #8276 > > inl arg_default_missing_value (value : string) (arg : arg) : arg = 00:11:45 verbose #8277 > > inl value = #value 00:11:45 verbose #8278 > > !\\((arg, value), $'"$0.default_missing_value($1)"') 00:11:45 verbose #8279 > > 00:11:45 verbose #8280 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:45 verbose #8281 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:45 verbose #8282 > > │ ### arg_overrides_with │ 00:11:45 verbose #8283 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:45 verbose #8284 > > 00:11:45 verbose #8285 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:45 verbose #8286 > > inl arg_overrides_with (value : string) (arg : arg) : arg = 00:11:45 verbose #8287 > > inl value = #value 00:11:45 verbose #8288 > > !\\((arg, value), $'"$0.overrides_with($1)"') 00:11:46 verbose #8289 > > 00:11:46 verbose #8290 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:46 verbose #8291 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:46 verbose #8292 > > │ ### arg_short │ 00:11:46 verbose #8293 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:46 verbose #8294 > > 00:11:46 verbose #8295 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:46 verbose #8296 > > inl arg_short (value : char) (arg : arg) : arg = 00:11:46 verbose #8297 > > !\\((arg, value), $'"$0.short($1)"') 00:11:46 verbose #8298 > > 00:11:46 verbose #8299 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:46 verbose #8300 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:46 verbose #8301 > > │ ### arg_long │ 00:11:46 verbose #8302 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:46 verbose #8303 > > 00:11:46 verbose #8304 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:46 verbose #8305 > > inl arg_long (value : rust.static_ref sm'.str) (arg : arg) : arg = 00:11:46 verbose #8306 > > !\\((arg, value), $'"$0.long($1)"') 00:11:47 verbose #8307 > > 00:11:47 verbose #8308 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:47 verbose #8309 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:47 verbose #8310 > > │ ### arg_value_names │ 00:11:47 verbose #8311 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:47 verbose #8312 > > 00:11:47 verbose #8313 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:47 verbose #8314 > > inl arg_value_names (values : array_base (rust.static_ref sm'.str)) (arg : arg) 00:11:47 verbose #8315 > > : arg = 00:11:47 verbose #8316 > > inl values = values |> am'.to_vec 00:11:47 verbose #8317 > > !\\((arg, values), $'"$0.value_names($1)"') 00:11:47 verbose #8318 > > 00:11:47 verbose #8319 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:47 verbose #8320 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:47 verbose #8321 > > │ ### arg_num_args │ 00:11:47 verbose #8322 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:47 verbose #8323 > > 00:11:47 verbose #8324 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:47 verbose #8325 > > inl arg_num_args (value : i32) (arg : arg) : arg = 00:11:47 verbose #8326 > > !\\((arg, value), $'"$0.num_args($1)"') 00:11:48 verbose #8327 > > 00:11:48 verbose #8328 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:48 verbose #8329 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:48 verbose #8330 > > │ ### value_range │ 00:11:48 verbose #8331 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:48 verbose #8332 > > 00:11:48 verbose #8333 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:48 verbose #8334 > > nominal value_range = 00:11:48 verbose #8335 > > `( 00:11:48 verbose #8336 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:11:48 verbose #8337 > > Fable.Core.Emit(\"clap::builder::ValueRange\")>]]\n#endif\ntype 00:11:48 verbose #8338 > > clap_builder_ValueRange = class end" 00:11:48 verbose #8339 > > $'' : $'clap_builder_ValueRange' 00:11:48 verbose #8340 > > ) 00:11:48 verbose #8341 > > 00:11:48 verbose #8342 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:48 verbose #8343 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:48 verbose #8344 > > │ ### new_value_range │ 00:11:48 verbose #8345 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:48 verbose #8346 > > 00:11:48 verbose #8347 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:48 verbose #8348 > > inl new_value_range inclusive start end : value_range = 00:11:48 verbose #8349 > > inl len = 0i32 |> convert 00:11:48 verbose #8350 > > inl start, end = 00:11:48 verbose #8351 > > open am' 00:11:48 verbose #8352 > > match start, end with 00:11:48 verbose #8353 > > | Start start, End fn => 00:11:48 verbose #8354 > > start, len |> fn 00:11:48 verbose #8355 > > | End start_fn, End end_fn => 00:11:48 verbose #8356 > > start_fn len, end_fn len 00:11:48 verbose #8357 > > inl inclusive = 00:11:48 verbose #8358 > > if inclusive 00:11:48 verbose #8359 > > then "=" 00:11:48 verbose #8360 > > else "" 00:11:48 verbose #8361 > > match start, end with 00:11:48 verbose #8362 > > | start, end when end =. len => !\\(start, 00:11:48 verbose #8363 > > $'"clap::builder::ValueRange::new($0..)"') 00:11:48 verbose #8364 > > | start, end => !\\((start, end), $'"clap::builder::ValueRange::new($0.." + 00:11:48 verbose #8365 > > !inclusive + "$1)"') 00:11:48 verbose #8366 > > 00:11:48 verbose #8367 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:48 verbose #8368 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:48 verbose #8369 > > │ ### arg_num_args_range │ 00:11:48 verbose #8370 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:48 verbose #8371 > > 00:11:48 verbose #8372 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:48 verbose #8373 > > inl arg_num_args_range (value : value_range) (arg : arg) : arg = 00:11:48 verbose #8374 > > !\\((arg, value), $'"$0.num_args($1)"') 00:11:49 verbose #8375 > > 00:11:49 verbose #8376 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:49 verbose #8377 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:49 verbose #8378 > > │ ### arg_value_name │ 00:11:49 verbose #8379 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:49 verbose #8380 > > 00:11:49 verbose #8381 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:49 verbose #8382 > > inl arg_value_name (value : string) (arg : arg) : arg = 00:11:49 verbose #8383 > > inl value = value |> sm'.as_str 00:11:49 verbose #8384 > > !\\((arg, value), $'"$0.value_name($1)"') 00:11:49 verbose #8385 > > 00:11:49 verbose #8386 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:49 verbose #8387 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:49 verbose #8388 > > │ ### value_parser │ 00:11:49 verbose #8389 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:49 verbose #8390 > > 00:11:49 verbose #8391 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:49 verbose #8392 > > nominal value_parser = 00:11:49 verbose #8393 > > `( 00:11:49 verbose #8394 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:11:49 verbose #8395 > > Fable.Core.Emit(\"clap::builder::ValueParser\")>]]\n#endif\ntype 00:11:49 verbose #8396 > > clap_builder_ValueParser = class end" 00:11:49 verbose #8397 > > $'' : $'clap_builder_ValueParser' 00:11:49 verbose #8398 > > ) 00:11:50 verbose #8399 > > 00:11:50 verbose #8400 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:50 verbose #8401 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:50 verbose #8402 > > │ ### possible_value │ 00:11:50 verbose #8403 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:50 verbose #8404 > > 00:11:50 verbose #8405 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:50 verbose #8406 > > nominal possible_value = 00:11:50 verbose #8407 > > `( 00:11:50 verbose #8408 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:11:50 verbose #8409 > > Fable.Core.Emit(\"clap::builder::PossibleValue\")>]]\n#endif\ntype 00:11:50 verbose #8410 > > clap_builder_PossibleValue = class end" 00:11:50 verbose #8411 > > $'' : $'clap_builder_PossibleValue' 00:11:50 verbose #8412 > > ) 00:11:50 verbose #8413 > > 00:11:50 verbose #8414 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:50 verbose #8415 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:50 verbose #8416 > > │ ### new_possible_value │ 00:11:50 verbose #8417 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:50 verbose #8418 > > 00:11:50 verbose #8419 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:50 verbose #8420 > > inl new_possible_value forall t. (x : t) : possible_value = 00:11:50 verbose #8421 > > !\\(x, $'"clap::builder::PossibleValue::new(&**$0)"') 00:11:51 verbose #8422 > > 00:11:51 verbose #8423 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:51 verbose #8424 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:51 verbose #8425 > > │ ### value_parser_path_buf │ 00:11:51 verbose #8426 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:51 verbose #8427 > > 00:11:51 verbose #8428 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:51 verbose #8429 > > inl value_parser_path_buf () : value_parser = 00:11:51 verbose #8430 > > !\($'"clap::value_parser\!(std::path::PathBuf)"') 00:11:51 verbose #8431 > > 00:11:51 verbose #8432 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:51 verbose #8433 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:51 verbose #8434 > > │ ### value_parser_expr │ 00:11:51 verbose #8435 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:51 verbose #8436 > > 00:11:51 verbose #8437 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:51 verbose #8438 > > inl value_parser_expr (expr : string) : value_parser = 00:11:51 verbose #8439 > > !\($'"clap::value_parser\!(" + !expr + ").into()"') 00:11:52 verbose #8440 > > 00:11:52 verbose #8441 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:52 verbose #8442 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:52 verbose #8443 > > │ ### arg_value_parser │ 00:11:52 verbose #8444 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:52 verbose #8445 > > 00:11:52 verbose #8446 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:52 verbose #8447 > > inl arg_value_parser (values : value_parser) (arg : arg) : arg = 00:11:52 verbose #8448 > > !\\((arg, values), $'"$0.value_parser($1)"') 00:11:52 verbose #8449 > > 00:11:52 verbose #8450 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:52 verbose #8451 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:52 verbose #8452 > > │ ### arg_action │ 00:11:52 verbose #8453 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:52 verbose #8454 > > 00:11:52 verbose #8455 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:52 verbose #8456 > > nominal arg_action' = 00:11:52 verbose #8457 > > `( 00:11:52 verbose #8458 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:11:52 verbose #8459 > > Fable.Core.Emit(\"clap::ArgAction\")>]]\n#endif\ntype clap_ArgAction = class 00:11:52 verbose #8460 > > end" 00:11:52 verbose #8461 > > $'' : $'clap_ArgAction' 00:11:52 verbose #8462 > > ) 00:11:52 verbose #8463 > > 00:11:52 verbose #8464 > > union arg_action = 00:11:52 verbose #8465 > > | Set 00:11:52 verbose #8466 > > | Append 00:11:52 verbose #8467 > > | SetTrue 00:11:52 verbose #8468 > > | SetFalse 00:11:52 verbose #8469 > > | Count 00:11:52 verbose #8470 > > | Help 00:11:52 verbose #8471 > > | HelpShort 00:11:52 verbose #8472 > > | HelpLong 00:11:52 verbose #8473 > > | Version 00:11:52 verbose #8474 > > 00:11:52 verbose #8475 > > inl arg_action = function 00:11:52 verbose #8476 > > | Set => !\($'"clap::ArgAction::Set"') : arg_action' 00:11:52 verbose #8477 > > | Append => !\($'"clap::ArgAction::Append"') : arg_action' 00:11:52 verbose #8478 > > | SetTrue => !\($'"clap::ArgAction::SetTrue"') : arg_action' 00:11:52 verbose #8479 > > | SetFalse => !\($'"clap::ArgAction::SetFalse"') : arg_action' 00:11:52 verbose #8480 > > | Count => !\($'"clap::ArgAction::Count"') : arg_action' 00:11:52 verbose #8481 > > | Help => !\($'"clap::ArgAction::Help"') : arg_action' 00:11:52 verbose #8482 > > | HelpShort => !\($'"clap::ArgAction::HelpShort"') : arg_action' 00:11:52 verbose #8483 > > | HelpLong => !\($'"clap::ArgAction::HelpLong"') : arg_action' 00:11:52 verbose #8484 > > | Version => !\($'"clap::ArgAction::Version"') : arg_action' 00:11:52 verbose #8485 > > 00:11:52 verbose #8486 > > inl arg_action (value : arg_action) (arg : arg) : arg = 00:11:52 verbose #8487 > > inl value = value |> arg_action 00:11:52 verbose #8488 > > !\\((arg, value), $'"$0.action($1)"') 00:11:53 verbose #8489 > > 00:11:53 verbose #8490 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:53 verbose #8491 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:53 verbose #8492 > > │ ### arg_index │ 00:11:53 verbose #8493 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:53 verbose #8494 > > 00:11:53 verbose #8495 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:53 verbose #8496 > > inl arg_index (value : i32) (arg : arg) : arg = 00:11:53 verbose #8497 > > !\\((arg, value), $'"$0.index($1)"') 00:11:53 verbose #8498 > > 00:11:53 verbose #8499 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:53 verbose #8500 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:53 verbose #8501 > > │ ### arg_matches │ 00:11:53 verbose #8502 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:53 verbose #8503 > > 00:11:53 verbose #8504 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:53 verbose #8505 > > nominal arg_matches = 00:11:53 verbose #8506 > > `( 00:11:53 verbose #8507 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:11:53 verbose #8508 > > Fable.Core.Emit(\"clap::ArgMatches\")>]]\n#endif\ntype clap_ArgMatches = class 00:11:53 verbose #8509 > > end" 00:11:53 verbose #8510 > > $'' : $'clap_ArgMatches' 00:11:53 verbose #8511 > > ) 00:11:53 verbose #8512 > > 00:11:53 verbose #8513 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:53 verbose #8514 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:53 verbose #8515 > > │ ### command_get_matches │ 00:11:53 verbose #8516 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:53 verbose #8517 > > 00:11:53 verbose #8518 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:53 verbose #8519 > > inl command_get_matches (command : command) : arg_matches = 00:11:53 verbose #8520 > > !\\(command, $'"clap::Command::get_matches($0)"') 00:11:54 verbose #8521 > > 00:11:54 verbose #8522 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:54 verbose #8523 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:54 verbose #8524 > > │ ### command_get_matches_from │ 00:11:54 verbose #8525 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:54 verbose #8526 > > 00:11:54 verbose #8527 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:54 verbose #8528 > > inl command_get_matches_from (args : array_base string) (command : command) : 00:11:54 verbose #8529 > > arg_matches = 00:11:54 verbose #8530 > > inl args = args |> am'.to_vec |> am'.vec_map sm'.to_std_string 00:11:54 verbose #8531 > > !\\(command, $'"clap::Command::get_matches_from($0, !args)"') 00:11:54 verbose #8532 > > 00:11:54 verbose #8533 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:54 verbose #8534 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:54 verbose #8535 > > │ ### command_args_override_self │ 00:11:54 verbose #8536 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:54 verbose #8537 > > 00:11:54 verbose #8538 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:54 verbose #8539 > > inl command_args_override_self (yes : bool) (command : command) : command = 00:11:54 verbose #8540 > > !\\(command, $'"clap::Command::args_override_self($0, !yes)"') 00:11:55 verbose #8541 > > 00:11:55 verbose #8542 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:55 verbose #8543 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:55 verbose #8544 > > │ ### command_init_arg │ 00:11:55 verbose #8545 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:55 verbose #8546 > > 00:11:55 verbose #8547 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:55 verbose #8548 > > inl command_init_arg (long, short) fn command = 00:11:55 verbose #8549 > > command 00:11:55 verbose #8550 > > |> command_arg ( 00:11:55 verbose #8551 > > new_arg ##long 00:11:55 verbose #8552 > > |> arg_short short 00:11:55 verbose #8553 > > |> arg_long ##long 00:11:55 verbose #8554 > > |> fn 00:11:55 verbose #8555 > > ) 00:11:55 verbose #8556 > > 00:11:55 verbose #8557 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:55 verbose #8558 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:55 verbose #8559 > > │ ### matches_get_one │ 00:11:55 verbose #8560 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:55 verbose #8561 > > 00:11:55 verbose #8562 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:55 verbose #8563 > > inl matches_get_one forall t. (x : string) (matches : arg_matches) : 00:11:55 verbose #8564 > > optionm'.option' t = 00:11:55 verbose #8565 > > inl x = join x 00:11:55 verbose #8566 > > inl x = x |> sm'.as_str 00:11:55 verbose #8567 > > !\\((matches, x), $'"clap::ArgMatches::get_one(&$0, $1).cloned()"') 00:11:56 verbose #8568 > > 00:11:56 verbose #8569 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:56 verbose #8570 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:56 verbose #8571 > > │ ### matches_get_flag │ 00:11:56 verbose #8572 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:56 verbose #8573 > > 00:11:56 verbose #8574 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:56 verbose #8575 > > inl matches_get_flag (x : string) (matches : arg_matches) : bool = 00:11:56 verbose #8576 > > inl x = join x 00:11:56 verbose #8577 > > inl x = x |> sm'.as_str 00:11:56 verbose #8578 > > !\\((matches, x), $'"clap::ArgMatches::get_flag(&$0, $1)"') 00:11:56 verbose #8579 > > 00:11:56 verbose #8580 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:56 verbose #8581 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:56 verbose #8582 > > │ ### matches_get_many │ 00:11:56 verbose #8583 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:56 verbose #8584 > > 00:11:56 verbose #8585 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:56 verbose #8586 > > inl matches_get_many forall t. (x : string) (matches : arg_matches) : 00:11:56 verbose #8587 > > optionm'.option' (am'.vec t) = 00:11:56 verbose #8588 > > inl x = join x 00:11:56 verbose #8589 > > inl x = x |> sm'.as_str 00:11:56 verbose #8590 > > !\\((matches, x), $'"clap::ArgMatches::get_many(&$0, $1).map(|x| 00:11:56 verbose #8591 > > x.cloned().into_iter().collect())"') 00:11:57 verbose #8592 > > 00:11:57 verbose #8593 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:57 verbose #8594 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:57 verbose #8595 > > │ ### matches_get_occurrences │ 00:11:57 verbose #8596 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:57 verbose #8597 > > 00:11:57 verbose #8598 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:57 verbose #8599 > > inl matches_get_occurrences (x : string) (matches : arg_matches) : 00:11:57 verbose #8600 > > optionm'.option' (array_base sm'.std_string) = 00:11:57 verbose #8601 > > inl x = join x 00:11:57 verbose #8602 > > inl x = x |> sm'.as_str 00:11:57 verbose #8603 > > !\($'"clap::ArgMatches::get_occurrences(&!matches, !x).cloned()"') 00:11:57 verbose #8604 > > 00:11:57 verbose #8605 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:57 verbose #8606 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:57 verbose #8607 > > │ ### matches_subcommand │ 00:11:57 verbose #8608 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:57 verbose #8609 > > 00:11:57 verbose #8610 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:57 verbose #8611 > > inl matches_subcommand (matches : arg_matches) : optionm'.option' 00:11:57 verbose #8612 > > (sm'.std_string * arg_matches) = 00:11:57 verbose #8613 > > !\\((matches, sm'.ref_to_std_string), 00:11:57 verbose #8614 > > $'"clap::ArgMatches::subcommand(Box::leak(Box::new($0))).map(|(a, b)| ($1(a), 00:11:57 verbose #8615 > > b.clone()))"') 00:11:57 verbose #8616 > > 00:11:57 verbose #8617 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:57 verbose #8618 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:57 verbose #8619 > > │ ### matches_values_of │ 00:11:57 verbose #8620 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:57 verbose #8621 > > 00:11:57 verbose #8622 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:57 verbose #8623 > > inl matches_values_of (x : string) (matches : arg_matches) : array_base 00:11:57 verbose #8624 > > sm'.std_string = 00:11:57 verbose #8625 > > !\\((matches, x), $'"clap::ArgMatches::values_of($0, &*$1)"') 00:11:58 verbose #8626 > > 00:11:58 verbose #8627 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:58 verbose #8628 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:58 verbose #8629 > > │ ### command_subcommand_required │ 00:11:58 verbose #8630 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:58 verbose #8631 > > 00:11:58 verbose #8632 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:58 verbose #8633 > > inl command_subcommand_required (value : bool) (command : command) : command = 00:11:58 verbose #8634 > > !\\(command, $'"clap::Command::subcommand_required($0, !value)"') 00:11:58 verbose #8635 > > 00:11:58 verbose #8636 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:58 verbose #8637 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:58 verbose #8638 > > │ ### command_subcommand │ 00:11:58 verbose #8639 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:58 verbose #8640 > > 00:11:58 verbose #8641 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:58 verbose #8642 > > inl command_subcommand (subcommand : command) (command : command) : command = 00:11:58 verbose #8643 > > !\\(command, $'"clap::Command::subcommand($0, !subcommand)"') 00:11:59 verbose #8644 > > 00:11:59 verbose #8645 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:59 verbose #8646 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:59 verbose #8647 > > │ ### value_parser_possible_values │ 00:11:59 verbose #8648 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:59 verbose #8649 > > 00:11:59 verbose #8650 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:59 verbose #8651 > > inl value_parser_possible_values (values : array_base string) : value_parser = 00:11:59 verbose #8652 > > inl values = 00:11:59 verbose #8653 > > values 00:11:59 verbose #8654 > > |> am'.to_vec 00:11:59 verbose #8655 > > |> am'.vec_map (sm'.to_std_string >> rust.new_box >> rust.box_leak >> 00:11:59 verbose #8656 > > new_possible_value) 00:11:59 verbose #8657 > > !\\(values, 00:11:59 verbose #8658 > > $'"Into::<clap::builder::ValueParser>::into(clap::builder::PossibleValuesParser: 00:11:59 verbose #8659 > > :new($0))"') 00:11:59 verbose #8660 > > 00:11:59 verbose #8661 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:11:59 verbose #8662 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:11:59 verbose #8663 > > │ ### arg_union │ 00:11:59 verbose #8664 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:11:59 verbose #8665 > > 00:11:59 verbose #8666 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:11:59 verbose #8667 > > inl arg_union forall union_type. (fn : union_type -> ()) (arg : arg) : arg = 00:11:59 verbose #8668 > > arg 00:11:59 verbose #8669 > > |> arg_value_parser ( 00:11:59 verbose #8670 > > real reflection.get_union_fields_untag `union_type () 00:11:59 verbose #8671 > > |> fun x => x : _ (string * union_type) 00:11:59 verbose #8672 > > |> listm.map fst 00:11:59 verbose #8673 > > |> listm'.box 00:11:59 verbose #8674 > > |> listm'.to_array' 00:11:59 verbose #8675 > > |> value_parser_possible_values 00:11:59 verbose #8676 > > ) 00:12:00 verbose #8677 > > 00:12:00 verbose #8678 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:00 verbose #8679 > > //// test 00:12:00 verbose #8680 > > ///! rust -d clap 00:12:00 verbose #8681 > > 00:12:00 verbose #8682 > > ##"command" 00:12:00 verbose #8683 > > |> new_command 00:12:00 verbose #8684 > > |> command_init_arg ("trace-level", 't') ( 00:12:00 verbose #8685 > > real arg_union `trace_level ignore 00:12:00 verbose #8686 > > ) 00:12:00 verbose #8687 > > |> command_get_matches_from ;[[ "_"; "--trace-level"; "Critical" ]] 00:12:00 verbose #8688 > > |> matches_get_one "trace-level" 00:12:00 verbose #8689 > > |> optionm'.unwrap 00:12:00 verbose #8690 > > |> sm'.from_std_string 00:12:00 verbose #8691 > > |> reflection.union_try_pick 00:12:00 verbose #8692 > > |> optionm.value 00:12:00 verbose #8693 > > |> _assert_eq Critical 00:12:18 verbose #8694 > > 00:12:18 verbose #8695 > > ╭─[ 18.45s - return value ]────────────────────────────────────────────────────╮ 00:12:18 verbose #8696 > > │ __assert_eq / actual: US1_4 / expected: US1_4 │ 00:12:18 verbose #8697 > > │ │ 00:12:18 verbose #8698 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:18 verbose #8699 > > 00:12:18 verbose #8700 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:18 verbose #8701 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:18 verbose #8702 > > │ ### command_debug_assert │ 00:12:18 verbose #8703 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:18 verbose #8704 > > 00:12:18 verbose #8705 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:18 verbose #8706 > > inl command_debug_assert (command : command) : () = 00:12:18 verbose #8707 > > !\\(command, $'"clap::Command::debug_assert($0)"') 00:12:19 verbose #8708 > > 00:12:19 verbose #8709 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:19 verbose #8710 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:19 verbose #8711 > > │ ## fsharp │ 00:12:19 verbose #8712 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:19 verbose #8713 > > 00:12:19 verbose #8714 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:19 verbose #8715 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:19 verbose #8716 > > │ ### process │ 00:12:19 verbose #8717 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:19 verbose #8718 > > 00:12:19 verbose #8719 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:19 verbose #8720 > > nominal process = $'System.Diagnostics.Process' 00:12:19 verbose #8721 > > 00:12:19 verbose #8722 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:19 verbose #8723 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:19 verbose #8724 > > │ ### process_start_info │ 00:12:19 verbose #8725 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:19 verbose #8726 > > 00:12:19 verbose #8727 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:19 verbose #8728 > > nominal process_start_info = $'System.Diagnostics.ProcessStartInfo' 00:12:19 verbose #8729 > > 00:12:19 verbose #8730 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:19 verbose #8731 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:19 verbose #8732 > > │ ### data_received_event_args │ 00:12:19 verbose #8733 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:19 verbose #8734 > > 00:12:19 verbose #8735 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:19 verbose #8736 > > nominal data_received_event_args = $'System.Diagnostics.DataReceivedEventArgs' 00:12:20 verbose #8737 > > 00:12:20 verbose #8738 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:20 verbose #8739 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:20 verbose #8740 > > │ ### new_process │ 00:12:20 verbose #8741 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:20 verbose #8742 > > 00:12:20 verbose #8743 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:20 verbose #8744 > > inl new_process (process_start_info : process_start_info) : process = 00:12:20 verbose #8745 > > $'new `process (StartInfo = !process_start_info)' 00:12:20 verbose #8746 > > 00:12:20 verbose #8747 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:20 verbose #8748 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:20 verbose #8749 > > │ ### process_start │ 00:12:20 verbose #8750 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:20 verbose #8751 > > 00:12:20 verbose #8752 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:20 verbose #8753 > > inl process_start (process : process) : bool = 00:12:20 verbose #8754 > > $'!process.Start' () 00:12:21 verbose #8755 > > 00:12:21 verbose #8756 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:21 verbose #8757 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:21 verbose #8758 > > │ ### process_exit_code │ 00:12:21 verbose #8759 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:21 verbose #8760 > > 00:12:21 verbose #8761 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:21 verbose #8762 > > inl process_exit_code (process : process) : i32 = 00:12:21 verbose #8763 > > $'!process.ExitCode' 00:12:21 verbose #8764 > > 00:12:21 verbose #8765 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:21 verbose #8766 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:21 verbose #8767 > > │ ### process_id │ 00:12:21 verbose #8768 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:21 verbose #8769 > > 00:12:21 verbose #8770 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:21 verbose #8771 > > inl process_id (process : process) : i32 = 00:12:21 verbose #8772 > > $'!process.Id' 00:12:22 verbose #8773 > > 00:12:22 verbose #8774 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:22 verbose #8775 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:22 verbose #8776 > > │ ### process_has_exited │ 00:12:22 verbose #8777 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:22 verbose #8778 > > 00:12:22 verbose #8779 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:22 verbose #8780 > > inl process_has_exited (process : process) : bool = 00:12:22 verbose #8781 > > run_target function 00:12:22 verbose #8782 > > | Fsharp (Native) => fun () => 00:12:22 verbose #8783 > > $'!process.HasExited' 00:12:22 verbose #8784 > > | _ => fun () => null () 00:12:22 verbose #8785 > > 00:12:22 verbose #8786 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:22 verbose #8787 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:22 verbose #8788 > > │ ### process_kill │ 00:12:22 verbose #8789 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:22 verbose #8790 > > 00:12:22 verbose #8791 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:22 verbose #8792 > > inl process_kill (process : process) : () = 00:12:22 verbose #8793 > > run_target function 00:12:22 verbose #8794 > > | Fsharp (Native) => fun () => 00:12:22 verbose #8795 > > $'!process.Kill' () 00:12:22 verbose #8796 > > | _ => fun () => () 00:12:23 verbose #8797 > > 00:12:23 verbose #8798 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:23 verbose #8799 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:23 verbose #8800 > > │ ### process_begin_error_read_line │ 00:12:23 verbose #8801 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:23 verbose #8802 > > 00:12:23 verbose #8803 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:23 verbose #8804 > > inl process_begin_error_read_line (process : process) : () = 00:12:23 verbose #8805 > > $'!process.BeginErrorReadLine' () 00:12:23 verbose #8806 > > 00:12:23 verbose #8807 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:23 verbose #8808 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:23 verbose #8809 > > │ ### process_begin_output_read_line │ 00:12:23 verbose #8810 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:23 verbose #8811 > > 00:12:23 verbose #8812 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:23 verbose #8813 > > inl process_begin_output_read_line (process : process) : () = 00:12:23 verbose #8814 > > $'!process.BeginOutputReadLine' () 00:12:24 verbose #8815 > > 00:12:24 verbose #8816 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:24 verbose #8817 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:24 verbose #8818 > > │ ### process_add_output_data_received │ 00:12:24 verbose #8819 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:24 verbose #8820 > > 00:12:24 verbose #8821 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:24 verbose #8822 > > inl process_add_output_data_received fn (process : process) : () = 00:12:24 verbose #8823 > > $'!process.OutputDataReceived.Add !fn ' 00:12:24 verbose #8824 > > 00:12:24 verbose #8825 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:24 verbose #8826 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:24 verbose #8827 > > │ ### process_add_error_data_received │ 00:12:24 verbose #8828 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:24 verbose #8829 > > 00:12:24 verbose #8830 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:24 verbose #8831 > > inl process_add_error_data_received fn (process : process) : () = 00:12:24 verbose #8832 > > $'!process.ErrorDataReceived.Add !fn ' 00:12:25 verbose #8833 > > 00:12:25 verbose #8834 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:25 verbose #8835 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:25 verbose #8836 > > │ ### process_wait_for_exit_async │ 00:12:25 verbose #8837 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:25 verbose #8838 > > 00:12:25 verbose #8839 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:25 verbose #8840 > > inl process_wait_for_exit_async (ct : threading.cancellation_token) (process : 00:12:25 verbose #8841 > > process) : async.task () = 00:12:25 verbose #8842 > > $'!process.WaitForExitAsync !ct ' 00:12:25 verbose #8843 > > 00:12:25 verbose #8844 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:25 verbose #8845 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:25 verbose #8846 > > │ ### event_data │ 00:12:25 verbose #8847 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:25 verbose #8848 > > 00:12:25 verbose #8849 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:25 verbose #8850 > > inl event_data (e : data_received_event_args) : string = 00:12:25 verbose #8851 > > $'!e.Data' 00:12:26 verbose #8852 > > 00:12:26 verbose #8853 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:26 verbose #8854 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:26 verbose #8855 > > │ ### execute_with_options_async │ 00:12:26 verbose #8856 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:26 verbose #8857 > > 00:12:26 verbose #8858 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:26 verbose #8859 > > let execute_with_options_async (options : execution_options) : _ (i32 * string) 00:12:26 verbose #8860 > > = 00:12:26 verbose #8861 > > run_target function 00:12:26 verbose #8862 > > | Fsharp (Native) => fun () => 00:12:26 verbose #8863 > > fun () => 00:12:26 verbose #8864 > > inl file_name, arguments = options.command |> split_command |> 00:12:26 verbose #8865 > > resultm.get 00:12:26 verbose #8866 > > inl working_directory = options.working_directory |> 00:12:26 verbose #8867 > > optionm'.unbox |> optionm'.default_value "" 00:12:26 verbose #8868 > > 00:12:26 verbose #8869 > > trace Debug 00:12:26 verbose #8870 > > fun () => $'$"runtime.execute_with_options_async"' 00:12:26 verbose #8871 > > fun () => { options } 00:12:26 verbose #8872 > > 00:12:26 verbose #8873 > > inl utf8 = sm'.encoding_utf8 () 00:12:26 verbose #8874 > > inl arguments = arguments |> optionm'.default_value "" 00:12:26 verbose #8875 > > 00:12:26 verbose #8876 > > $'let start_info = System.Diagnostics.ProcessStartInfo (' 00:12:26 verbose #8877 > > $' Arguments = !arguments,' 00:12:26 verbose #8878 > > $' StandardOutputEncoding = !utf8,' 00:12:26 verbose #8879 > > $' WorkingDirectory = !working_directory,' 00:12:26 verbose #8880 > > $' FileName = !file_name,' 00:12:26 verbose #8881 > > $' CreateNoWindow = true,' 00:12:26 verbose #8882 > > $' RedirectStandardError = true,' 00:12:26 verbose #8883 > > $' RedirectStandardOutput = true,' 00:12:26 verbose #8884 > > $' UseShellExecute = false' 00:12:26 verbose #8885 > > $')' 00:12:26 verbose #8886 > > inl start_info : process_start_info = $'start_info' 00:12:26 verbose #8887 > > 00:12:26 verbose #8888 > > (a options.environment_variables : _ i32 _) 00:12:26 verbose #8889 > > |> am.iter fun key, value => 00:12:26 verbose #8890 > > $'!start_info.EnvironmentVariables.[[!key]] <- !value ' 00:12:26 verbose #8891 > > 00:12:26 verbose #8892 > > inl proc = start_info |> new_process |> use 00:12:26 verbose #8893 > > inl output : _ string = threading.new_concurrent_stack () 00:12:26 verbose #8894 > > 00:12:26 verbose #8895 > > inl event error (e : data_received_event_args) = async.new_async 00:12:26 verbose #8896 > > fun () => 00:12:26 verbose #8897 > > inl data = e |> event_data 00:12:26 verbose #8898 > > if data <> null () then 00:12:26 verbose #8899 > > match options.on_line |> optionm'.unbox with 00:12:26 verbose #8900 > > | Some on_line => 00:12:26 verbose #8901 > > on_line 00:12:26 verbose #8902 > > { 00:12:26 verbose #8903 > > process_id = proc |> process_id 00:12:26 verbose #8904 > > line = data 00:12:26 verbose #8905 > > error = error 00:12:26 verbose #8906 > > } 00:12:26 verbose #8907 > > |> async.do 00:12:26 verbose #8908 > > | None => () 00:12:26 verbose #8909 > > 00:12:26 verbose #8910 > > inl text = 00:12:26 verbose #8911 > > if error 00:12:26 verbose #8912 > > then $'$"\! {!data}"' 00:12:26 verbose #8913 > > else $'$"> {!data}"' 00:12:26 verbose #8914 > > if options.trace 00:12:26 verbose #8915 > > then trace Verbose (fun () => text) id 00:12:26 verbose #8916 > > else text |> console.write_line 00:12:26 verbose #8917 > > 00:12:26 verbose #8918 > > inl l = if error then $'"\\u001b[[7;4m"' else "" 00:12:26 verbose #8919 > > inl r = if error then $'"\\u001b[[0m"' else "" 00:12:26 verbose #8920 > > output |> threading.concurrent_stack_push 00:12:26 verbose #8921 > > $'$"{!l}{!data}{!r}"' 00:12:26 verbose #8922 > > 00:12:26 verbose #8923 > > proc |> process_add_output_data_received (event false >> 00:12:26 verbose #8924 > > async.start_immediate) 00:12:26 verbose #8925 > > proc |> process_add_error_data_received (event true >> 00:12:26 verbose #8926 > > async.start_immediate) 00:12:26 verbose #8927 > > 00:12:26 verbose #8928 > > if proc |> process_start |> not 00:12:26 verbose #8929 > > then failwith $'$"runtime.execute_with_options_async 00:12:26 verbose #8930 > > process_start error"' 00:12:26 verbose #8931 > > 00:12:26 verbose #8932 > > proc |> process_begin_error_read_line 00:12:26 verbose #8933 > > proc |> process_begin_output_read_line 00:12:26 verbose #8934 > > 00:12:26 verbose #8935 > > inl ct = 00:12:26 verbose #8936 > > options.cancellation_token 00:12:26 verbose #8937 > > |> optionm'.unbox 00:12:26 verbose #8938 > > |> optionm'.default_with threading.token_none 00:12:26 verbose #8939 > > |> async.merge_cancellation_token_with_default_async 00:12:26 verbose #8940 > > |> async.let' 00:12:26 verbose #8941 > > 00:12:26 verbose #8942 > > ct |> threading.token_register fun () => 00:12:26 verbose #8943 > > if proc |> process_has_exited |> not 00:12:26 verbose #8944 > > then proc |> process_kill 00:12:26 verbose #8945 > > |> use 00:12:26 verbose #8946 > > |> ignore 00:12:26 verbose #8947 > > 00:12:26 verbose #8948 > > inl exit_code : i32 = 00:12:26 verbose #8949 > > fun () => 00:12:26 verbose #8950 > > try_unit 00:12:26 verbose #8951 > > fun () => 00:12:26 verbose #8952 > > proc 00:12:26 verbose #8953 > > |> process_wait_for_exit_async ct 00:12:26 verbose #8954 > > |> async.await_task 00:12:26 verbose #8955 > > |> async.do 00:12:26 verbose #8956 > > proc |> process_exit_code |> return 00:12:26 verbose #8957 > > fun ex => 00:12:26 verbose #8958 > > // with :? 00:12:26 verbose #8959 > > System.Threading.Tasks.TaskCanceledException as ex => 00:12:26 verbose #8960 > > inl ex' = ex |> sm'.format_exception 00:12:26 verbose #8961 > > output |> threading.concurrent_stack_push ex' 00:12:26 verbose #8962 > > inl ex : async.task_canceled_exception = ex |> 00:12:26 verbose #8963 > > unbox 00:12:26 verbose #8964 > > trace Warning 00:12:26 verbose #8965 > > fun () => 00:12:26 verbose #8966 > > $'$"runtime.execute_with_options_async / WaitForExitAsync"' 00:12:26 verbose #8967 > > fun () => { ex } 00:12:26 verbose #8968 > > (limit.min : i32) |> return 00:12:26 verbose #8969 > > |> async.new_async_unit 00:12:26 verbose #8970 > > |> async.let' 00:12:26 verbose #8971 > > 00:12:26 verbose #8972 > > inl output = 00:12:26 verbose #8973 > > output 00:12:26 verbose #8974 > > |> seq.rev'' 00:12:26 verbose #8975 > > |> fun x => x : seq.seq' string 00:12:26 verbose #8976 > > |> sm'.concat "\n" 00:12:26 verbose #8977 > > 00:12:26 verbose #8978 > > trace Debug 00:12:26 verbose #8979 > > fun () => $'$"runtime.execute_with_options_async"' 00:12:26 verbose #8980 > > fun () => { exit_code output_length = output |> sm'.length : 00:12:26 verbose #8981 > > i32 } 00:12:26 verbose #8982 > > 00:12:26 verbose #8983 > > (exit_code, output) |> return 00:12:26 verbose #8984 > > |> async.new_async_unit 00:12:26 verbose #8985 > > | _ => fun () => 00:12:26 verbose #8986 > > global "#if FABLE_COMPILER\n[[<CompilationRepresentation 00:12:26 verbose #8987 > > (CompilationRepresentationFlags.ModuleSuffix)>]]\nmodule System =\n module 00:12:26 verbose #8988 > > Diagnostics =\n type Process = unit\n type DataReceivedEventArgs = 00:12:26 verbose #8989 > > unit\n#endif" 00:12:26 verbose #8990 > > null () 00:12:26 verbose #8991 > > 00:12:26 verbose #8992 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:26 verbose #8993 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:26 verbose #8994 > > │ ### execute_async │ 00:12:26 verbose #8995 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:26 verbose #8996 > > 00:12:26 verbose #8997 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:26 verbose #8998 > > inl execute_async command = 00:12:26 verbose #8999 > > execution_options fun x => { x with 00:12:26 verbose #9000 > > command = command 00:12:26 verbose #9001 > > } 00:12:26 verbose #9002 > > |> execute_with_options_async 00:12:27 verbose #9003 > > 00:12:27 verbose #9004 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:27 verbose #9005 > > //// test 00:12:27 verbose #9006 > > 00:12:27 verbose #9007 > > inl content = "╭─[[ 你好,世界!こんにちは世界! ]]─╮" 00:12:27 verbose #9008 > > fun () => 00:12:27 verbose #9009 > > inl file_name = "test.txt" 00:12:27 verbose #9010 > > inl temp_dir, disposable = 00:12:27 verbose #9011 > > (file_name, content) 00:12:27 verbose #9012 > > |> sm'.format_debug 00:12:27 verbose #9013 > > |> crypto.hash_text 00:12:27 verbose #9014 > > |> file_system.create_temp_dir' 00:12:27 verbose #9015 > > disposable |> use |> ignore 00:12:27 verbose #9016 > > 00:12:27 verbose #9017 > > inl path = temp_dir </> file_name 00:12:27 verbose #9018 > > 00:12:27 verbose #9019 > > inl exit_code, result = execute_async $'\@$"pwsh -c ""Get-Content 00:12:27 verbose #9020 > > {!path}"""' |> async.let' 00:12:27 verbose #9021 > > exit_code |> join _assert_eq 1 00:12:27 verbose #9022 > > result |> _assert sm'.contains "not exist" 00:12:27 verbose #9023 > > 00:12:27 verbose #9024 > > content |> file_system.write_all_text_async path |> async.do 00:12:27 verbose #9025 > > 00:12:27 verbose #9026 > > execution_options fun x => { x with 00:12:27 verbose #9027 > > command = $'\@$"cat ""{!file_name}"""' 00:12:27 verbose #9028 > > working_directory = Some temp_dir |> optionm'.box 00:12:27 verbose #9029 > > } 00:12:27 verbose #9030 > > |> execute_with_options_async 00:12:27 verbose #9031 > > |> async.let' 00:12:27 verbose #9032 > > |> ignore 00:12:27 verbose #9033 > > 00:12:27 verbose #9034 > > execution_options fun x => { x with 00:12:27 verbose #9035 > > command = $'\@$"pwsh -c ""[[System.Console]]::OutputEncoding = 00:12:27 verbose #9036 > > [[System.Text.Encoding]]::UTF8; Get-Content {!file_name}"""' 00:12:27 verbose #9037 > > working_directory = Some temp_dir |> optionm'.box 00:12:27 verbose #9038 > > } 00:12:27 verbose #9039 > > |> execute_with_options_async 00:12:27 verbose #9040 > > |> async.return_await 00:12:27 verbose #9041 > > |> async.new_async_unit 00:12:27 verbose #9042 > > |> async.run_with_timeout 10000 00:12:27 verbose #9043 > > |> function 00:12:27 verbose #9044 > > | Some (exit_code, output) => 00:12:27 verbose #9045 > > exit_code |> join _assert_eq 0i32 00:12:27 verbose #9046 > > output |> join _assert_eq content 00:12:27 verbose #9047 > > true 00:12:27 verbose #9048 > > | _ => false 00:12:27 verbose #9049 > > |> _assert_eq true 00:12:31 verbose #9050 > > 00:12:31 verbose #9051 > > ╭─[ 4.53s - stdout ]───────────────────────────────────────────────────────────╮ 00:12:31 verbose #9052 > > │ 00:00:00 debug #1 runtime.execute_with_options_async / { options = { │ 00:12:31 verbose #9053 > > │ command = pwsh -c "Get-Content │ 00:12:31 verbose #9054 > > │ C:\Users\i574n\AppData\Local\Temp\!create_temp_path_\dotnet-repl\76793606-81 │ 00:12:31 verbose #9055 > > │ 3b-88ad-7791-7ce2871edce9\test.txt"; cancellation_token = None; │ 00:12:31 verbose #9056 > > │ environment_variables = [||]; on_line = None; stdin = None; trace = true; │ 00:12:31 verbose #9057 > > │ working_directory = None } } │ 00:12:31 verbose #9058 > > │ 00:00:00 verbose #2 ! Get-Content: Cannot find path │ 00:12:31 verbose #9059 > > │ 'C:\Users\i574n\AppData\Local\Temp\!create_temp_path_\dotnet-repl\76793606-8 │ 00:12:31 verbose #9060 > > │ 13b-88ad-7791-7ce2871edce9\test.txt' because it does not exist. │ 00:12:31 verbose #9061 > > │ 00:00:00 debug #3 runtime.execute_with_options_async / { exit_code = │ 00:12:31 verbose #9062 > > │ 1; output_length = 197 } │ 00:12:31 verbose #9063 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:12:31 verbose #9064 > > │ __assert / actual: "not exist" / expected: "Get-Content: [ │ 00:12:31 verbose #9065 > > │ 31;1mCannot find path │ 00:12:31 verbose #9066 > > │ 'C:\Users\i574n\AppData\Local\Temp\!create_temp_path_\dotnet-repl\76793606-8 │ 00:12:31 verbose #9067 > > │ 13b-88ad-7791-7ce2871edce9\test.txt' because it does not exist." │ 00:12:31 verbose #9068 > > │ 00:00:00 debug #4 runtime.execute_with_options_async / { options = { │ 00:12:31 verbose #9069 > > │ command = cat "test.txt"; cancellation_token = None; environment_variables = │ 00:12:31 verbose #9070 > > │ [||]; on_line = None; stdin = None; trace = true; working_directory = Some │ 00:12:31 verbose #9071 > > │ │ 00:12:31 verbose #9072 > > │ "C:\Users\i574n\AppData\Local\Temp\!create_temp_path_\dotnet-repl\76793606-8 │ 00:12:31 verbose #9073 > > │ 13b-88ad-7791-7ce2871edce9" } } │ 00:12:31 verbose #9074 > > │ 00:00:00 verbose #5 > ╭─[ 你好,世界!こんにちは世界! ]─╮ │ 00:12:31 verbose #9075 > > │ 00:00:00 debug #6 runtime.execute_with_options_async / { exit_code = │ 00:12:31 verbose #9076 > > │ 0; output_length = 22 } │ 00:12:31 verbose #9077 > > │ 00:00:00 debug #7 runtime.execute_with_options_async / { options = { │ 00:12:31 verbose #9078 > > │ command = pwsh -c "[System.Console]::OutputEncoding = [ │ 00:12:31 verbose #9079 > > │ System.Text.Encoding]::UTF8; Get-Content test.txt"; cancellation_token = │ 00:12:31 verbose #9080 > > │ None; environment_variables = [||]; on_line = None; stdin = None; trace = │ 00:12:31 verbose #9081 > > │ true; working_directory = Some │ 00:12:31 verbose #9082 > > │ │ 00:12:31 verbose #9083 > > │ "C:\Users\i574n\AppData\Local\Temp\!create_temp_path_\dotnet-repl\76793606-8 │ 00:12:31 verbose #9084 > > │ 13b-88ad-7791-7ce2871edce9" } } │ 00:12:31 verbose #9085 > > │ 00:00:01 verbose #8 > ╭─[ 你好,世界!こんにちは世界! ]─╮ │ 00:12:31 verbose #9086 > > │ 00:00:01 debug #9 runtime.execute_with_options_async / { exit_code = │ 00:12:31 verbose #9087 > > │ 0; output_length = 22 } │ 00:12:31 verbose #9088 > > │ __assert_eq / actual: 0 / expected: 0 │ 00:12:31 verbose #9089 > > │ __assert_eq / actual: "╭─[ 你好,世界!こんにちは世界! ]─╮" / expected: "╭─ │ 00:12:31 verbose #9090 > > │ [ 你好,世界!こんにちは世界! ]─╮" │ 00:12:31 verbose #9091 > > │ __assert_eq / actual: true / expected: true │ 00:12:31 verbose #9092 > > │ │ 00:12:31 verbose #9093 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:31 verbose #9094 > > 00:12:31 verbose #9095 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:31 verbose #9096 > > //// test 00:12:31 verbose #9097 > > 00:12:31 verbose #9098 > > fun () => 00:12:31 verbose #9099 > > inl file_name = "test.txt" 00:12:31 verbose #9100 > > inl text = "0" 00:12:31 verbose #9101 > > 00:12:31 verbose #9102 > > inl temp_dir, disposable = 00:12:31 verbose #9103 > > (file_name, text) 00:12:31 verbose #9104 > > |> sm'.format_debug 00:12:31 verbose #9105 > > |> crypto.hash_text 00:12:31 verbose #9106 > > |> file_system.create_temp_dir' 00:12:31 verbose #9107 > > disposable |> use |> ignore 00:12:31 verbose #9108 > > inl path = temp_dir </> file_name 00:12:31 verbose #9109 > > text |> file_system.write_all_text_async path |> async.do 00:12:31 verbose #9110 > > 00:12:31 verbose #9111 > > inl cts = threading.new_cancellation_token_source () 00:12:31 verbose #9112 > > trace Debug (fun () => "1") id 00:12:31 verbose #9113 > > inl result = 00:12:31 verbose #9114 > > execution_options fun x => { x with 00:12:31 verbose #9115 > > command = $'\@$"pwsh -c ""Get-Content {!path}"""' 00:12:31 verbose #9116 > > cancellation_token = cts |> threading.cancellation_source_token |> 00:12:31 verbose #9117 > > Some |> optionm'.box 00:12:31 verbose #9118 > > } 00:12:31 verbose #9119 > > |> execute_with_options_async 00:12:31 verbose #9120 > > |> async.start_child 00:12:31 verbose #9121 > > |> async.let' 00:12:31 verbose #9122 > > trace Debug (fun () => "2") id 00:12:31 verbose #9123 > > async.sleep 100 |> async.do 00:12:31 verbose #9124 > > trace Debug (fun () => "3") id 00:12:31 verbose #9125 > > cts |> threading.cancellation_source_cancel 00:12:31 verbose #9126 > > trace Debug (fun () => "4") id 00:12:31 verbose #9127 > > inl exit_code, output = result |> async.let' 00:12:31 verbose #9128 > > trace Debug (fun () => "5") id 00:12:31 verbose #9129 > > (exit_code, output) |> return 00:12:31 verbose #9130 > > |> async.new_async_unit 00:12:31 verbose #9131 > > |> async.run_with_timeout 10000 00:12:31 verbose #9132 > > |> function 00:12:31 verbose #9133 > > | Some (exit_code, output) => 00:12:31 verbose #9134 > > exit_code |> _assert_eq -2147483648i32 00:12:31 verbose #9135 > > output |> _assert_eq (join 00:12:31 verbose #9136 > > "System.Threading.Tasks.TaskCanceledException: A task was canceled.") 00:12:31 verbose #9137 > > true 00:12:31 verbose #9138 > > | _ => false 00:12:31 verbose #9139 > > |> _assert_eq true 00:12:35 verbose #9140 > > 00:12:35 verbose #9141 > > ╭─[ 3.63s - stdout ]───────────────────────────────────────────────────────────╮ 00:12:35 verbose #9142 > > │ 00:00:00 debug #1 1 │ 00:12:35 verbose #9143 > > │ 00:00:00 debug #2 2 │ 00:12:35 verbose #9144 > > │ 00:00:00 debug #3 runtime.execute_with_options_async / { options = { │ 00:12:35 verbose #9145 > > │ command = pwsh -c "Get-Content │ 00:12:35 verbose #9146 > > │ C:\Users\i574n\AppData\Local\Temp\!create_temp_path_\dotnet-repl\613830ed-01 │ 00:12:35 verbose #9147 > > │ 6e-d959-8d21-02dc1c63c252\test.txt"; cancellation_token = Some │ 00:12:35 verbose #9148 > > │ System.Threading.CancellationToken; environment_variables = [||]; on_line = │ 00:12:35 verbose #9149 > > │ None; stdin = None; trace = true; working_directory = None } } │ 00:12:35 verbose #9150 > > │ 00:00:00 debug #4 3 │ 00:12:35 verbose #9151 > > │ 00:00:00 debug #5 4 │ 00:12:35 verbose #9152 > > │ 00:00:00 warning #6 runtime.execute_with_options_async / │ 00:12:35 verbose #9153 > > │ WaitForExitAsync / { ex = System.Threading.Tasks.TaskCanceledException: A │ 00:12:35 verbose #9154 > > │ task was canceled. } │ 00:12:35 verbose #9155 > > │ 00:00:00 debug #7 runtime.execute_with_options_async / { exit_code = │ 00:12:35 verbose #9156 > > │ -2147483648; output_length = 66 } │ 00:12:35 verbose #9157 > > │ 00:00:00 debug #8 5 │ 00:12:35 verbose #9158 > > │ __assert_eq / actual: -2147483648 / expected: -2147483648 │ 00:12:35 verbose #9159 > > │ __assert_eq / actual: "System.Threading.Tasks.TaskCanceledException: A task │ 00:12:35 verbose #9160 > > │ was canceled." / expected: "System.Threading.Tasks.TaskCanceledException: A │ 00:12:35 verbose #9161 > > │ task was canceled." │ 00:12:35 verbose #9162 > > │ __assert_eq / actual: true / expected: true │ 00:12:35 verbose #9163 > > │ │ 00:12:35 verbose #9164 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:35 verbose #9165 > > 00:12:35 verbose #9166 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:35 verbose #9167 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:35 verbose #9168 > > │ ### current_process_kill │ 00:12:35 verbose #9169 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:35 verbose #9170 > > 00:12:35 verbose #9171 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:35 verbose #9172 > > inl current_process_kill () = 00:12:35 verbose #9173 > > run_target function 00:12:35 verbose #9174 > > | Fsharp (Native) => fun () => 00:12:35 verbose #9175 > > inl fn () = 00:12:35 verbose #9176 > > run_target function 00:12:35 verbose #9177 > > | Fsharp (Native) => fun () => 00:12:35 verbose #9178 > > trace Warning (fun () => "runtime.current_process_kill 00:12:35 verbose #9179 > > exiting... 3") id 00:12:35 verbose #9180 > > $'System.Threading.Thread.Sleep 300' 00:12:35 verbose #9181 > > trace Warning (fun () => "runtime.current_process_kill 00:12:35 verbose #9182 > > exiting... 2") id 00:12:35 verbose #9183 > > $'System.Console.Out.Flush ()' 00:12:35 verbose #9184 > > $'System.Threading.Thread.Sleep 60' 00:12:35 verbose #9185 > > trace Warning (fun () => "runtime.current_process_kill 00:12:35 verbose #9186 > > exiting... 1") id 00:12:35 verbose #9187 > > $'System.Diagnostics.Process.GetCurrentProcess().Kill 00:12:35 verbose #9188 > > ()' : () 00:12:35 verbose #9189 > > | _ => fun () => () 00:12:35 verbose #9190 > > inl thread : threading.thread = $'new System.Threading.Thread (!fn)' 00:12:35 verbose #9191 > > thread |> $'_.Start()' : () 00:12:35 verbose #9192 > > | _ => fun () => () 00:12:35 verbose #9193 > > 00:12:35 verbose #9194 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:35 verbose #9195 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:35 verbose #9196 > > │ ### gc_collect │ 00:12:35 verbose #9197 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:35 verbose #9198 > > 00:12:35 verbose #9199 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:35 verbose #9200 > > inl gc_collect () = 00:12:35 verbose #9201 > > run_target function 00:12:35 verbose #9202 > > | Fsharp _ => fun () => $'System.GC.Collect' () : () 00:12:35 verbose #9203 > > | Python _ => fun () => 00:12:35 verbose #9204 > > backend_switch { 00:12:35 verbose #9205 > > Python = fun () => global "import gc" 00:12:35 verbose #9206 > > } 00:12:35 verbose #9207 > > ($'gc.collect()' : int) |> ignore 00:12:35 verbose #9208 > > | _ => fun () => () 00:12:36 verbose #9209 > > 00:12:36 verbose #9210 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:36 verbose #9211 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:36 verbose #9212 > > │ ## runtime │ 00:12:36 verbose #9213 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:36 verbose #9214 > > 00:12:36 verbose #9215 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:36 verbose #9216 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:36 verbose #9217 > > │ ### execute_with_options │ 00:12:36 verbose #9218 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:36 verbose #9219 > > 00:12:36 verbose #9220 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:36 verbose #9221 > > let execute_with_options (options : execution_options) : i32 * string = 00:12:36 verbose #9222 > > run_target function 00:12:36 verbose #9223 > > | Fsharp (Native) => fun () => 00:12:36 verbose #9224 > > options |> execute_with_options_async |> async.run_synchronously 00:12:36 verbose #9225 > > | Rust (Native) => fun () => 00:12:36 verbose #9226 > > inl command = join options.command 00:12:36 verbose #9227 > > inl file_name, arguments = command |> split_command |> resultm.get 00:12:36 verbose #9228 > > inl arguments = 00:12:36 verbose #9229 > > arguments 00:12:36 verbose #9230 > > |> optionm'.default_value "" 00:12:36 verbose #9231 > > |> split_args 00:12:36 verbose #9232 > > |> resultm.get 00:12:36 verbose #9233 > > |> am'.to_vec 00:12:36 verbose #9234 > > |> am'.vec_map sm'.to_std_string 00:12:36 verbose #9235 > > 00:12:36 verbose #9236 > > trace Debug 00:12:36 verbose #9237 > > fun () => $'$"runtime.execute_with_options"' 00:12:36 verbose #9238 > > fun () => { file_name arguments options } 00:12:36 verbose #9239 > > 00:12:36 verbose #9240 > > fun () => 00:12:36 verbose #9241 > > fun () => 00:12:36 verbose #9242 > > file_name 00:12:36 verbose #9243 > > |> new_process_command 00:12:36 verbose #9244 > > |> process_command_args arguments 00:12:36 verbose #9245 > > |> process_command_stdout (process_stdio_piped ()) 00:12:36 verbose #9246 > > |> process_command_stderr (process_stdio_piped ()) 00:12:36 verbose #9247 > > |> process_command_stdin (process_stdio_piped ()) 00:12:36 verbose #9248 > > |> fun command => 00:12:36 verbose #9249 > > match options.working_directory |> optionm'.unbox with 00:12:36 verbose #9250 > > | Some working_directory => 00:12:36 verbose #9251 > > command 00:12:36 verbose #9252 > > |> process_command_current_dir working_directory 00:12:36 verbose #9253 > > | None => command 00:12:36 verbose #9254 > > |> fun command => 00:12:36 verbose #9255 > > match options.environment_variables with 00:12:36 verbose #9256 > > | ;[[]] => command 00:12:36 verbose #9257 > > | vars => 00:12:36 verbose #9258 > > (command, vars |> am'.to_vec) 00:12:36 verbose #9259 > > ||> am'.vec_fold' fun command (key, value) => 00:12:36 verbose #9260 > > command |> process_command_env key value 00:12:36 verbose #9261 > > |> process_command_spawn 00:12:36 verbose #9262 > > |> resultm.map_error' sm'.format' 00:12:36 verbose #9263 > > |> resultm.map' (optionm'.some' >> threading.new_arc_mutex) 00:12:36 verbose #9264 > > |> resultm.unbox' 00:12:36 verbose #9265 > > |> function 00:12:36 verbose #9266 > > | Ok child => 00:12:36 verbose #9267 > > inl stdout = 00:12:36 verbose #9268 > > fun () => 00:12:36 verbose #9269 > > child 00:12:36 verbose #9270 > > |> threading.arc_mutex_lock 00:12:36 verbose #9271 > > |> resultm.unwrap' 00:12:36 verbose #9272 > > |> threading.mutex_guard_ref_mut 00:12:36 verbose #9273 > > |> optionm'.as_mut 00:12:36 verbose #9274 > > |> optionm'.unwrap 00:12:36 verbose #9275 > > |> process_child_stdout 00:12:36 verbose #9276 > > |> optionm'.take_ref_mut 00:12:36 verbose #9277 > > |> optionm'.unwrap 00:12:36 verbose #9278 > > |> rust.capture 00:12:36 verbose #9279 > > 00:12:36 verbose #9280 > > inl stderr = 00:12:36 verbose #9281 > > fun () => 00:12:36 verbose #9282 > > child 00:12:36 verbose #9283 > > |> threading.arc_mutex_lock 00:12:36 verbose #9284 > > |> resultm.unwrap' 00:12:36 verbose #9285 > > |> threading.mutex_guard_ref_mut 00:12:36 verbose #9286 > > |> optionm'.as_mut 00:12:36 verbose #9287 > > |> optionm'.unwrap 00:12:36 verbose #9288 > > |> process_child_stderr 00:12:36 verbose #9289 > > |> optionm'.take_ref_mut 00:12:36 verbose #9290 > > |> optionm'.unwrap 00:12:36 verbose #9291 > > |> rust.capture 00:12:36 verbose #9292 > > 00:12:36 verbose #9293 > > inl stdin = 00:12:36 verbose #9294 > > fun () => 00:12:36 verbose #9295 > > child 00:12:36 verbose #9296 > > |> threading.arc_mutex_lock 00:12:36 verbose #9297 > > |> resultm.unwrap' 00:12:36 verbose #9298 > > |> threading.mutex_guard_ref_mut 00:12:36 verbose #9299 > > |> optionm'.as_mut 00:12:36 verbose #9300 > > |> optionm'.unwrap 00:12:36 verbose #9301 > > |> process_child_stdin 00:12:36 verbose #9302 > > |> optionm'.take_ref_mut 00:12:36 verbose #9303 > > |> optionm'.unwrap 00:12:36 verbose #9304 > > |> optionm'.some' 00:12:36 verbose #9305 > > |> threading.new_arc_mutex 00:12:36 verbose #9306 > > |> rust.capture 00:12:36 verbose #9307 > > 00:12:36 verbose #9308 > > inl channel_sender, channel_receiver = 00:12:36 verbose #9309 > > threading.new_channel () 00:12:36 verbose #9310 > > inl channel_sender'' = channel_sender |> 00:12:36 verbose #9311 > > threading.new_arc_mutex 00:12:36 verbose #9312 > > inl channel_sender' = channel_sender |> 00:12:36 verbose #9313 > > threading.new_arc_mutex 00:12:36 verbose #9314 > > inl channel_receiver' = channel_receiver |> 00:12:36 verbose #9315 > > threading.new_arc_mutex 00:12:36 verbose #9316 > > 00:12:36 verbose #9317 > > inl stdout_handle = 00:12:36 verbose #9318 > > fun () => 00:12:36 verbose #9319 > > stdout 00:12:36 verbose #9320 > > |> stream.decode_reader_bytes_build 00:12:36 verbose #9321 > > |> stream.new_buf_reader 00:12:36 verbose #9322 > > |> stream.buf_read_lines 00:12:36 verbose #9323 > > |> iter.try_for_each fun lines => 00:12:36 verbose #9324 > > inl channel_sender'' = channel_sender'' 00:12:36 verbose #9325 > > |> rust.clone 00:12:36 verbose #9326 > > lines 00:12:36 verbose #9327 > > |> stdio_line (Ok ()) options.trace 00:12:36 verbose #9328 > > channel_sender'' 00:12:36 verbose #9329 > > |> resultm.to_try 00:12:36 verbose #9330 > > |> threading.spawn (1, 0) 1 00:12:36 verbose #9331 > > 00:12:36 verbose #9332 > > inl stderr_handle = 00:12:36 verbose #9333 > > fun () => 00:12:36 verbose #9334 > > stderr 00:12:36 verbose #9335 > > |> stream.decode_reader_bytes_build 00:12:36 verbose #9336 > > |> stream.new_buf_reader 00:12:36 verbose #9337 > > |> stream.buf_read_lines 00:12:36 verbose #9338 > > |> iter.try_for_each fun lines => 00:12:36 verbose #9339 > > inl channel_sender' = channel_sender' |> 00:12:36 verbose #9340 > > rust.clone 00:12:36 verbose #9341 > > lines 00:12:36 verbose #9342 > > |> stdio_line (Error ()) options.trace 00:12:36 verbose #9343 > > channel_sender' 00:12:36 verbose #9344 > > |> resultm.to_try 00:12:36 verbose #9345 > > |> threading.spawn (1, 0) 1 00:12:36 verbose #9346 > > 00:12:36 verbose #9347 > > match options.stdin |> optionm'.unbox with 00:12:36 verbose #9348 > > | Some stdin' => 00:12:36 verbose #9349 > > stdin 00:12:36 verbose #9350 > > |> threading.arc_mutex_lock 00:12:36 verbose #9351 > > |> resultm.unwrap' 00:12:36 verbose #9352 > > |> threading.mutex_guard_ref_mut 00:12:36 verbose #9353 > > |> optionm'.take_ref_mut 00:12:36 verbose #9354 > > |> optionm'.map' threading.new_arc_mutex 00:12:36 verbose #9355 > > |> optionm'.unbox 00:12:36 verbose #9356 > > |> function 00:12:36 verbose #9357 > > | Some stdin => 00:12:36 verbose #9358 > > stdin |> stdin' 00:12:36 verbose #9359 > > stdin 00:12:36 verbose #9360 > > |> threading.arc_mutex_lock 00:12:36 verbose #9361 > > |> resultm.unwrap' 00:12:36 verbose #9362 > > |> stdin_flush 00:12:36 verbose #9363 > > | None => () 00:12:36 verbose #9364 > > | None => () 00:12:36 verbose #9365 > > 00:12:36 verbose #9366 > > inl output = 00:12:36 verbose #9367 > > child 00:12:36 verbose #9368 > > |> threading.arc_mutex_lock 00:12:36 verbose #9369 > > |> resultm.unwrap' 00:12:36 verbose #9370 > > |> threading.mutex_guard_ref_mut 00:12:36 verbose #9371 > > |> optionm'.take_ref_mut 00:12:36 verbose #9372 > > |> optionm'.unwrap 00:12:36 verbose #9373 > > |> child_wait_with_output 00:12:36 verbose #9374 > > |> resultm.map_error' sm'.format' 00:12:36 verbose #9375 > > 00:12:36 verbose #9376 > > [[ stdout_handle; stderr_handle ]] 00:12:36 verbose #9377 > > |> am'.new_vec 00:12:36 verbose #9378 > > |> am'.vec_for_each' (threading.join' >> 00:12:36 verbose #9379 > > resultm.unwrap' >> resultm.unwrap') 00:12:36 verbose #9380 > > 00:12:36 verbose #9381 > > match output |> resultm.unbox with 00:12:36 verbose #9382 > > | Ok output => 00:12:36 verbose #9383 > > inl exit_code = 00:12:36 verbose #9384 > > output 00:12:36 verbose #9385 > > |> process_output_status 00:12:36 verbose #9386 > > |> process_exit_status_code 00:12:36 verbose #9387 > > |> optionm'.unbox 00:12:36 verbose #9388 > > match exit_code with 00:12:36 verbose #9389 > > | Some exit_code => exit_code, None, Some 00:12:36 verbose #9390 > > channel_receiver' 00:12:36 verbose #9391 > > | None => 00:12:36 verbose #9392 > > -1, 00:12:36 verbose #9393 > > ("runtime.execute_with_options 00:12:36 verbose #9394 > > exit_code=None" |> sm'.to_std_string |> Some), 00:12:36 verbose #9395 > > Some channel_receiver' 00:12:36 verbose #9396 > > | Error error => 00:12:36 verbose #9397 > > trace Critical 00:12:36 verbose #9398 > > fun () => $'$"runtime.execute_with_options 00:12:36 verbose #9399 > > output error"' 00:12:36 verbose #9400 > > fun () => { error } 00:12:36 verbose #9401 > > -2i32, error |> Some, None 00:12:36 verbose #9402 > > | Error error => 00:12:36 verbose #9403 > > trace Critical 00:12:36 verbose #9404 > > fun () => $'$"runtime.execute_with_options 00:12:36 verbose #9405 > > child error"' 00:12:36 verbose #9406 > > fun () => { error } 00:12:36 verbose #9407 > > -1i32, error |> Some, None 00:12:36 verbose #9408 > > |> function 00:12:36 verbose #9409 > > | exit_code, std_trace, channel_receiver => 00:12:36 verbose #9410 > > inl std_trace = 00:12:36 verbose #9411 > > channel_receiver 00:12:36 verbose #9412 > > |> optionm'.box 00:12:36 verbose #9413 > > |> optionm'.map' fun channel_receiver => 00:12:36 verbose #9414 > > channel_receiver 00:12:36 verbose #9415 > > |> threading.arc_mutex_lock 00:12:36 verbose #9416 > > |> resultm.unwrap' 00:12:36 verbose #9417 > > |> iter.iter 00:12:36 verbose #9418 > > |> iter_collect'' 00:12:36 verbose #9419 > > |> am'.vec_map sm'.from_std_string 00:12:36 verbose #9420 > > |> am'.from_vec 00:12:36 verbose #9421 > > |> fun x => x : _ i32 _ 00:12:36 verbose #9422 > > |> seq.of_array 00:12:36 verbose #9423 > > |> sm'.concat "\n" 00:12:36 verbose #9424 > > |> optionm'.default_value' ( 00:12:36 verbose #9425 > > std_trace 00:12:36 verbose #9426 > > |> optionm.map sm'.from_std_string 00:12:36 verbose #9427 > > |> optionm'.default_value "" 00:12:36 verbose #9428 > > ) 00:12:36 verbose #9429 > > trace Verbose 00:12:36 verbose #9430 > > fun () => $'$"runtime.execute_with_options 00:12:36 verbose #9431 > > result"' 00:12:36 verbose #9432 > > fun () => { exit_code std_trace_length = 00:12:36 verbose #9433 > > std_trace |> sm'.length : i32 } 00:12:36 verbose #9434 > > new_pair exit_code std_trace 00:12:36 verbose #9435 > > |> capture 00:12:36 verbose #9436 > > // |> async.new_future_move 00:12:36 verbose #9437 > > // |> async.block_on 00:12:36 verbose #9438 > > |> fun x => x () 00:12:36 verbose #9439 > > |> from_pair 00:12:36 verbose #9440 > > | _ => fun () => null () 00:12:36 verbose #9441 > > 00:12:36 verbose #9442 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:36 verbose #9443 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:36 verbose #9444 > > │ #### execute │ 00:12:36 verbose #9445 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:36 verbose #9446 > > 00:12:36 verbose #9447 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:36 verbose #9448 > > inl execute command = 00:12:36 verbose #9449 > > execution_options fun x => { x with 00:12:36 verbose #9450 > > command = command 00:12:36 verbose #9451 > > } 00:12:36 verbose #9452 > > |> execute_with_options 00:12:37 verbose #9453 > > 00:12:37 verbose #9454 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:12:37 verbose #9455 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:12:37 verbose #9456 > > │ #### tests │ 00:12:37 verbose #9457 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:12:37 verbose #9458 > > 00:12:37 verbose #9459 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:12:37 verbose #9460 > > //// test 00:12:37 verbose #9461 > > ///! rust -d chrono encoding_rs encoding_rs_io regex sha2 00:12:37 verbose #9462 > > 00:12:37 verbose #9463 > > inl content = "╭─[[ 你好,世界!こんにちは世界! ]]─╮" 00:12:37 verbose #9464 > > 00:12:37 verbose #9465 > > inl file_name = join "test.txt" 00:12:37 verbose #9466 > > inl temp_dir, disposable = 00:12:37 verbose #9467 > > (file_name, content) 00:12:37 verbose #9468 > > |> sm'.format_debug 00:12:37 verbose #9469 > > |> crypto.hash_text 00:12:37 verbose #9470 > > |> file_system.create_temp_dir' 00:12:37 verbose #9471 > > inl path = temp_dir </> file_name |> file_system.normalize_path 00:12:37 verbose #9472 > > inl exit_code, result = 00:12:37 verbose #9473 > > execute $'\@$"pwsh -c ""[[IO.File]]::ReadAllText(\'{!path}\')"""' 00:12:37 verbose #9474 > > exit_code |> _assert_eq 1 00:12:37 verbose #9475 > > result |> _assert sm'.contains "not find file" 00:12:37 verbose #9476 > > 00:12:37 verbose #9477 > > content |> file_system.write_all_text path 00:12:37 verbose #9478 > > 00:12:37 verbose #9479 > > execution_options fun x => { x with 00:12:37 verbose #9480 > > command = $'\@$"cat ""{!file_name}"""' 00:12:37 verbose #9481 > > working_directory = Some temp_dir |> optionm'.box 00:12:37 verbose #9482 > > } 00:12:37 verbose #9483 > > |> execute_with_options 00:12:37 verbose #9484 > > |> ignore 00:12:37 verbose #9485 > > 00:12:37 verbose #9486 > > inl exit_code, output = 00:12:37 verbose #9487 > > execution_options fun x => { x with 00:12:37 verbose #9488 > > command = $'\@$"pwsh -c ""[[System.Console]]::OutputEncoding = 00:12:37 verbose #9489 > > [[System.Text.Encoding]]::UTF8; [[IO.File]]::ReadAllText(\'{!file_name}\')"""' 00:12:37 verbose #9490 > > working_directory = Some temp_dir |> optionm'.box 00:12:37 verbose #9491 > > } 00:12:37 verbose #9492 > > |> execute_with_options 00:12:37 verbose #9493 > > 00:12:37 verbose #9494 > > exit_code |> _assert_eq 0i32 00:12:37 verbose #9495 > > output |> _assert_eq content 00:12:37 verbose #9496 > > 00:12:37 verbose #9497 > > disposable |> use |> ignore 00:13:09 verbose #9498 > > 00:13:09 verbose #9499 > > ╭─[ 32.04s - return value ]────────────────────────────────────────────────────╮ 00:13:09 verbose #9500 > > │ 00:00:00 verbose #1 file_system.create_dir / { dir = │ 00:13:09 verbose #9501 > > │ C:\Users\i574n\AppData\Local\Temp\!create_temp_path_\spiral_builder_dcf48429 │ 00:13:09 verbose #9502 > > │ 8d6fe8ffc72241bac43256e033365ab56eeb90a879f2d71a91105586\9242780b-ce0e-9155- │ 00:13:09 verbose #9503 > > │ 5e07-f6ee5667aa16 } │ 00:13:09 verbose #9504 > > │ 00:00:00 debug #2 runtime.execute_with_options / { file_name = pwsh; │ 00:13:09 verbose #9505 > > │ arguments = [ │ 00:13:09 verbose #9506 > > │ "-c", │ 00:13:09 verbose #9507 > > │ "[ │ 00:13:09 verbose #9508 > > │ IO.File]::ReadAllText('c:/Users/i574n/AppData/Local/Temp/!create_temp_path_/ │ 00:13:09 verbose #9509 > > │ spiral_builder_dcf484298d6fe8ffc72241bac43256e033365ab56eeb90a879f2d71a91105 │ 00:13:09 verbose #9510 > > │ 586/9242780b-ce0e-9155-5e07-f6ee5667aa16/test.txt')", │ 00:13:09 verbose #9511 > > │ ]; options = { command = pwsh -c "[ │ 00:13:09 verbose #9512 > > │ IO.File]::ReadAllText('c:/Users/i574n/AppData/Local/Temp/!create_temp_path_/ │ 00:13:09 verbose #9513 > > │ spiral_builder_dcf484298d6fe8ffc72241bac43256e033365ab56eeb90a879f2d71a91105 │ 00:13:09 verbose #9514 > > │ 586/9242780b-ce0e-9155-5e07-f6ee5667aa16/test.txt')"; cancellation_token = │ 00:13:09 verbose #9515 > > │ None; environment_variables = Array(MutCell([])); on_line = None; stdin = │ 00:13:09 verbose #9516 > > │ None; trace = true; working_directory = None } } │ 00:13:09 verbose #9517 > > │ 00:00:00 verbose #3 ! MethodInvocationException: Exception │ 00:13:09 verbose #9518 > > │ calling "ReadAllText" with "1" argument(s): "Could not find file │ 00:13:09 verbose #9519 > > │ 'c:\Users\i574n\AppData\Local\Temp\!create_temp_path_\spiral_builder_dcf4842 │ 00:13:09 verbose #9520 > > │ 98d6fe8ffc72241bac43256e033365ab56eeb90a879f2d71a91105586\9242780b-ce0e-9155 │ 00:13:09 verbose #9521 > > │ -5e07-f6ee5667aa16\test.txt'." │ 00:13:09 verbose #9522 > > │ 00:00:00 verbose #4 runtime.execute_with_options / result / { │ 00:13:09 verbose #9523 > > │ exit_code = 1; std_trace_length = 312 } │ 00:13:09 verbose #9524 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:13:09 verbose #9525 > > │ __assert / actual: "not find file" / expected: "[ │ 00:13:09 verbose #9526 > > │ 31;1mMethodInvocation...t.txt", │ 00:13:09 verbose #9527 > > │ ]; options = { command = cat "test.txt"; cancellation_token = None; │ 00:13:09 verbose #9528 > > │ environment_variables = Array(MutCell([])); on_line = None; stdin = None; │ 00:13:09 verbose #9529 > > │ trace = true; working_directory = Some( │ 00:13:09 verbose #9530 > > │ │ 00:13:09 verbose #9531 > > │ "C:\Users\i574n\AppData\Local\Temp\!create_temp_path_\spiral_builder_dcf4842 │ 00:13:09 verbose #9532 > > │ 98d6fe8ffc72241bac43256e033365ab56eeb90a879f2d71a91105586\9242780b-ce0e-9155 │ 00:13:09 verbose #9533 > > │ -5e07-f6ee5667aa16", │ 00:13:09 verbose #9534 > > │ ) } } │ 00:13:09 verbose #9535 > > │ 00:00:00 verbose #6 > ╭─[ 你好,世界!こんにちは世界! ]─╮ │ 00:13:09 verbose #9536 > > │ 00:00:00 verbose #7 runtime.execute_with_options / result / { │ 00:13:09 verbose #9537 > > │ exit_code = 0; std_trace_length = 22 } │ 00:13:09 verbose #9538 > > │ 00:00:00 debug #8 runtime.execute_with_options / { file_name = pwsh; │ 00:13:09 verbose #9539 > > │ arguments = [ │ 00:13:09 verbose #9540 > > │ "-c", │ 00:13:09 verbose #9541 > > │ "[System.Console]::OutputEncoding = [System.Text.Encoding]::UTF8; [ │ 00:13:09 verbose #9542 > > │ IO.File]::ReadAllText('test.txt')", │ 00:13:09 verbose #9543 > > │ ]; options = { command = pwsh -c "[System.Console]::OutputEncoding = [ │ 00:13:09 verbose #9544 > > │ System.Text.Encoding]::UTF8; [IO.File]::ReadAllText('test.txt')"; │ 00:13:09 verbose #9545 > > │ cancellation_token = None; environment_variables = Array(MutCell([])); │ 00:13:09 verbose #9546 > > │ on_line = None; stdin = None; trace = true; working_directory = Some( │ 00:13:09 verbose #9547 > > │ │ 00:13:09 verbose #9548 > > │ "C:\Users\i574n\AppData\Local\Temp\!create_temp_path_\spiral_builder_dcf4842 │ 00:13:09 verbose #9549 > > │ 98d6fe8ffc72241bac43256e033365ab56eeb90a879f2d71a91105586\9242780b-ce0e-9155 │ 00:13:09 verbose #9550 > > │ -5e07-f6ee5667aa16", │ 00:13:09 verbose #9551 > > │ ) } } │ 00:13:09 verbose #9552 > > │ 00:00:00 verbose #9 > ╭─[ 你好,世界!こんにちは世界! ]─╮ │ 00:13:09 verbose #9553 > > │ 00:00:01 verbose #10 runtime.execute_with_options / result / { │ 00:13:09 verbose #9554 > > │ exit_code = 0; std_trace_length = 22 } │ 00:13:09 verbose #9555 > > │ __assert_eq / actual: 0 / expected: 0 │ 00:13:09 verbose #9556 > > │ __assert_eq / actual: "╭─[ 你好,世界!こんにちは世界! ]─╮" / expected: "╭─ │ 00:13:09 verbose #9557 > > │ [ 你好,世界!こんにちは世界! ]─╮" │ 00:13:09 verbose #9558 > > │ │ 00:13:09 verbose #9559 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:13:09 verbose #9560 > > 00:13:09 verbose #9561 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:13:09 verbose #9562 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:13:09 verbose #9563 > > │ ### execute_retry │ 00:13:09 verbose #9564 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:13:09 verbose #9565 > > 00:13:09 verbose #9566 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:13:09 verbose #9567 > > let execute_retry retries options = 00:13:09 verbose #9568 > > fun () => 00:13:09 verbose #9569 > > inl exit_code, result = options |> execute_with_options 00:13:09 verbose #9570 > > if exit_code = 0 00:13:09 verbose #9571 > > then Ok (exit_code, result) 00:13:09 verbose #9572 > > else Error (exit_code, result) 00:13:09 verbose #9573 > > |> retry_fn' retries 00:13:09 verbose #9574 > > 00:13:09 verbose #9575 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:13:09 verbose #9576 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:13:09 verbose #9577 > > │ ## main │ 00:13:09 verbose #9578 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:13:09 verbose #9579 > > 00:13:09 verbose #9580 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:13:09 verbose #9581 > > inl main () = 00:13:09 verbose #9582 > > init_trace_state None 00:13:09 verbose #9583 > > $'let current_process_kill () = !current_process_kill ()' : () 00:13:09 verbose #9584 > > $'let execute_async x = !execute_async x' : () 00:13:09 verbose #9585 > > $'let execute_with_options_async x = !execute_with_options_async x' : () 00:13:09 verbose #9586 > > inl execution_options fn = 00:13:09 verbose #9587 > > execution_options fun x => 00:13:09 verbose #9588 > > x 00:13:09 verbose #9589 > > |> heap 00:13:09 verbose #9590 > > |> fn 00:13:09 verbose #9591 > > |> fun x => !x 00:13:09 verbose #9592 > > $'let execution_options x = !execution_options x' : () 00:13:09 verbose #9593 > > inl split_args x = x |> split_args |> resultm.box 00:13:09 verbose #9594 > > $'let split_args x = !split_args x' : () 00:13:13 verbose #9595 > 00:03:34 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 122960 } 00:13:13 verbose #9596 > 00:03:34 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:13:13 verbose #9597 > "nbconvert", 00:13:13 verbose #9598 > "c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb", 00:13:13 verbose #9599 > "--to", 00:13:13 verbose #9600 > "html", 00:13:13 verbose #9601 > "--HTMLExporter.theme=dark", 00:13:13 verbose #9602 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:13:17 verbose #9603 > 00:03:37 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb to html 00:13:17 verbose #9604 > 00:03:37 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:13:17 verbose #9605 > 00:03:37 verbose #7 ! validate(nb) 00:13:21 verbose #9606 > 00:03:41 verbose #8 ! [NbConvertApp] Writing 581379 bytes to c:\home\git\polyglot\lib\spiral\runtime.dib.html 00:13:21 verbose #9607 > 00:03:41 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 645 } 00:13:21 verbose #9608 > 00:03:41 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 645 } 00:13:21 verbose #9609 > 00:03:41 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:13:21 verbose #9610 > "-c", 00:13:21 verbose #9611 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/runtime.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:13:21 verbose #9612 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/runtime.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:13:22 verbose #9613 > 00:03:42 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:13:22 verbose #9614 > 00:03:42 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:13:22 verbose #9615 > 00:03:42 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 123664 } 00:13:22 debug #9616 runtime.execute_with_options_async / { exit_code = 0; output_length = 130995 } 00:13:22 debug #10 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path runtime.dib --retries 3 00:13:22 debug #9617 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path trace.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:13:22 verbose #9618 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "trace.dib", "--retries", "3"])) } 00:13:22 verbose #9619 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:13:22 verbose #9620 > "repl", 00:13:22 verbose #9621 > "--exit-after-run", 00:13:22 verbose #9622 > "--run", 00:13:22 verbose #9623 > "c:/home/git/polyglot/lib/spiral/trace.dib", 00:13:22 verbose #9624 > "--output-path", 00:13:22 verbose #9625 > "c:/home/git/polyglot/lib/spiral/trace.dib.ipynb", 00:13:22 verbose #9626 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/trace.dib" --output-path "c:/home/git/polyglot/lib/spiral/trace.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:13:25 verbose #9627 > > 00:13:25 verbose #9628 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:13:25 verbose #9629 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:13:25 verbose #9630 > > │ # trace │ 00:13:25 verbose #9631 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:13:29 verbose #9632 > > 00:13:29 verbose #9633 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:13:29 verbose #9634 > > //// test 00:13:29 verbose #9635 > > 00:13:29 verbose #9636 > > open testing 00:13:31 verbose #9637 > > 00:13:31 verbose #9638 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:13:31 verbose #9639 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:13:31 verbose #9640 > > │ ## trace │ 00:13:31 verbose #9641 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:13:31 verbose #9642 > > 00:13:31 verbose #9643 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:13:31 verbose #9644 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:13:31 verbose #9645 > > │ ### trace_level │ 00:13:31 verbose #9646 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:13:31 verbose #9647 > > 00:13:31 verbose #9648 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:13:31 verbose #9649 > > union trace_level = 00:13:31 verbose #9650 > > | Verbose 00:13:31 verbose #9651 > > | Debug 00:13:31 verbose #9652 > > | Info 00:13:31 verbose #9653 > > | Warning 00:13:31 verbose #9654 > > | Critical 00:13:31 verbose #9655 > > 00:13:31 verbose #9656 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:13:31 verbose #9657 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:13:31 verbose #9658 > > │ ### read_state │ 00:13:31 verbose #9659 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:13:31 verbose #9660 > > 00:13:31 verbose #9661 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:13:31 verbose #9662 > > inl read_state () = 00:13:31 verbose #9663 > > run_target function 00:13:31 verbose #9664 > > | Rust (Wasm) => fun () => 00:13:31 verbose #9665 > > { 00:13:31 verbose #9666 > > trace_level = None 00:13:31 verbose #9667 > > repl_start = None 00:13:31 verbose #9668 > > } 00:13:31 verbose #9669 > > | Rust (Contract) => fun () => 00:13:31 verbose #9670 > > { 00:13:31 verbose #9671 > > trace_level = None 00:13:31 verbose #9672 > > repl_start = 00:13:31 verbose #9673 > > open rust.rust_operators 00:13:31 verbose #9674 > > inl automation = env.get_environment_variable_comptime 00:13:31 verbose #9675 > > "AUTOMATION" 00:13:31 verbose #9676 > > if automation <>. "True" 00:13:31 verbose #9677 > > then None 00:13:31 verbose #9678 > > else 00:13:31 verbose #9679 > > inl timestamp : u64 = 00:13:31 verbose #9680 > > !\($'$"near_sdk::env::block_timestamp()"') 00:13:31 verbose #9681 > > timestamp |> i64 |> Some 00:13:31 verbose #9682 > > } 00:13:31 verbose #9683 > > | _ => fun () => 00:13:31 verbose #9684 > > { 00:13:31 verbose #9685 > > trace_level = 00:13:31 verbose #9686 > > (join "TRACE_LEVEL") 00:13:31 verbose #9687 > > |> env.get_environment_variable 00:13:31 verbose #9688 > > |> reflection.union_try_pick 00:13:31 verbose #9689 > > repl_start = 00:13:31 verbose #9690 > > inl automation = env.get_environment_variable (join 00:13:31 verbose #9691 > > "AUTOMATION") 00:13:31 verbose #9692 > > if automation = "True" 00:13:31 verbose #9693 > > then date_time.now () |> date_time.ticks |> fun 00:13:31 verbose #9694 > > (date_time.timestamp x) => x |> Some 00:13:31 verbose #9695 > > else None 00:13:31 verbose #9696 > > } 00:13:31 verbose #9697 > > 00:13:31 verbose #9698 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:13:31 verbose #9699 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:13:31 verbose #9700 > > │ ### trace_state │ 00:13:31 verbose #9701 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:13:31 verbose #9702 > > 00:13:31 verbose #9703 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:13:31 verbose #9704 > > type trace_state = 00:13:31 verbose #9705 > > { 00:13:31 verbose #9706 > > count : mut i64 00:13:31 verbose #9707 > > trace_file : mut (string -> ()) 00:13:31 verbose #9708 > > enabled : mut bool 00:13:31 verbose #9709 > > acc : mut string 00:13:31 verbose #9710 > > level : mut trace_level 00:13:31 verbose #9711 > > repl_start : optionm'.option' i64 00:13:31 verbose #9712 > > } 00:13:32 verbose #9713 > > 00:13:32 verbose #9714 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:13:32 verbose #9715 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:13:32 verbose #9716 > > │ ### new_trace_state │ 00:13:32 verbose #9717 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:13:32 verbose #9718 > > 00:13:32 verbose #9719 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:13:32 verbose #9720 > > let new_trace_state trace_level' = 00:13:32 verbose #9721 > > inl { repl_start trace_level } = read_state () 00:13:32 verbose #9722 > > { 00:13:32 verbose #9723 > > count = mut 1i64 00:13:32 verbose #9724 > > trace_file = mut ignore 00:13:32 verbose #9725 > > enabled = mut true 00:13:32 verbose #9726 > > acc = mut "" 00:13:32 verbose #9727 > > level = trace_level |> optionm'.default_value trace_level' |> mut 00:13:32 verbose #9728 > > repl_start = repl_start |> optionm'.box 00:13:32 verbose #9729 > > } : trace_state 00:13:32 verbose #9730 > > 00:13:32 verbose #9731 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:13:32 verbose #9732 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:13:32 verbose #9733 > > │ ### init_trace_state │ 00:13:32 verbose #9734 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:13:32 verbose #9735 > > 00:13:32 verbose #9736 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:13:32 verbose #9737 > > inl init_trace_state trace_level : () = 00:13:32 verbose #9738 > > inl trace_level = trace_level |> optionm'.default_value Verbose 00:13:32 verbose #9739 > > backend_switch { 00:13:32 verbose #9740 > > Fsharp = fun () => 00:13:32 verbose #9741 > > backend_switch { 00:13:32 verbose #9742 > > Fsharp = fun () => 00:13:32 verbose #9743 > > global "module TraceState = let mutable trace_state = None" 00:13:32 verbose #9744 > > } 00:13:32 verbose #9745 > > fun () => 00:13:32 verbose #9746 > > if $'TraceState.trace_state.IsNone' then 00:13:32 verbose #9747 > > inl trace_state = new_trace_state trace_level |> 00:13:32 verbose #9748 > > optionm'.some' 00:13:32 verbose #9749 > > $'TraceState.trace_state <- !trace_state ' : () 00:13:32 verbose #9750 > > |> exec_unit 00:13:32 verbose #9751 > > Python = fun () => 00:13:32 verbose #9752 > > global "class TraceState: trace_state = None" 00:13:32 verbose #9753 > > $'if TraceState.trace_state is None: TraceState.trace_state = 00:13:32 verbose #9754 > > !new_trace_state(!trace_level)' : () 00:13:32 verbose #9755 > > } 00:13:33 verbose #9756 > > 00:13:33 verbose #9757 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:13:33 verbose #9758 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:13:33 verbose #9759 > > │ ### get_trace_state_or_init │ 00:13:33 verbose #9760 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:13:33 verbose #9761 > > 00:13:33 verbose #9762 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:13:33 verbose #9763 > > inl get_trace_state_or_init trace_level : trace_state = 00:13:33 verbose #9764 > > init_trace_state trace_level 00:13:33 verbose #9765 > > // $'match State.trace_state with Some x -> x | None -> failwith 00:13:33 verbose #9766 > > "trace.get_trace_state_or_init / State.trace_state=None"' 00:13:33 verbose #9767 > > backend_switch { 00:13:33 verbose #9768 > > Fsharp = fun () => 00:13:33 verbose #9769 > > $'TraceState.trace_state.Value' : trace_state 00:13:33 verbose #9770 > > Python = fun () => 00:13:33 verbose #9771 > > $'TraceState.trace_state' : trace_state 00:13:33 verbose #9772 > > } 00:13:33 verbose #9773 > > 00:13:33 verbose #9774 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:13:33 verbose #9775 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:13:33 verbose #9776 > > │ ### test_trace_level │ 00:13:33 verbose #9777 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:13:33 verbose #9778 > > 00:13:33 verbose #9779 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:13:33 verbose #9780 > > inl test_trace_level level : bool = 00:13:33 verbose #9781 > > inl state = get_trace_state_or_init None 00:13:33 verbose #9782 > > inl level' = *state.level 00:13:33 verbose #9783 > > if *state.enabled |> not 00:13:33 verbose #9784 > > then false 00:13:33 verbose #9785 > > else 00:13:33 verbose #9786 > > inl level : i32 = real real_core.union_tag level 00:13:33 verbose #9787 > > inl level' : i32 = real real_core.union_tag level' 00:13:33 verbose #9788 > > level >= level' 00:13:34 verbose #9789 > > 00:13:34 verbose #9790 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:13:34 verbose #9791 > > //// test 00:13:34 verbose #9792 > > ///! fsharp 00:13:34 verbose #9793 > > ///! cuda 00:13:34 verbose #9794 > > ///! rust 00:13:34 verbose #9795 > > ///! typescript 00:13:34 verbose #9796 > > ///! python 00:13:34 verbose #9797 > > 00:13:34 verbose #9798 > > test_trace_level Critical |> _assert_eq true 00:13:34 verbose #9799 > > test_trace_level Verbose |> _assert_eq true 00:13:34 verbose #9800 > > 00:13:34 verbose #9801 > > inl level = get_trace_state_or_init None .level 00:13:34 verbose #9802 > > level <- Debug 00:13:34 verbose #9803 > > test_trace_level Verbose |> _assert_eq false 00:13:34 verbose #9804 > > level <- Verbose 00:13:34 verbose #9805 > > test_trace_level Verbose |> _assert_eq true 00:15:02 verbose #9806 > > 00:15:02 verbose #9807 > > ╭─[ 1.46m - return value ]─────────────────────────────────────────────────────╮ 00:15:02 verbose #9808 > > │ │ 00:15:02 verbose #9809 > > │ .py output (Cuda): │ 00:15:02 verbose #9810 > > │ __assert_eq / actual: True / expected: True │ 00:15:02 verbose #9811 > > │ __assert_eq / actual: True / expected: True │ 00:15:02 verbose #9812 > > │ __assert_eq / actual: False / expected: False │ 00:15:02 verbose #9813 > > │ __assert_eq / actual: True / expected: True │ 00:15:02 verbose #9814 > > │ │ 00:15:02 verbose #9815 > > │ │ 00:15:02 verbose #9816 > > │ .rs output: │ 00:15:02 verbose #9817 > > │ __assert_eq / actual: true / expected: true │ 00:15:02 verbose #9818 > > │ __assert_eq / actual: true / expected: true │ 00:15:02 verbose #9819 > > │ __assert_eq / actual: false / expected: false │ 00:15:02 verbose #9820 > > │ __assert_eq / actual: true / expected: true │ 00:15:02 verbose #9821 > > │ │ 00:15:02 verbose #9822 > > │ │ 00:15:02 verbose #9823 > > │ .ts output: │ 00:15:02 verbose #9824 > > │ __assert_eq / actual: true / expected: true │ 00:15:02 verbose #9825 > > │ __assert_eq / actual: true / expected: true │ 00:15:02 verbose #9826 > > │ __assert_eq / actual: false / expected: false │ 00:15:02 verbose #9827 > > │ __assert_eq / actual: true / expected: true │ 00:15:02 verbose #9828 > > │ │ 00:15:02 verbose #9829 > > │ │ 00:15:02 verbose #9830 > > │ .py output: │ 00:15:02 verbose #9831 > > │ __assert_eq / actual: true / expected: true │ 00:15:02 verbose #9832 > > │ __assert_eq / actual: true / expected: true │ 00:15:02 verbose #9833 > > │ __assert_eq / actual: false / expected: false │ 00:15:02 verbose #9834 > > │ __assert_eq / actual: true / expected: true │ 00:15:02 verbose #9835 > > │ │ 00:15:02 verbose #9836 > > │ │ 00:15:02 verbose #9837 > > │ │ 00:15:02 verbose #9838 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:15:02 verbose #9839 > > 00:15:02 verbose #9840 > > ╭─[ 1.46m - stdout ]───────────────────────────────────────────────────────────╮ 00:15:02 verbose #9841 > > │ .fsx output: │ 00:15:02 verbose #9842 > > │ __assert_eq / actual: true / expected: true │ 00:15:02 verbose #9843 > > │ __assert_eq / actual: true / expected: true │ 00:15:02 verbose #9844 > > │ __assert_eq / actual: false / expected: false │ 00:15:02 verbose #9845 > > │ __assert_eq / actual: true / expected: true │ 00:15:02 verbose #9846 > > │ │ 00:15:02 verbose #9847 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:15:02 verbose #9848 > > 00:15:02 verbose #9849 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:15:02 verbose #9850 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:15:02 verbose #9851 > > │ ### trace_raw │ 00:15:02 verbose #9852 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:15:02 verbose #9853 > > 00:15:02 verbose #9854 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:15:02 verbose #9855 > > inl trace_raw level fn = 00:15:02 verbose #9856 > > fun () => 00:15:02 verbose #9857 > > if level |> test_trace_level then 00:15:02 verbose #9858 > > inl text = fn () 00:15:02 verbose #9859 > > inl ({ count acc } & trace_state) = get_trace_state_or_init None 00:15:02 verbose #9860 > > join 00:15:02 verbose #9861 > > fun () => 00:15:02 verbose #9862 > > count <- *count + 1 00:15:02 verbose #9863 > > |> exec_unit 00:15:02 verbose #9864 > > open rust 00:15:02 verbose #9865 > > open rust.rust_operators 00:15:02 verbose #9866 > > run_target_args (fun () => text, console.write_line) function 00:15:02 verbose #9867 > > | Rust (Contract) => fun text, _ => 00:15:02 verbose #9868 > > inl new_acc = 00:15:02 verbose #9869 > > if *acc = "" 00:15:02 verbose #9870 > > then text 00:15:02 verbose #9871 > > elif text = "" 00:15:02 verbose #9872 > > then *acc 00:15:02 verbose #9873 > > else *acc +. "\n" +. text 00:15:02 verbose #9874 > > 00:15:02 verbose #9875 > > inl chunks = 00:15:02 verbose #9876 > > new_acc 00:15:02 verbose #9877 > > |> sm'.as_str 00:15:02 verbose #9878 > > |> sm'.chars 00:15:02 verbose #9879 > > |> rust.from_mut 00:15:02 verbose #9880 > > |> iter_collect 00:15:02 verbose #9881 > > |> am'.vec_chunks 15000 00:15:02 verbose #9882 > > |> am'.vec_map fun x => 00:15:02 verbose #9883 > > x |> sm'.from_iter 00:15:02 verbose #9884 > > 00:15:02 verbose #9885 > > inl chunks_len = chunks |> am'.vec_len |> i32 00:15:02 verbose #9886 > > 00:15:02 verbose #9887 > > if text <>. "" && chunks_len <= 1 00:15:02 verbose #9888 > > then acc <- new_acc 00:15:02 verbose #9889 > > else 00:15:02 verbose #9890 > > acc <- "" 00:15:02 verbose #9891 > > chunks 00:15:02 verbose #9892 > > |> am'.vec_for_each''' near.log 00:15:02 verbose #9893 > > | Rust _ => fun text, _ => 00:15:02 verbose #9894 > > !\\(text, $'\@"println\!(""{}"", $0)"') 00:15:02 verbose #9895 > > | _ => fun text, write_line => 00:15:02 verbose #9896 > > text |> write_line 00:15:02 verbose #9897 > > text |> *trace_state.trace_file 00:15:02 verbose #9898 > > |> exec_unit 00:15:02 verbose #9899 > > 00:15:02 verbose #9900 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:15:02 verbose #9901 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:15:02 verbose #9902 > > │ ### trace │ 00:15:02 verbose #9903 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:15:02 verbose #9904 > > 00:15:02 verbose #9905 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:15:02 verbose #9906 > > inl trace (level : trace_level) (text_fn : () -> string) (locals : () -> _) = 00:15:02 verbose #9907 > > fun () => 00:15:02 verbose #9908 > > inl trace_state = get_trace_state_or_init None 00:15:02 verbose #9909 > > inl time = 00:15:02 verbose #9910 > > join 00:15:02 verbose #9911 > > run_target fun target => 00:15:02 verbose #9912 > > match target with 00:15:02 verbose #9913 > > | Rust (Contract) => fun () => 00:15:02 verbose #9914 > > open rust.rust_operators 00:15:02 verbose #9915 > > open rust 00:15:02 verbose #9916 > > inl timestamp : u64 = 00:15:02 verbose #9917 > > !\($'$"near_sdk::env::block_timestamp()"') 00:15:02 verbose #9918 > > inl timestamp = 00:15:02 verbose #9919 > > match trace_state.repl_start |> optionm'.unbox with 00:15:02 verbose #9920 > > | Some repl_start => timestamp - u64 repl_start 00:15:02 verbose #9921 > > | None => timestamp 00:15:02 verbose #9922 > > inl timestamp_s = timestamp / 1_000_000_000 00:15:02 verbose #9923 > > inl s = timestamp_s % 60 00:15:02 verbose #9924 > > inl m = (timestamp_s / 60) % 60 00:15:02 verbose #9925 > > inl h = (timestamp_s / 3600) % 24 00:15:02 verbose #9926 > > inl str : sm'.std_string = 00:15:02 verbose #9927 > > !\\((h, m, s), 00:15:02 verbose #9928 > > $'$"format\!(\\\"{{:02}}:{{:02}}:{{:02}}\\\", $0, $1, $2)"') 00:15:02 verbose #9929 > > str |> sm'.from_std_string 00:15:02 verbose #9930 > > | _ => fun () => 00:15:02 verbose #9931 > > match trace_state.repl_start |> optionm'.unbox with 00:15:02 verbose #9932 > > | Some repl_start => 00:15:02 verbose #9933 > > inl t = 00:15:02 verbose #9934 > > (date_time.now () |> date_time.ticks |> fun 00:15:02 verbose #9935 > > (date_time.timestamp x) => x) 00:15:02 verbose #9936 > > - repl_start |> date_time.time_span 00:15:02 verbose #9937 > > date_time.date_time_milliseconds 00:15:02 verbose #9938 > > 1i32 1i32 1i32 00:15:02 verbose #9939 > > (t |> date_time.hours) 00:15:02 verbose #9940 > > (t |> date_time.minutes) 00:15:02 verbose #9941 > > (t |> date_time.seconds) 00:15:02 verbose #9942 > > (t |> date_time.milliseconds) 00:15:02 verbose #9943 > > | None => date_time.now () 00:15:02 verbose #9944 > > |> date_time.format ( 00:15:02 verbose #9945 > > backend_switch { 00:15:02 verbose #9946 > > Fsharp = fun () => 00:15:02 verbose #9947 > > match target with 00:15:02 verbose #9948 > > | Rust _ => join "hh:mm:ss" 00:15:02 verbose #9949 > > | _ => join "HH:mm:ss" 00:15:02 verbose #9950 > > Python = fun () => "%H:%M:%S" 00:15:02 verbose #9951 > > } 00:15:02 verbose #9952 > > ) 00:15:02 verbose #9953 > > inl level_str = 00:15:02 verbose #9954 > > join 00:15:02 verbose #9955 > > inl level_str = level |> reflection.union_to_string |> 00:15:02 verbose #9956 > > sm'.to_lower |> sm'.pad_left 7 ' ' 00:15:02 verbose #9957 > > run_target function 00:15:02 verbose #9958 > > | Rust _ => fun () => 00:15:02 verbose #9959 > > open rust 00:15:02 verbose #9960 > > open rust.rust_operators 00:15:02 verbose #9961 > > inl color : rust.ref sm'.str = 00:15:02 verbose #9962 > > match level with 00:15:02 verbose #9963 > > | Verbose => 00:15:02 verbose #9964 > > !\($'"inline_colorization::color_bright_black"') 00:15:02 verbose #9965 > > | Debug => 00:15:02 verbose #9966 > > !\($'"inline_colorization::color_bright_blue"') 00:15:02 verbose #9967 > > | Info => 00:15:02 verbose #9968 > > !\($'"inline_colorization::color_bright_green"') 00:15:02 verbose #9969 > > | Warning => !\($'"inline_colorization::color_yellow"') 00:15:02 verbose #9970 > > | Critical => 00:15:02 verbose #9971 > > !\($'"inline_colorization::color_bright_red"') 00:15:02 verbose #9972 > > inl level_str = level_str |> sm'.as_str 00:15:02 verbose #9973 > > inl color_reset : rust.ref sm'.str = 00:15:02 verbose #9974 > > !\($'"inline_colorization::color_reset"') 00:15:02 verbose #9975 > > !\\((color, level_str, color_reset), 00:15:02 verbose #9976 > > $'$"format\!(\\\"{{}}{{}}{{}}\\\", $0, $1, $2)"') 00:15:02 verbose #9977 > > |> sm'.from_std_string 00:15:02 verbose #9978 > > | _ => fun () => 00:15:02 verbose #9979 > > inl color = 00:15:02 verbose #9980 > > match level with 00:15:02 verbose #9981 > > | Verbose => $'"\\u001b[[90m"' 00:15:02 verbose #9982 > > | Debug => $'"\\u001b[[94m"' 00:15:02 verbose #9983 > > | Info => $'"\\u001b[[92m"' 00:15:02 verbose #9984 > > | Warning => $'"\\u001b[[93m"' 00:15:02 verbose #9985 > > | Critical => $'"\\u001b[[91m"' 00:15:02 verbose #9986 > > inl color_reset = join $'"\\u001b[[0m"' 00:15:02 verbose #9987 > > color +. level_str +. color_reset 00:15:02 verbose #9988 > > inl text = text_fn () 00:15:02 verbose #9989 > > if text = "" 00:15:02 verbose #9990 > > then "" 00:15:02 verbose #9991 > > else 00:15:02 verbose #9992 > > inl count = *trace_state.count 00:15:02 verbose #9993 > > inl locals = locals () |> sm'.format 00:15:02 verbose #9994 > > join 00:15:02 verbose #9995 > > backend_switch { 00:15:02 verbose #9996 > > Fsharp = fun () => $'$"{!time} {!level_str} #{!count} 00:15:02 verbose #9997 > > %s{!text} / {!locals}"' : string 00:15:02 verbose #9998 > > Python = fun () => $'f"{!time} {!level_str} #{!count} 00:15:02 verbose #9999 > > {!text} / {!locals}"' : string 00:15:02 verbose #10000 > > } 00:15:02 verbose #10001 > > |> sm'.trim_start [[]] 00:15:02 verbose #10002 > > |> sm'.trim_end [[ ' '; '/' ]] 00:15:02 verbose #10003 > > |> trace_raw level 00:15:02 verbose #10004 > > 00:15:02 verbose #10005 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:15:02 verbose #10006 > > //// test 00:15:02 verbose #10007 > > ///! fsharp 00:15:02 verbose #10008 > > ///! cuda 00:15:02 verbose #10009 > > ///! rust 00:15:02 verbose #10010 > > ///! typescript 00:15:02 verbose #10011 > > ///! python 00:15:02 verbose #10012 > > 00:15:02 verbose #10013 > > trace Debug (fun () => "test1") id 00:15:02 verbose #10014 > > trace Debug (fun () => "test2") id 00:15:02 verbose #10015 > > get_trace_state_or_init None .count 00:15:02 verbose #10016 > > |> fun x => *x 00:15:02 verbose #10017 > > |> _assert_eq 3 00:15:27 verbose #10018 > > 00:15:27 verbose #10019 > > ╭─[ 24.32s - return value ]────────────────────────────────────────────────────╮ 00:15:27 verbose #10020 > > │ │ 00:15:27 verbose #10021 > > │ .py output (Cuda): │ 00:15:27 verbose #10022 > > │ 00:00:00 debug #1 test1 │ 00:15:27 verbose #10023 > > │ 00:00:00 debug #2 test2 │ 00:15:27 verbose #10024 > > │ __assert_eq / actual: 3 / expected: 3 │ 00:15:27 verbose #10025 > > │ │ 00:15:27 verbose #10026 > > │ │ 00:15:27 verbose #10027 > > │ .rs output: │ 00:15:27 verbose #10028 > > │ 00:00:00 debug #1 test1 │ 00:15:27 verbose #10029 > > │ 00:00:00 debug #2 test2 │ 00:15:27 verbose #10030 > > │ __assert_eq / actual: 3 / expected: 3 │ 00:15:27 verbose #10031 > > │ │ 00:15:27 verbose #10032 > > │ │ 00:15:27 verbose #10033 > > │ .ts output: │ 00:15:27 verbose #10034 > > │ 00:00:00 debug #1 test1 │ 00:15:27 verbose #10035 > > │ 00:00:00 debug #2 test2 │ 00:15:27 verbose #10036 > > │ __assert_eq / actual: 3 / expected: 3 │ 00:15:27 verbose #10037 > > │ │ 00:15:27 verbose #10038 > > │ │ 00:15:27 verbose #10039 > > │ .py output: │ 00:15:27 verbose #10040 > > │ 00:00:00 debug #1 test1 │ 00:15:27 verbose #10041 > > │ 00:00:00 debug #2 test2 │ 00:15:27 verbose #10042 > > │ __assert_eq / actual: 3 / expected: 3 │ 00:15:27 verbose #10043 > > │ │ 00:15:27 verbose #10044 > > │ │ 00:15:27 verbose #10045 > > │ │ 00:15:27 verbose #10046 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:15:27 verbose #10047 > > 00:15:27 verbose #10048 > > ╭─[ 24.32s - stdout ]──────────────────────────────────────────────────────────╮ 00:15:27 verbose #10049 > > │ .fsx output: │ 00:15:27 verbose #10050 > > │ 00:00:00 debug #1 test1 │ 00:15:27 verbose #10051 > > │ 00:00:00 debug #2 test2 │ 00:15:27 verbose #10052 > > │ __assert_eq / actual: 3L / expected: 3L │ 00:15:27 verbose #10053 > > │ │ 00:15:27 verbose #10054 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:15:27 verbose #10055 > > 00:15:27 verbose #10056 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:15:27 verbose #10057 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:15:27 verbose #10058 > > │ ## main │ 00:15:27 verbose #10059 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:15:27 verbose #10060 > > 00:15:27 verbose #10061 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:15:27 verbose #10062 > > inl main () = 00:15:27 verbose #10063 > > init_trace_state None 00:15:27 verbose #10064 > > inl trace level text_fn (locals : () -> string) = trace level text_fn locals 00:15:27 verbose #10065 > > $'let trace x = !trace x' : () 00:15:28 verbose #10066 > 00:02:05 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 21432 } 00:15:28 verbose #10067 > 00:02:05 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:15:28 verbose #10068 > "nbconvert", 00:15:28 verbose #10069 > "c:/home/git/polyglot/lib/spiral/trace.dib.ipynb", 00:15:28 verbose #10070 > "--to", 00:15:28 verbose #10071 > "html", 00:15:28 verbose #10072 > "--HTMLExporter.theme=dark", 00:15:28 verbose #10073 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/trace.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:15:30 verbose #10074 > 00:02:07 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/trace.dib.ipynb to html 00:15:30 verbose #10075 > 00:02:07 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:15:30 verbose #10076 > 00:02:07 verbose #7 ! validate(nb) 00:15:31 verbose #10077 > 00:02:09 verbose #8 ! [NbConvertApp] Writing 323773 bytes to c:\home\git\polyglot\lib\spiral\trace.dib.html 00:15:32 verbose #10078 > 00:02:09 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 641 } 00:15:32 verbose #10079 > 00:02:09 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 641 } 00:15:32 verbose #10080 > 00:02:09 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:15:32 verbose #10081 > "-c", 00:15:32 verbose #10082 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/trace.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:15:32 verbose #10083 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/trace.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:15:32 verbose #10084 > 00:02:10 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:15:32 verbose #10085 > 00:02:10 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:15:32 verbose #10086 > 00:02:10 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 22132 } 00:15:32 debug #10087 runtime.execute_with_options_async / { exit_code = 0; output_length = 25679 } 00:15:32 debug #11 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path trace.dib --retries 3 00:15:32 debug #10088 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path am'.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:15:32 verbose #10089 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "am'.dib", "--retries", "3"])) } 00:15:32 verbose #10090 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:15:32 verbose #10091 > "repl", 00:15:32 verbose #10092 > "--exit-after-run", 00:15:32 verbose #10093 > "--run", 00:15:32 verbose #10094 > "c:/home/git/polyglot/lib/spiral/am'.dib", 00:15:32 verbose #10095 > "--output-path", 00:15:32 verbose #10096 > "c:/home/git/polyglot/lib/spiral/am'.dib.ipynb", 00:15:32 verbose #10097 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/am'.dib" --output-path "c:/home/git/polyglot/lib/spiral/am'.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:15:34 verbose #10098 > > 00:15:34 verbose #10099 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:15:34 verbose #10100 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:15:34 verbose #10101 > > │ # am' │ 00:15:34 verbose #10102 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:15:38 verbose #10103 > > 00:15:38 verbose #10104 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:15:38 verbose #10105 > > //// test 00:15:38 verbose #10106 > > 00:15:38 verbose #10107 > > open testing 00:15:39 verbose #10108 > > 00:15:39 verbose #10109 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:15:39 verbose #10110 > > open rust 00:15:39 verbose #10111 > > open rust_operators 00:15:39 verbose #10112 > > 00:15:39 verbose #10113 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:15:39 verbose #10114 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:15:39 verbose #10115 > > │ ## am' │ 00:15:39 verbose #10116 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:15:39 verbose #10117 > > 00:15:39 verbose #10118 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:15:39 verbose #10119 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:15:39 verbose #10120 > > │ ### length │ 00:15:39 verbose #10121 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:15:39 verbose #10122 > > 00:15:39 verbose #10123 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:15:39 verbose #10124 > > inl length forall dim {int} el. (a : a dim el) : dim = 00:15:39 verbose #10125 > > a |> length 00:15:40 verbose #10126 > > 00:15:40 verbose #10127 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:15:40 verbose #10128 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:15:40 verbose #10129 > > │ ### index │ 00:15:40 verbose #10130 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:15:40 verbose #10131 > > 00:15:40 verbose #10132 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:15:40 verbose #10133 > > inl index forall dim {int} el. (i : dim) (a : a dim el) : el = 00:15:40 verbose #10134 > > backend_switch { 00:15:40 verbose #10135 > > Fsharp = fun () => index a i 00:15:40 verbose #10136 > > Python = fun () => $'!a[[!i]]' : el 00:15:40 verbose #10137 > > } 00:15:40 verbose #10138 > > 00:15:40 verbose #10139 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:15:40 verbose #10140 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:15:40 verbose #10141 > > │ ### index_base │ 00:15:40 verbose #10142 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:15:40 verbose #10143 > > 00:15:40 verbose #10144 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:15:40 verbose #10145 > > inl index_base forall el. (i : int) (ar : array_base el) : el = 00:15:40 verbose #10146 > > ar |> a |> index i 00:15:41 verbose #10147 > > 00:15:41 verbose #10148 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:15:41 verbose #10149 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:15:41 verbose #10150 > > │ ### base │ 00:15:41 verbose #10151 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:15:41 verbose #10152 > > 00:15:41 verbose #10153 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:15:41 verbose #10154 > > inl base forall dim {int} el. ((a a) : a dim el) : array_base el = 00:15:41 verbose #10155 > > a 00:15:41 verbose #10156 > > 00:15:41 verbose #10157 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:15:41 verbose #10158 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:15:41 verbose #10159 > > │ ### base' │ 00:15:41 verbose #10160 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:15:41 verbose #10161 > > 00:15:41 verbose #10162 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:15:41 verbose #10163 > > inl base' forall el. ((a a) : a int el) : array_base el = 00:15:41 verbose #10164 > > a 00:15:41 verbose #10165 > > 00:15:41 verbose #10166 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:15:41 verbose #10167 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:15:41 verbose #10168 > > │ ### generic_equable │ 00:15:41 verbose #10169 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:15:41 verbose #10170 > > 00:15:41 verbose #10171 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:15:41 verbose #10172 > > inl generic_equable x1 x2 = 00:15:41 verbose #10173 > > if length x1 <>.. length x2 00:15:41 verbose #10174 > > then false 00:15:41 verbose #10175 > > else 00:15:41 verbose #10176 > > let rec loop i = 00:15:41 verbose #10177 > > if i < length x1 00:15:41 verbose #10178 > > then index i x1 = index i x2 && loop (i + 1) 00:15:41 verbose #10179 > > else true 00:15:41 verbose #10180 > > loop 0 00:15:42 verbose #10181 > > 00:15:42 verbose #10182 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:15:42 verbose #10183 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:15:42 verbose #10184 > > │ ### equable │ 00:15:42 verbose #10185 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:15:42 verbose #10186 > > 00:15:42 verbose #10187 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:15:42 verbose #10188 > > instance equable a dim {number; int} t = generic_equable 00:15:42 verbose #10189 > > 00:15:42 verbose #10190 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:15:42 verbose #10191 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:15:42 verbose #10192 > > │ ### append │ 00:15:42 verbose #10193 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:15:42 verbose #10194 > > 00:15:42 verbose #10195 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:15:42 verbose #10196 > > instance append a dim {int; number} t = am.append 00:15:43 verbose #10197 > > 00:15:43 verbose #10198 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:15:43 verbose #10199 > > //// test 00:15:43 verbose #10200 > > ///! fsharp 00:15:43 verbose #10201 > > ///! cuda 00:15:43 verbose #10202 > > ///! rust 00:15:43 verbose #10203 > > ///! typescript 00:15:43 verbose #10204 > > ///! python 00:15:43 verbose #10205 > > 00:15:43 verbose #10206 > > a' ;[[ -1i64; 0 ]] ++ a' ;[[ 1; 2 ]] 00:15:43 verbose #10207 > > |> _assert_eq (a' ;[[ -1; 0; 1; 2 ]]) 00:16:04 verbose #10208 > > 00:16:04 verbose #10209 > > ╭─[ 20.83s - return value ]────────────────────────────────────────────────────╮ 00:16:04 verbose #10210 > > │ │ 00:16:04 verbose #10211 > > │ .py output (Cuda): │ 00:16:04 verbose #10212 > > │ Traceback (most recent call last): │ 00:16:04 verbose #10213 > > │ File │ 00:16:04 verbose #10214 > > │ "C:\home\git\polyglot\target\spiral_Eval\packages\68b9bb09c502ee0e564185d4d3 │ 00:16:04 verbose #10215 > > │ fcabb90047190021dd0f7720e2e9dc1b639e8e\main.py", line 159, in <module> │ 00:16:04 verbose #10216 > > │ if __name__ == '__main__': result = main(); None if result is None │ 00:16:04 verbose #10217 > > │ else print(result) │ 00:16:04 verbose #10218 > > │ ^^^^^^ │ 00:16:04 verbose #10219 > > │ File │ 00:16:04 verbose #10220 > > │ "C:\home\git\polyglot\target\spiral_Eval\packages\68b9bb09c502ee0e564185d4d3 │ 00:16:04 verbose #10221 > > │ fcabb90047190021dd0f7720e2e9dc1b639e8e\main.py", line 157, in main │ 00:16:04 verbose #10222 > > │ return method0() │ 00:16:04 verbose #10223 > > │ ^^^^^^^^^ │ 00:16:04 verbose #10224 > > │ File │ 00:16:04 verbose #10225 > > │ "C:\home\git\polyglot\target\spiral_Eval\packages\68b9bb09c502ee0e564185d4d3 │ 00:16:04 verbose #10226 > > │ fcabb90047190021dd0f7720e2e9dc1b639e8e\main.py", line 96, in method0 │ 00:16:04 verbose #10227 > > │ v0 = cp.array([-1, 0],dtype=cp.int64) │ 00:16:04 verbose #10228 > > │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ 00:16:04 verbose #10229 > > │ File │ 00:16:04 verbose #10230 > > │ "C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\cupy\_creation\f │ 00:16:04 verbose #10231 > > │ rom_data.py", line 53, in array │ 00:16:04 verbose #10232 > > │ return _core.array(obj, dtype, copy, order, subok, ndmin, blocking)[ │ 00:16:04 verbose #10233 > > │ 0m │ 00:16:04 verbose #10234 > > │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[ │ 00:16:04 verbose #10235 > > │ 0m │ 00:16:04 verbose #10236 > > │ File "cupy\_core\core.pyx", line 2379, in cupy._core.core.array │ 00:16:04 verbose #10237 > > │ File "cupy\_core\core.pyx", line 2406, in cupy._core.core.array │ 00:16:04 verbose #10238 > > │ File "cupy\_core\core.pyx", line 2548, in │ 00:16:04 verbose #10239 > > │ cupy._core.core._array_default │ 00:16:04 verbose #10240 > > │ File "cupy\_core\core.pyx", line 132, in │ 00:16:04 verbose #10241 > > │ cupy._core.core.ndarray.__new__ │ 00:16:04 verbose #10242 > > │ File "cupy\_core\core.pyx", line 220, in │ 00:16:04 verbose #10243 > > │ cupy._core.core._ndarray_base._init │ 00:16:04 verbose #10244 > > │ File "cupy\cuda\memory.pyx", line 738, in cupy.cuda.memory.alloc │ 00:16:04 verbose #10245 > > │ File "cupy\cuda\memory.pyx", line 1424, in │ 00:16:04 verbose #10246 > > │ cupy.cuda.memory.MemoryPool.malloc │ 00:16:04 verbose #10247 > > │ File "cupy\cuda\memory.pyx", line 1444, in │ 00:16:04 verbose #10248 > > │ cupy.cuda.memory.MemoryPool.malloc │ 00:16:04 verbose #10249 > > │ File "cupy\cuda\device.pyx", line 40, in cupy.cuda.device.get_device_id │ 00:16:04 verbose #10250 > > │ [0m │ 00:16:04 verbose #10251 > > │ File "cupy_backends\cuda\api\runtime.pyx", line 202, in │ 00:16:04 verbose #10252 > > │ cupy_backends.cuda.api.runtime.getDevice │ 00:16:04 verbose #10253 > > │ File "cupy_backends\cuda\api\runtime.pyx", line 146, in │ 00:16:04 verbose #10254 > > │ cupy_backends.cuda.api.runtime.check_status │ 00:16:04 verbose #10255 > > │ cupy_backends.cuda.api.runtime.CUDARuntimeError: │ 00:16:04 verbose #10256 > > │ cudaErrorInsufficientDriver: CUDA driver version is insufficient for CUDA │ 00:16:04 verbose #10257 > > │ runtime version │ 00:16:04 verbose #10258 > > │ │ 00:16:04 verbose #10259 > > │ .rs output: │ 00:16:04 verbose #10260 > > │ __assert_eq / actual: Array(MutCell([-1, 0, 1, 2])) / expected: │ 00:16:04 verbose #10261 > > │ Array(MutCell([-1, 0, 1, 2])) │ 00:16:04 verbose #10262 > > │ │ 00:16:04 verbose #10263 > > │ .ts output: │ 00:16:04 verbose #10264 > > │ __assert_eq / actual: -1,0,1,2 / expected: -1,0,1,2 │ 00:16:04 verbose #10265 > > │ │ 00:16:04 verbose #10266 > > │ .py output: │ 00:16:04 verbose #10267 > > │ __assert_eq / actual: [-1, 0, 1, 2] / expected: array('q', [-1, 0, 1, 2]) │ 00:16:04 verbose #10268 > > │ │ 00:16:04 verbose #10269 > > │ │ 00:16:04 verbose #10270 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:16:04 verbose #10271 > > 00:16:04 verbose #10272 > > ╭─[ 20.84s - stdout ]──────────────────────────────────────────────────────────╮ 00:16:04 verbose #10273 > > │ .fsx output: │ 00:16:04 verbose #10274 > > │ __assert_eq / actual: [|-1L; 0L; 1L; 2L|] / expected: [|-1L; 0L; 1L; 2L|] │ 00:16:04 verbose #10275 > > │ │ 00:16:04 verbose #10276 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:16:04 verbose #10277 > > 00:16:04 verbose #10278 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:16:04 verbose #10279 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:16:04 verbose #10280 > > │ ### map_base │ 00:16:04 verbose #10281 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:16:04 verbose #10282 > > 00:16:04 verbose #10283 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:16:04 verbose #10284 > > inl map_base forall t u. (fn : t -> u) (x : array_base t) : array_base u = 00:16:04 verbose #10285 > > a x 00:16:04 verbose #10286 > > |> am.map fn 00:16:04 verbose #10287 > > |> fun (a x : _ int _) => x 00:16:04 verbose #10288 > > 00:16:04 verbose #10289 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:16:04 verbose #10290 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:16:04 verbose #10291 > > │ ### collect │ 00:16:04 verbose #10292 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:16:04 verbose #10293 > > 00:16:04 verbose #10294 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:16:04 verbose #10295 > > inl collect forall t r. (fn : t -> a int r) (items : a int t) : a int r = 00:16:04 verbose #10296 > > items 00:16:04 verbose #10297 > > |> am.map fn 00:16:04 verbose #10298 > > |> am.fold (++) (a ;[[]]) 00:16:04 verbose #10299 > > 00:16:04 verbose #10300 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:16:04 verbose #10301 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:16:04 verbose #10302 > > │ ### init │ 00:16:04 verbose #10303 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:16:04 verbose #10304 > > 00:16:04 verbose #10305 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:16:04 verbose #10306 > > inl init n : array_base _ = 00:16:04 verbose #10307 > > am.init n id 00:16:04 verbose #10308 > > |> fun (a x : _ int _) => x 00:16:05 verbose #10309 > > 00:16:05 verbose #10310 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:16:05 verbose #10311 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:16:05 verbose #10312 > > │ ### choose │ 00:16:05 verbose #10313 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:16:05 verbose #10314 > > 00:16:05 verbose #10315 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:16:05 verbose #10316 > > inl choose f l = 00:16:05 verbose #10317 > > (l, [[]]) 00:16:05 verbose #10318 > > ||> am.foldBack fun x acc => 00:16:05 verbose #10319 > > match f x with 00:16:05 verbose #10320 > > | Some y => y :: acc 00:16:05 verbose #10321 > > | None => acc 00:16:05 verbose #10322 > > |> listm.toArray 00:16:05 verbose #10323 > > 00:16:05 verbose #10324 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:16:05 verbose #10325 > > //// test 00:16:05 verbose #10326 > > ///! fsharp 00:16:05 verbose #10327 > > ///! cuda 00:16:05 verbose #10328 > > ////! rust // v0.get_mut()[[v2.get().clone() as usize]] = match 00:16:05 verbose #10329 > > v1.get().clone().as_ref() { ^ expected `i32`, found `usize` 00:16:05 verbose #10330 > > ///! typescript 00:16:05 verbose #10331 > > ///! python 00:16:05 verbose #10332 > > 00:16:05 verbose #10333 > > 10 00:16:05 verbose #10334 > > |> init 00:16:05 verbose #10335 > > |> fun x => a x : _ int _ 00:16:05 verbose #10336 > > |> choose (fun x => if x % 2 = 0 then Some x else None) 00:16:05 verbose #10337 > > |> _assert_eq (a' ;[[ 0; 2; 4; 6; 8 ]]) 00:16:08 verbose #10338 > > 00:16:08 verbose #10339 > > ╭─[ 3.01s - return value ]─────────────────────────────────────────────────────╮ 00:16:08 verbose #10340 > > │ │ 00:16:08 verbose #10341 > > │ .py output (Cuda): │ 00:16:08 verbose #10342 > > │ Traceback (most recent call last): │ 00:16:08 verbose #10343 > > │ File │ 00:16:08 verbose #10344 > > │ "C:\home\git\polyglot\target\spiral_Eval\packages\9d4ad739531a383d55562d2d54 │ 00:16:08 verbose #10345 > > │ e83a808122db5c2290b3d9af7adfba08f40e71\main.py", line 240, in <module> │ 00:16:08 verbose #10346 > > │ if __name__ == '__main__': result = main(); None if result is None │ 00:16:08 verbose #10347 > > │ else print(result) │ 00:16:08 verbose #10348 > > │ ^^^^^^ │ 00:16:08 verbose #10349 > > │ File │ 00:16:08 verbose #10350 > > │ "C:\home\git\polyglot\target\spiral_Eval\packages\9d4ad739531a383d55562d2d54 │ 00:16:08 verbose #10351 > > │ e83a808122db5c2290b3d9af7adfba08f40e71\main.py", line 238, in main │ 00:16:08 verbose #10352 > > │ return method0() │ 00:16:08 verbose #10353 > > │ ^^^^^^^^^ │ 00:16:08 verbose #10354 > > │ File │ 00:16:08 verbose #10355 > > │ "C:\home\git\polyglot\target\spiral_Eval\packages\9d4ad739531a383d55562d2d54 │ 00:16:08 verbose #10356 > > │ e83a808122db5c2290b3d9af7adfba08f40e71\main.py", line 155, in method0 │ 00:16:08 verbose #10357 > > │ v0 = cp.empty(10,dtype=cp.int32) │ 00:16:08 verbose #10358 > > │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ 00:16:08 verbose #10359 > > │ File │ 00:16:08 verbose #10360 > > │ "C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\cupy\_creation\b │ 00:16:08 verbose #10361 > > │ asic.py", line 31, in empty │ 00:16:08 verbose #10362 > > │ return cupy.ndarray(shape, dtype, order=order) │ 00:16:08 verbose #10363 > > │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ 00:16:08 verbose #10364 > > │ File "cupy\_core\core.pyx", line 132, in │ 00:16:08 verbose #10365 > > │ cupy._core.core.ndarray.__new__ │ 00:16:08 verbose #10366 > > │ File "cupy\_core\core.pyx", line 220, in │ 00:16:08 verbose #10367 > > │ cupy._core.core._ndarray_base._init │ 00:16:08 verbose #10368 > > │ File "cupy\cuda\memory.pyx", line 738, in cupy.cuda.memory.alloc │ 00:16:08 verbose #10369 > > │ File "cupy\cuda\memory.pyx", line 1424, in │ 00:16:08 verbose #10370 > > │ cupy.cuda.memory.MemoryPool.malloc │ 00:16:08 verbose #10371 > > │ File "cupy\cuda\memory.pyx", line 1444, in │ 00:16:08 verbose #10372 > > │ cupy.cuda.memory.MemoryPool.malloc │ 00:16:08 verbose #10373 > > │ File "cupy\cuda\device.pyx", line 40, in cupy.cuda.device.get_device_id │ 00:16:08 verbose #10374 > > │ [0m │ 00:16:08 verbose #10375 > > │ File "cupy_backends\cuda\api\runtime.pyx", line 202, in │ 00:16:08 verbose #10376 > > │ cupy_backends.cuda.api.runtime.getDevice │ 00:16:08 verbose #10377 > > │ File "cupy_backends\cuda\api\runtime.pyx", line 146, in │ 00:16:08 verbose #10378 > > │ cupy_backends.cuda.api.runtime.check_status │ 00:16:08 verbose #10379 > > │ cupy_backends.cuda.api.runtime.CUDARuntimeError: │ 00:16:08 verbose #10380 > > │ cudaErrorInsufficientDriver: CUDA driver version is insufficient for CUDA │ 00:16:08 verbose #10381 > > │ runtime version │ 00:16:08 verbose #10382 > > │ │ 00:16:08 verbose #10383 > > │ .ts output: │ 00:16:08 verbose #10384 > > │ __assert_eq / actual: 0,2,4,6,8 / expected: 0,2,4,6,8 │ 00:16:08 verbose #10385 > > │ │ 00:16:08 verbose #10386 > > │ .py output: │ 00:16:08 verbose #10387 > > │ __assert_eq / actual: [0, 2, 4, 6, 8] / expected: array('l', [0, 2, 4, 6, │ 00:16:08 verbose #10388 > > │ 8]) │ 00:16:08 verbose #10389 > > │ │ 00:16:08 verbose #10390 > > │ │ 00:16:08 verbose #10391 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:16:08 verbose #10392 > > 00:16:08 verbose #10393 > > ╭─[ 3.02s - stdout ]───────────────────────────────────────────────────────────╮ 00:16:08 verbose #10394 > > │ .fsx output: │ 00:16:08 verbose #10395 > > │ __assert_eq / actual: [|0; 2; 4; 6; 8|] / expected: [|0; 2; 4; 6; 8|] │ 00:16:08 verbose #10396 > > │ │ 00:16:08 verbose #10397 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:16:08 verbose #10398 > > 00:16:08 verbose #10399 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:16:08 verbose #10400 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:16:08 verbose #10401 > > │ ### sum │ 00:16:08 verbose #10402 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:16:08 verbose #10403 > > 00:16:08 verbose #10404 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:16:08 verbose #10405 > > inl sum a = 00:16:08 verbose #10406 > > a |> am.fold (+) 0 00:16:09 verbose #10407 > > 00:16:09 verbose #10408 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:16:09 verbose #10409 > > //// test 00:16:09 verbose #10410 > > ///! fsharp 00:16:09 verbose #10411 > > ///! cuda 00:16:09 verbose #10412 > > ///! rust 00:16:09 verbose #10413 > > ///! typescript 00:16:09 verbose #10414 > > ///! python 00:16:09 verbose #10415 > > 00:16:09 verbose #10416 > > 10 00:16:09 verbose #10417 > > |> init 00:16:09 verbose #10418 > > |> fun x => a x : _ int _ 00:16:09 verbose #10419 > > |> sum 00:16:09 verbose #10420 > > |> _assert_eq 45 00:16:27 verbose #10421 > > 00:16:27 verbose #10422 > > ╭─[ 18.60s - return value ]────────────────────────────────────────────────────╮ 00:16:27 verbose #10423 > > │ │ 00:16:27 verbose #10424 > > │ .py output (Cuda): │ 00:16:27 verbose #10425 > > │ Traceback (most recent call last): │ 00:16:27 verbose #10426 > > │ File │ 00:16:27 verbose #10427 > > │ "C:\home\git\polyglot\target\spiral_Eval\packages\d2ff92bc98ea55b61391a67d35 │ 00:16:27 verbose #10428 > > │ 68f034e4f65522e461ab8b56245677d24c8308\main.py", line 124, in <module> │ 00:16:27 verbose #10429 > > │ if __name__ == '__main__': result = main(); None if result is None │ 00:16:27 verbose #10430 > > │ else print(result) │ 00:16:27 verbose #10431 > > │ ^^^^^^ │ 00:16:27 verbose #10432 > > │ File │ 00:16:27 verbose #10433 > > │ "C:\home\git\polyglot\target\spiral_Eval\packages\d2ff92bc98ea55b61391a67d35 │ 00:16:27 verbose #10434 > > │ 68f034e4f65522e461ab8b56245677d24c8308\main.py", line 122, in main │ 00:16:27 verbose #10435 > > │ return method0() │ 00:16:27 verbose #10436 > > │ ^^^^^^^^^ │ 00:16:27 verbose #10437 > > │ File │ 00:16:27 verbose #10438 > > │ "C:\home\git\polyglot\target\spiral_Eval\packages\d2ff92bc98ea55b61391a67d35 │ 00:16:27 verbose #10439 > > │ 68f034e4f65522e461ab8b56245677d24c8308\main.py", line 77, in method0 │ 00:16:27 verbose #10440 > > │ v0 = cp.empty(10,dtype=cp.int32) │ 00:16:27 verbose #10441 > > │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ 00:16:27 verbose #10442 > > │ File │ 00:16:27 verbose #10443 > > │ "C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\cupy\_creation\b │ 00:16:27 verbose #10444 > > │ asic.py", line 31, in empty │ 00:16:27 verbose #10445 > > │ return cupy.ndarray(shape, dtype, order=order) │ 00:16:27 verbose #10446 > > │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ 00:16:27 verbose #10447 > > │ File "cupy\_core\core.pyx", line 132, in │ 00:16:27 verbose #10448 > > │ cupy._core.core.ndarray.__new__ │ 00:16:27 verbose #10449 > > │ File "cupy\_core\core.pyx", line 220, in │ 00:16:27 verbose #10450 > > │ cupy._core.core._ndarray_base._init │ 00:16:27 verbose #10451 > > │ File "cupy\cuda\memory.pyx", line 738, in cupy.cuda.memory.alloc │ 00:16:27 verbose #10452 > > │ File "cupy\cuda\memory.pyx", line 1424, in │ 00:16:27 verbose #10453 > > │ cupy.cuda.memory.MemoryPool.malloc │ 00:16:27 verbose #10454 > > │ File "cupy\cuda\memory.pyx", line 1444, in │ 00:16:27 verbose #10455 > > │ cupy.cuda.memory.MemoryPool.malloc │ 00:16:27 verbose #10456 > > │ File "cupy\cuda\device.pyx", line 40, in cupy.cuda.device.get_device_id │ 00:16:27 verbose #10457 > > │ [0m │ 00:16:27 verbose #10458 > > │ File "cupy_backends\cuda\api\runtime.pyx", line 202, in │ 00:16:27 verbose #10459 > > │ cupy_backends.cuda.api.runtime.getDevice │ 00:16:27 verbose #10460 > > │ File "cupy_backends\cuda\api\runtime.pyx", line 146, in │ 00:16:27 verbose #10461 > > │ cupy_backends.cuda.api.runtime.check_status │ 00:16:27 verbose #10462 > > │ cupy_backends.cuda.api.runtime.CUDARuntimeError: │ 00:16:27 verbose #10463 > > │ cudaErrorInsufficientDriver: CUDA driver version is insufficient for CUDA │ 00:16:27 verbose #10464 > > │ runtime version │ 00:16:27 verbose #10465 > > │ │ 00:16:27 verbose #10466 > > │ .rs output: │ 00:16:27 verbose #10467 > > │ __assert_eq / actual: 45 / expected: 45 │ 00:16:27 verbose #10468 > > │ │ 00:16:27 verbose #10469 > > │ .ts output: │ 00:16:27 verbose #10470 > > │ __assert_eq / actual: 45 / expected: 45 │ 00:16:27 verbose #10471 > > │ │ 00:16:27 verbose #10472 > > │ .py output: │ 00:16:27 verbose #10473 > > │ __assert_eq / actual: 45 / expected: 45 │ 00:16:27 verbose #10474 > > │ │ 00:16:27 verbose #10475 > > │ │ 00:16:27 verbose #10476 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:16:27 verbose #10477 > > 00:16:27 verbose #10478 > > ╭─[ 18.60s - stdout ]──────────────────────────────────────────────────────────╮ 00:16:27 verbose #10479 > > │ .fsx output: │ 00:16:27 verbose #10480 > > │ __assert_eq / actual: 45 / expected: 45 │ 00:16:27 verbose #10481 > > │ │ 00:16:27 verbose #10482 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:16:27 verbose #10483 > > 00:16:27 verbose #10484 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:16:27 verbose #10485 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:16:27 verbose #10486 > > │ ### init_series │ 00:16:27 verbose #10487 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:16:27 verbose #10488 > > 00:16:27 verbose #10489 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:16:27 verbose #10490 > > inl init_series start end inc : array_base _ = 00:16:27 verbose #10491 > > inl total = conv ((end - start) / inc) + 1 00:16:27 verbose #10492 > > am.init total (conv >> (*) inc >> (+) start) 00:16:27 verbose #10493 > > |> fun (a x : _ int _) => x 00:16:28 verbose #10494 > > 00:16:28 verbose #10495 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:16:28 verbose #10496 > > //// test 00:16:28 verbose #10497 > > ///! fsharp 00:16:28 verbose #10498 > > ///! cuda 00:16:28 verbose #10499 > > ///! rust 00:16:28 verbose #10500 > > ///! typescript 00:16:28 verbose #10501 > > ///! python 00:16:28 verbose #10502 > > 00:16:28 verbose #10503 > > init_series 0 4 2 00:16:28 verbose #10504 > > |> _assert_eq' ;[[ 0i32; 2; 4 ]] 00:16:46 verbose #10505 > > 00:16:46 verbose #10506 > > ╭─[ 18.36s - return value ]────────────────────────────────────────────────────╮ 00:16:46 verbose #10507 > > │ │ 00:16:46 verbose #10508 > > │ .py output (Cuda): │ 00:16:46 verbose #10509 > > │ Traceback (most recent call last): │ 00:16:46 verbose #10510 > > │ File │ 00:16:46 verbose #10511 > > │ "C:\home\git\polyglot\target\spiral_Eval\packages\cc6bc9f685a23ff0387e2d5ade │ 00:16:46 verbose #10512 > > │ efc74ebf5530960aa10194948f6cbeed681926\main.py", line 101, in <module> │ 00:16:46 verbose #10513 > > │ if __name__ == '__main__': result = main(); None if result is None │ 00:16:46 verbose #10514 > > │ else print(result) │ 00:16:46 verbose #10515 > > │ ^^^^^^ │ 00:16:46 verbose #10516 > > │ File │ 00:16:46 verbose #10517 > > │ "C:\home\git\polyglot\target\spiral_Eval\packages\cc6bc9f685a23ff0387e2d5ade │ 00:16:46 verbose #10518 > > │ efc74ebf5530960aa10194948f6cbeed681926\main.py", line 99, in main │ 00:16:46 verbose #10519 > > │ return method0() │ 00:16:46 verbose #10520 > > │ ^^^^^^^^^ │ 00:16:46 verbose #10521 > > │ File │ 00:16:46 verbose #10522 > > │ "C:\home\git\polyglot\target\spiral_Eval\packages\cc6bc9f685a23ff0387e2d5ade │ 00:16:46 verbose #10523 > > │ efc74ebf5530960aa10194948f6cbeed681926\main.py", line 67, in method0 │ 00:16:46 verbose #10524 > > │ v0 = cp.empty(3,dtype=cp.int32) │ 00:16:46 verbose #10525 > > │ ^^^^^^^^^^^^^^^^^^^^^^^^^^ │ 00:16:46 verbose #10526 > > │ File │ 00:16:46 verbose #10527 > > │ "C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\cupy\_creation\b │ 00:16:46 verbose #10528 > > │ asic.py", line 31, in empty │ 00:16:46 verbose #10529 > > │ return cupy.ndarray(shape, dtype, order=order) │ 00:16:46 verbose #10530 > > │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ 00:16:46 verbose #10531 > > │ File "cupy\_core\core.pyx", line 132, in │ 00:16:46 verbose #10532 > > │ cupy._core.core.ndarray.__new__ │ 00:16:46 verbose #10533 > > │ File "cupy\_core\core.pyx", line 220, in │ 00:16:46 verbose #10534 > > │ cupy._core.core._ndarray_base._init │ 00:16:46 verbose #10535 > > │ File "cupy\cuda\memory.pyx", line 738, in cupy.cuda.memory.alloc │ 00:16:46 verbose #10536 > > │ File "cupy\cuda\memory.pyx", line 1424, in │ 00:16:46 verbose #10537 > > │ cupy.cuda.memory.MemoryPool.malloc │ 00:16:46 verbose #10538 > > │ File "cupy\cuda\memory.pyx", line 1444, in │ 00:16:46 verbose #10539 > > │ cupy.cuda.memory.MemoryPool.malloc │ 00:16:46 verbose #10540 > > │ File "cupy\cuda\device.pyx", line 40, in cupy.cuda.device.get_device_id │ 00:16:46 verbose #10541 > > │ [0m │ 00:16:46 verbose #10542 > > │ File "cupy_backends\cuda\api\runtime.pyx", line 202, in │ 00:16:46 verbose #10543 > > │ cupy_backends.cuda.api.runtime.getDevice │ 00:16:46 verbose #10544 > > │ File "cupy_backends\cuda\api\runtime.pyx", line 146, in │ 00:16:46 verbose #10545 > > │ cupy_backends.cuda.api.runtime.check_status │ 00:16:46 verbose #10546 > > │ cupy_backends.cuda.api.runtime.CUDARuntimeError: │ 00:16:46 verbose #10547 > > │ cudaErrorInsufficientDriver: CUDA driver version is insufficient for CUDA │ 00:16:46 verbose #10548 > > │ runtime version │ 00:16:46 verbose #10549 > > │ │ 00:16:46 verbose #10550 > > │ .rs output: │ 00:16:46 verbose #10551 > > │ __assert_eq' / actual: Array(MutCell([0, 2, 4])) / expected: Array(MutCell([ │ 00:16:46 verbose #10552 > > │ 0, 2, 4])) │ 00:16:46 verbose #10553 > > │ │ 00:16:46 verbose #10554 > > │ .ts output: │ 00:16:46 verbose #10555 > > │ __assert_eq' / actual: 0,2,4 / expected: 0,2,4 │ 00:16:46 verbose #10556 > > │ │ 00:16:46 verbose #10557 > > │ .py output: │ 00:16:46 verbose #10558 > > │ __assert_eq' / actual: [0, 2, 4] / expected: array('l', [0, 2, 4]) │ 00:16:46 verbose #10559 > > │ │ 00:16:46 verbose #10560 > > │ │ 00:16:46 verbose #10561 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:16:46 verbose #10562 > > 00:16:46 verbose #10563 > > ╭─[ 18.37s - stdout ]──────────────────────────────────────────────────────────╮ 00:16:46 verbose #10564 > > │ .fsx output: │ 00:16:46 verbose #10565 > > │ __assert_eq' / actual: [|0; 2; 4|] / expected: [|0; 2; 4|] │ 00:16:46 verbose #10566 > > │ │ 00:16:46 verbose #10567 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:16:46 verbose #10568 > > 00:16:46 verbose #10569 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:16:46 verbose #10570 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:16:46 verbose #10571 > > │ ### head │ 00:16:46 verbose #10572 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:16:46 verbose #10573 > > 00:16:46 verbose #10574 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:16:46 verbose #10575 > > inl head (ar : a _ _) = 00:16:46 verbose #10576 > > if var_is ar || length ar > 0 00:16:46 verbose #10577 > > then ar |> index 0 00:16:46 verbose #10578 > > else error_type "The length of the array should be greater than 0." 00:16:47 verbose #10579 > > 00:16:47 verbose #10580 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:16:47 verbose #10581 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:16:47 verbose #10582 > > │ ### last │ 00:16:47 verbose #10583 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:16:47 verbose #10584 > > 00:16:47 verbose #10585 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:16:47 verbose #10586 > > inl last (ar : a _ _) = 00:16:47 verbose #10587 > > inl len = length ar 00:16:47 verbose #10588 > > if var_is ar || len > 0 00:16:47 verbose #10589 > > then ar |> index (len - 1) 00:16:47 verbose #10590 > > else error_type "The length of the array should be greater than 0." 00:16:47 verbose #10591 > > 00:16:47 verbose #10592 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:16:47 verbose #10593 > > //// test 00:16:47 verbose #10594 > > ///! fsharp 00:16:47 verbose #10595 > > ///! cuda 00:16:47 verbose #10596 > > ///! rust 00:16:47 verbose #10597 > > ///! typescript 00:16:47 verbose #10598 > > ///! python 00:16:47 verbose #10599 > > 00:16:47 verbose #10600 > > 10 00:16:47 verbose #10601 > > |> init 00:16:47 verbose #10602 > > |> fun x => a x : _ int _ 00:16:47 verbose #10603 > > |> last 00:16:47 verbose #10604 > > |> _assert_eq 9 00:17:09 verbose #10605 > > 00:17:09 verbose #10606 > > ╭─[ 21.64s - return value ]────────────────────────────────────────────────────╮ 00:17:09 verbose #10607 > > │ │ 00:17:09 verbose #10608 > > │ .py output (Cuda): │ 00:17:09 verbose #10609 > > │ Traceback (most recent call last): │ 00:17:09 verbose #10610 > > │ File │ 00:17:09 verbose #10611 > > │ "C:\home\git\polyglot\target\spiral_Eval\packages\ed1d249488022df51e5f876496 │ 00:17:09 verbose #10612 > > │ d2021ed16162ab1f9734f72e17cda34328ce10\main.py", line 103, in <module> │ 00:17:09 verbose #10613 > > │ if __name__ == '__main__': result = main(); None if result is None │ 00:17:09 verbose #10614 > > │ else print(result) │ 00:17:09 verbose #10615 > > │ ^^^^^^ │ 00:17:09 verbose #10616 > > │ File │ 00:17:09 verbose #10617 > > │ "C:\home\git\polyglot\target\spiral_Eval\packages\ed1d249488022df51e5f876496 │ 00:17:09 verbose #10618 > > │ d2021ed16162ab1f9734f72e17cda34328ce10\main.py", line 101, in main │ 00:17:09 verbose #10619 > > │ return method0() │ 00:17:09 verbose #10620 > > │ ^^^^^^^^^ │ 00:17:09 verbose #10621 > > │ File │ 00:17:09 verbose #10622 > > │ "C:\home\git\polyglot\target\spiral_Eval\packages\ed1d249488022df51e5f876496 │ 00:17:09 verbose #10623 > > │ d2021ed16162ab1f9734f72e17cda34328ce10\main.py", line 67, in method0 │ 00:17:09 verbose #10624 > > │ v0 = cp.empty(10,dtype=cp.int32) │ 00:17:09 verbose #10625 > > │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ 00:17:09 verbose #10626 > > │ File │ 00:17:09 verbose #10627 > > │ "C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\cupy\_creation\b │ 00:17:09 verbose #10628 > > │ asic.py", line 31, in empty │ 00:17:09 verbose #10629 > > │ return cupy.ndarray(shape, dtype, order=order) │ 00:17:09 verbose #10630 > > │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ 00:17:09 verbose #10631 > > │ File "cupy\_core\core.pyx", line 132, in │ 00:17:09 verbose #10632 > > │ cupy._core.core.ndarray.__new__ │ 00:17:09 verbose #10633 > > │ File "cupy\_core\core.pyx", line 220, in │ 00:17:09 verbose #10634 > > │ cupy._core.core._ndarray_base._init │ 00:17:09 verbose #10635 > > │ File "cupy\cuda\memory.pyx", line 738, in cupy.cuda.memory.alloc │ 00:17:09 verbose #10636 > > │ File "cupy\cuda\memory.pyx", line 1424, in │ 00:17:09 verbose #10637 > > │ cupy.cuda.memory.MemoryPool.malloc │ 00:17:09 verbose #10638 > > │ File "cupy\cuda\memory.pyx", line 1444, in │ 00:17:09 verbose #10639 > > │ cupy.cuda.memory.MemoryPool.malloc │ 00:17:09 verbose #10640 > > │ File "cupy\cuda\device.pyx", line 40, in cupy.cuda.device.get_device_id │ 00:17:09 verbose #10641 > > │ [0m │ 00:17:09 verbose #10642 > > │ File "cupy_backends\cuda\api\runtime.pyx", line 202, in │ 00:17:09 verbose #10643 > > │ cupy_backends.cuda.api.runtime.getDevice │ 00:17:09 verbose #10644 > > │ File "cupy_backends\cuda\api\runtime.pyx", line 146, in │ 00:17:09 verbose #10645 > > │ cupy_backends.cuda.api.runtime.check_status │ 00:17:09 verbose #10646 > > │ cupy_backends.cuda.api.runtime.CUDARuntimeError: │ 00:17:09 verbose #10647 > > │ cudaErrorInsufficientDriver: CUDA driver version is insufficient for CUDA │ 00:17:09 verbose #10648 > > │ runtime version │ 00:17:09 verbose #10649 > > │ │ 00:17:09 verbose #10650 > > │ .rs output: │ 00:17:09 verbose #10651 > > │ __assert_eq / actual: 9 / expected: 9 │ 00:17:09 verbose #10652 > > │ │ 00:17:09 verbose #10653 > > │ .ts output: │ 00:17:09 verbose #10654 > > │ __assert_eq / actual: 9 / expected: 9 │ 00:17:09 verbose #10655 > > │ │ 00:17:09 verbose #10656 > > │ .py output: │ 00:17:09 verbose #10657 > > │ __assert_eq / actual: 9 / expected: 9 │ 00:17:09 verbose #10658 > > │ │ 00:17:09 verbose #10659 > > │ │ 00:17:09 verbose #10660 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:09 verbose #10661 > > 00:17:09 verbose #10662 > > ╭─[ 21.64s - stdout ]──────────────────────────────────────────────────────────╮ 00:17:09 verbose #10663 > > │ .fsx output: │ 00:17:09 verbose #10664 > > │ __assert_eq / actual: 9 / expected: 9 │ 00:17:09 verbose #10665 > > │ │ 00:17:09 verbose #10666 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:09 verbose #10667 > > 00:17:09 verbose #10668 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:09 verbose #10669 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:09 verbose #10670 > > │ ### try_pick │ 00:17:09 verbose #10671 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:09 verbose #10672 > > 00:17:09 verbose #10673 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:09 verbose #10674 > > inl try_pick forall t u. (fn : t -> option u) (array : a _ t) : option u = 00:17:09 verbose #10675 > > (array, None) 00:17:09 verbose #10676 > > ||> am.foldBack fun x acc => 00:17:09 verbose #10677 > > match acc with 00:17:09 verbose #10678 > > | Some _ => acc 00:17:09 verbose #10679 > > | None => x |> fn 00:17:09 verbose #10680 > > 00:17:09 verbose #10681 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:09 verbose #10682 > > //// test 00:17:09 verbose #10683 > > ///! fsharp 00:17:09 verbose #10684 > > ///! cuda 00:17:09 verbose #10685 > > ////! rust // match &v23 { Spiral_builder::US0::US0_0(x) => x.clone(), _ => 00:17:09 verbose #10686 > > unreachable!(), } == 5_i32 00:17:09 verbose #10687 > > ///! typescript 00:17:09 verbose #10688 > > ///! python 00:17:09 verbose #10689 > > 00:17:09 verbose #10690 > > 10 00:17:09 verbose #10691 > > |> init 00:17:09 verbose #10692 > > |> fun x => a x : _ int _ 00:17:09 verbose #10693 > > |> try_pick (fun x => if x = 5i32 then Some x else None) 00:17:09 verbose #10694 > > |> _assert_eq (Some 5i32) 00:17:12 verbose #10695 > > 00:17:12 verbose #10696 > > ╭─[ 2.48s - return value ]─────────────────────────────────────────────────────╮ 00:17:12 verbose #10697 > > │ │ 00:17:12 verbose #10698 > > │ .py output (Cuda): │ 00:17:12 verbose #10699 > > │ Traceback (most recent call last): │ 00:17:12 verbose #10700 > > │ File │ 00:17:12 verbose #10701 > > │ "C:\home\git\polyglot\target\spiral_Eval\packages\f574f6aa78dd2d474cc9a15e98 │ 00:17:12 verbose #10702 > > │ 16e77781ab6f25f1c539d19fe6f862f7ac5433\main.py", line 157, in <module> │ 00:17:12 verbose #10703 > > │ if __name__ == '__main__': result = main(); None if result is None │ 00:17:12 verbose #10704 > > │ else print(result) │ 00:17:12 verbose #10705 > > │ ^^^^^^ │ 00:17:12 verbose #10706 > > │ File │ 00:17:12 verbose #10707 > > │ "C:\home\git\polyglot\target\spiral_Eval\packages\f574f6aa78dd2d474cc9a15e98 │ 00:17:12 verbose #10708 > > │ 16e77781ab6f25f1c539d19fe6f862f7ac5433\main.py", line 155, in main │ 00:17:12 verbose #10709 > > │ return method0() │ 00:17:12 verbose #10710 > > │ ^^^^^^^^^ │ 00:17:12 verbose #10711 > > │ File │ 00:17:12 verbose #10712 > > │ "C:\home\git\polyglot\target\spiral_Eval\packages\f574f6aa78dd2d474cc9a15e98 │ 00:17:12 verbose #10713 > > │ 16e77781ab6f25f1c539d19fe6f862f7ac5433\main.py", line 83, in method0 │ 00:17:12 verbose #10714 > > │ v0 = cp.empty(10,dtype=cp.int32) │ 00:17:12 verbose #10715 > > │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ 00:17:12 verbose #10716 > > │ File │ 00:17:12 verbose #10717 > > │ "C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\cupy\_creation\b │ 00:17:12 verbose #10718 > > │ asic.py", line 31, in empty │ 00:17:12 verbose #10719 > > │ return cupy.ndarray(shape, dtype, order=order) │ 00:17:12 verbose #10720 > > │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ 00:17:12 verbose #10721 > > │ File "cupy\_core\core.pyx", line 132, in │ 00:17:12 verbose #10722 > > │ cupy._core.core.ndarray.__new__ │ 00:17:12 verbose #10723 > > │ File "cupy\_core\core.pyx", line 220, in │ 00:17:12 verbose #10724 > > │ cupy._core.core._ndarray_base._init │ 00:17:12 verbose #10725 > > │ File "cupy\cuda\memory.pyx", line 738, in cupy.cuda.memory.alloc │ 00:17:12 verbose #10726 > > │ File "cupy\cuda\memory.pyx", line 1424, in │ 00:17:12 verbose #10727 > > │ cupy.cuda.memory.MemoryPool.malloc │ 00:17:12 verbose #10728 > > │ File "cupy\cuda\memory.pyx", line 1444, in │ 00:17:12 verbose #10729 > > │ cupy.cuda.memory.MemoryPool.malloc │ 00:17:12 verbose #10730 > > │ File "cupy\cuda\device.pyx", line 40, in cupy.cuda.device.get_device_id │ 00:17:12 verbose #10731 > > │ [0m │ 00:17:12 verbose #10732 > > │ File "cupy_backends\cuda\api\runtime.pyx", line 202, in │ 00:17:12 verbose #10733 > > │ cupy_backends.cuda.api.runtime.getDevice │ 00:17:12 verbose #10734 > > │ File "cupy_backends\cuda\api\runtime.pyx", line 146, in │ 00:17:12 verbose #10735 > > │ cupy_backends.cuda.api.runtime.check_status │ 00:17:12 verbose #10736 > > │ cupy_backends.cuda.api.runtime.CUDARuntimeError: │ 00:17:12 verbose #10737 > > │ cudaErrorInsufficientDriver: CUDA driver version is insufficient for CUDA │ 00:17:12 verbose #10738 > > │ runtime version │ 00:17:12 verbose #10739 > > │ │ 00:17:12 verbose #10740 > > │ .ts output: │ 00:17:12 verbose #10741 > > │ __assert_eq / actual: US0_0 5 / expected: US0_0 5 │ 00:17:12 verbose #10742 > > │ │ 00:17:12 verbose #10743 > > │ .py output: │ 00:17:12 verbose #10744 > > │ __assert_eq / actual: US0_0 5 / expected: US0_0 5 │ 00:17:12 verbose #10745 > > │ │ 00:17:12 verbose #10746 > > │ │ 00:17:12 verbose #10747 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:12 verbose #10748 > > 00:17:12 verbose #10749 > > ╭─[ 2.48s - stdout ]───────────────────────────────────────────────────────────╮ 00:17:12 verbose #10750 > > │ .fsx output: │ 00:17:12 verbose #10751 > > │ __assert_eq / actual: US0_0 5 / expected: US0_0 5 │ 00:17:12 verbose #10752 > > │ │ 00:17:12 verbose #10753 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:12 verbose #10754 > > 00:17:12 verbose #10755 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:12 verbose #10756 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:12 verbose #10757 > > │ ### indexed │ 00:17:12 verbose #10758 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:12 verbose #10759 > > 00:17:12 verbose #10760 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:12 verbose #10761 > > inl indexed forall t u {number}. (ar : array_base t) : array_base (u * t) = 00:17:12 verbose #10762 > > ((0, a ;[[]]), (a ar : _ int _)) 00:17:12 verbose #10763 > > ||> am.fold fun (i, acc) x => 00:17:12 verbose #10764 > > i + 1, acc ++ a ;[[i, x]] 00:17:12 verbose #10765 > > |> snd 00:17:12 verbose #10766 > > |> fun (a x : _ int _) => x 00:17:12 verbose #10767 > > 00:17:12 verbose #10768 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:12 verbose #10769 > > //// test 00:17:12 verbose #10770 > > ///! fsharp 00:17:12 verbose #10771 > > ////! cuda // Only stack allocated primitive types (i8,i16,i32,i64 and 00:17:12 verbose #10772 > > u8,u16,u32,u64 and f32,f64 and bool) are allowed in CuPy arrays. 00:17:12 verbose #10773 > > ///! rust 00:17:12 verbose #10774 > > ///! typescript 00:17:12 verbose #10775 > > ///! python 00:17:12 verbose #10776 > > 00:17:12 verbose #10777 > > am.init 3i32 ((*) 2) 00:17:12 verbose #10778 > > |> fun (a x : _ int _) => x 00:17:12 verbose #10779 > > |> indexed 00:17:12 verbose #10780 > > |> _assert_eq' ;[[0i32, 0; 1, 2; 2, 4]] 00:17:30 verbose #10781 > > 00:17:30 verbose #10782 > > ╭─[ 18.09s - return value ]────────────────────────────────────────────────────╮ 00:17:30 verbose #10783 > > │ .rs output: │ 00:17:30 verbose #10784 > > │ __assert_eq' / actual: Array(MutCell([(0, 0), (1, 2), (2, 4)])) / expected: │ 00:17:30 verbose #10785 > > │ Array(MutCell([(0, 0), (1, 2), (2, 4)])) │ 00:17:30 verbose #10786 > > │ │ 00:17:30 verbose #10787 > > │ .ts output: │ 00:17:30 verbose #10788 > > │ __assert_eq' / actual: 0,0,1,2,2,4 / expected: 0,0,1,2,2,4 │ 00:17:30 verbose #10789 > > │ │ 00:17:30 verbose #10790 > > │ .py output: │ 00:17:30 verbose #10791 > > │ __assert_eq' / actual: [(0, 0), (1, 2), (2, 4)] / expected: [(0, 0), (1, 2), │ 00:17:30 verbose #10792 > > │ (2, 4)] │ 00:17:30 verbose #10793 > > │ │ 00:17:30 verbose #10794 > > │ │ 00:17:30 verbose #10795 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:30 verbose #10796 > > 00:17:30 verbose #10797 > > ╭─[ 18.09s - stdout ]──────────────────────────────────────────────────────────╮ 00:17:30 verbose #10798 > > │ .fsx output: │ 00:17:30 verbose #10799 > > │ __assert_eq' / actual: [|struct (0, 0); struct (1, 2); struct (2, 4)|] / │ 00:17:30 verbose #10800 > > │ expected: [|struct (0, 0); struct (1, 2); struct (2, 4)|] │ 00:17:30 verbose #10801 > > │ │ 00:17:30 verbose #10802 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:30 verbose #10803 > > 00:17:30 verbose #10804 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:30 verbose #10805 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:30 verbose #10806 > > │ ### slice │ 00:17:30 verbose #10807 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:30 verbose #10808 > > 00:17:30 verbose #10809 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:30 verbose #10810 > > inl slice forall dim {int; number} el. from nearTo s : a dim el = 00:17:30 verbose #10811 > > am.slice { from nearTo } s 00:17:30 verbose #10812 > > 00:17:30 verbose #10813 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:30 verbose #10814 > > //// test 00:17:30 verbose #10815 > > ///! fsharp 00:17:30 verbose #10816 > > ///! cuda 00:17:30 verbose #10817 > > ///! rust 00:17:30 verbose #10818 > > ///! typescript 00:17:30 verbose #10819 > > ///! python 00:17:30 verbose #10820 > > 00:17:30 verbose #10821 > > inl x : _ i32 _ = a ;[[ 1i32; 2; 3 ]] 00:17:30 verbose #10822 > > x |> slice 0 0 |> _assert_eq (a ;[[]]) 00:17:30 verbose #10823 > > x |> slice 0 1 |> _assert_eq (a ;[[ 1 ]]) 00:17:30 verbose #10824 > > x |> slice 1 1 |> _assert_eq (a ;[[]]) 00:17:30 verbose #10825 > > x |> slice 1 2 |> _assert_eq (a ;[[ 2 ]]) 00:17:30 verbose #10826 > > x |> slice 2 2 |> _assert_eq (a ;[[]]) 00:17:30 verbose #10827 > > x |> slice 0 2 |> _assert_eq (a ;[[ 1; 2 ]]) 00:17:50 verbose #10828 > > 00:17:50 verbose #10829 > > ╭─[ 19.40s - return value ]────────────────────────────────────────────────────╮ 00:17:50 verbose #10830 > > │ │ 00:17:50 verbose #10831 > > │ .py output (Cuda): │ 00:17:50 verbose #10832 > > │ Traceback (most recent call last): │ 00:17:50 verbose #10833 > > │ File │ 00:17:50 verbose #10834 > > │ "C:\home\git\polyglot\target\spiral_Eval\packages\a8adc9f979fb0d14587fb26faf │ 00:17:50 verbose #10835 > > │ e8b2f1cddc6a9cfe0d328177faf8a154a65c7b\main.py", line 367, in <module> │ 00:17:50 verbose #10836 > > │ if __name__ == '__main__': result = main(); None if result is None │ 00:17:50 verbose #10837 > > │ else print(result) │ 00:17:50 verbose #10838 > > │ ^^^^^^ │ 00:17:50 verbose #10839 > > │ File │ 00:17:50 verbose #10840 > > │ "C:\home\git\polyglot\target\spiral_Eval\packages\a8adc9f979fb0d14587fb26faf │ 00:17:50 verbose #10841 > > │ e8b2f1cddc6a9cfe0d328177faf8a154a65c7b\main.py", line 365, in main │ 00:17:50 verbose #10842 > > │ return method0() │ 00:17:50 verbose #10843 > > │ ^^^^^^^^^ │ 00:17:50 verbose #10844 > > │ File │ 00:17:50 verbose #10845 > > │ "C:\home\git\polyglot\target\spiral_Eval\packages\a8adc9f979fb0d14587fb26faf │ 00:17:50 verbose #10846 > > │ e8b2f1cddc6a9cfe0d328177faf8a154a65c7b\main.py", line 108, in method0 │ 00:17:50 verbose #10847 > > │ v0 = cp.array([1, 2, 3],dtype=cp.int32) │ 00:17:50 verbose #10848 > > │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ 00:17:50 verbose #10849 > > │ File │ 00:17:50 verbose #10850 > > │ "C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\cupy\_creation\f │ 00:17:50 verbose #10851 > > │ rom_data.py", line 53, in array │ 00:17:50 verbose #10852 > > │ return _core.array(obj, dtype, copy, order, subok, ndmin, blocking)[ │ 00:17:50 verbose #10853 > > │ 0m │ 00:17:50 verbose #10854 > > │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[ │ 00:17:50 verbose #10855 > > │ 0m │ 00:17:50 verbose #10856 > > │ File "cupy\_core\core.pyx", line 2379, in cupy._core.core.array │ 00:17:50 verbose #10857 > > │ File "cupy\_core\core.pyx", line 2406, in cupy._core.core.array │ 00:17:50 verbose #10858 > > │ File "cupy\_core\core.pyx", line 2548, in │ 00:17:50 verbose #10859 > > │ cupy._core.core._array_default │ 00:17:50 verbose #10860 > > │ File "cupy\_core\core.pyx", line 132, in │ 00:17:50 verbose #10861 > > │ cupy._core.core.ndarray.__new__ │ 00:17:50 verbose #10862 > > │ F...moryPool.malloc │ 00:17:50 verbose #10863 > > │ File "cupy\cuda\device.pyx", line 40, in cupy.cuda.device.get_device_id │ 00:17:50 verbose #10864 > > │ [0m │ 00:17:50 verbose #10865 > > │ File "cupy_backends\cuda\api\runtime.pyx", line 202, in │ 00:17:50 verbose #10866 > > │ cupy_backends.cuda.api.runtime.getDevice │ 00:17:50 verbose #10867 > > │ File "cupy_backends\cuda\api\runtime.pyx", line 146, in │ 00:17:50 verbose #10868 > > │ cupy_backends.cuda.api.runtime.check_status │ 00:17:50 verbose #10869 > > │ cupy_backends.cuda.api.runtime.CUDARuntimeError: │ 00:17:50 verbose #10870 > > │ cudaErrorInsufficientDriver: CUDA driver version is insufficient for CUDA │ 00:17:50 verbose #10871 > > │ runtime version │ 00:17:50 verbose #10872 > > │ │ 00:17:50 verbose #10873 > > │ │ 00:17:50 verbose #10874 > > │ .rs output: │ 00:17:50 verbose #10875 > > │ __assert_eq / actual: Array(MutCell([])) / expected: Array(MutCell([])) │ 00:17:50 verbose #10876 > > │ __assert_eq / actual: Array(MutCell([1])) / expected: Array(MutCell([1])) │ 00:17:50 verbose #10877 > > │ __assert_eq / actual: Array(MutCell([])) / expected: Array(MutCell([])) │ 00:17:50 verbose #10878 > > │ __assert_eq / actual: Array(MutCell([2])) / expected: Array(MutCell([2])) │ 00:17:50 verbose #10879 > > │ __assert_eq / actual: Array(MutCell([])) / expected: Array(MutCell([])) │ 00:17:50 verbose #10880 > > │ __assert_eq / actual: Array(MutCell([1, 2])) / expected: Array(MutCell([1, │ 00:17:50 verbose #10881 > > │ 2])) │ 00:17:50 verbose #10882 > > │ │ 00:17:50 verbose #10883 > > │ │ 00:17:50 verbose #10884 > > │ .ts output: │ 00:17:50 verbose #10885 > > │ __assert_eq / actual: / expected: │ 00:17:50 verbose #10886 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:17:50 verbose #10887 > > │ __assert_eq / actual: / expected: │ 00:17:50 verbose #10888 > > │ __assert_eq / actual: 2 / expected: 2 │ 00:17:50 verbose #10889 > > │ __assert_eq / actual: / expected: │ 00:17:50 verbose #10890 > > │ __assert_eq / actual: 1,2 / expected: 1,2 │ 00:17:50 verbose #10891 > > │ │ 00:17:50 verbose #10892 > > │ │ 00:17:50 verbose #10893 > > │ .py output: │ 00:17:50 verbose #10894 > > │ __assert_eq / actual: [] / expected: array('l') │ 00:17:50 verbose #10895 > > │ __assert_eq / actual: [1] / expected: array('l', [1]) │ 00:17:50 verbose #10896 > > │ __assert_eq / actual: [] / expected: array('l') │ 00:17:50 verbose #10897 > > │ __assert_eq / actual: [2] / expected: array('l', [2]) │ 00:17:50 verbose #10898 > > │ __assert_eq / actual: [] / expected: array('l') │ 00:17:50 verbose #10899 > > │ __assert_eq / actual: [1, 2] / expected: array('l', [1, 2]) │ 00:17:50 verbose #10900 > > │ │ 00:17:50 verbose #10901 > > │ │ 00:17:50 verbose #10902 > > │ │ 00:17:50 verbose #10903 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:50 verbose #10904 > > 00:17:50 verbose #10905 > > ╭─[ 19.40s - stdout ]──────────────────────────────────────────────────────────╮ 00:17:50 verbose #10906 > > │ .fsx output: │ 00:17:50 verbose #10907 > > │ __assert_eq / actual: [||] / expected: [||] │ 00:17:50 verbose #10908 > > │ __assert_eq / actual: [|1|] / expected: [|1|] │ 00:17:50 verbose #10909 > > │ __assert_eq / actual: [||] / expected: [||] │ 00:17:50 verbose #10910 > > │ __assert_eq / actual: [|2|] / expected: [|2|] │ 00:17:50 verbose #10911 > > │ __assert_eq / actual: [||] / expected: [||] │ 00:17:50 verbose #10912 > > │ __assert_eq / actual: [|1; 2|] / expected: [|1; 2|] │ 00:17:50 verbose #10913 > > │ │ 00:17:50 verbose #10914 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:50 verbose #10915 > > 00:17:50 verbose #10916 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:50 verbose #10917 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:50 verbose #10918 > > │ ### range │ 00:17:50 verbose #10919 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:50 verbose #10920 > > 00:17:50 verbose #10921 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:50 verbose #10922 > > union range dim = 00:17:50 verbose #10923 > > | Start : dim 00:17:50 verbose #10924 > > | End : dim -> dim 00:17:50 verbose #10925 > > 00:17:50 verbose #10926 > > inl range start end s = 00:17:50 verbose #10927 > > inl start, end = 00:17:50 verbose #10928 > > match start, end with 00:17:50 verbose #10929 > > | Start start, End fn => 00:17:50 verbose #10930 > > start, s |> length |> conv |> fn 00:17:50 verbose #10931 > > | End start_fn, End end_fn => 00:17:50 verbose #10932 > > inl len = s |> length |> conv 00:17:50 verbose #10933 > > start_fn len, end_fn len 00:17:50 verbose #10934 > > s |> slice (start |> unbox) (end |> unbox) 00:17:50 verbose #10935 > > 00:17:50 verbose #10936 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:50 verbose #10937 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:50 verbose #10938 > > │ ## rust │ 00:17:50 verbose #10939 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:50 verbose #10940 > > 00:17:50 verbose #10941 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:50 verbose #10942 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:50 verbose #10943 > > │ ### vec │ 00:17:50 verbose #10944 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:50 verbose #10945 > > 00:17:50 verbose #10946 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:50 verbose #10947 > > nominal vec t = 00:17:50 verbose #10948 > > `( 00:17:50 verbose #10949 > > backend_switch `(()) `({}) { 00:17:50 verbose #10950 > > Fsharp = 00:17:50 verbose #10951 > > (fun () => 00:17:50 verbose #10952 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:17:50 verbose #10953 > > Fable.Core.Emit(\"Vec<$0>\")>]]\n#endif\ntype Vec<'T> = class end" 00:17:50 verbose #10954 > > ) : () -> () 00:17:50 verbose #10955 > > } 00:17:50 verbose #10956 > > $'' : $'Vec<`t>' 00:17:50 verbose #10957 > > ) 00:17:51 verbose #10958 > > 00:17:51 verbose #10959 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:51 verbose #10960 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:51 verbose #10961 > > │ ### from_vec │ 00:17:51 verbose #10962 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:51 verbose #10963 > > 00:17:51 verbose #10964 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:51 verbose #10965 > > inl from_vec forall dim el. (vec : vec el) : a dim el = 00:17:51 verbose #10966 > > !\\(vec, $'"fable_library_rust::NativeArray_::array_from($0)"') 00:17:51 verbose #10967 > > 00:17:51 verbose #10968 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:51 verbose #10969 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:51 verbose #10970 > > │ ### to_vec │ 00:17:51 verbose #10971 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:51 verbose #10972 > > 00:17:51 verbose #10973 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:51 verbose #10974 > > inl to_vec forall t. (ab : array_base t) : vec t = 00:17:51 verbose #10975 > > !\\(ab, $'"$0.to_vec()"') 00:17:52 verbose #10976 > > 00:17:52 verbose #10977 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:52 verbose #10978 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:52 verbose #10979 > > │ ### to_vec' │ 00:17:52 verbose #10980 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:52 verbose #10981 > > 00:17:52 verbose #10982 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:52 verbose #10983 > > inl to_vec' forall (t : * -> * -> *) u v. (x : t u v) : vec u = 00:17:52 verbose #10984 > > !\($'$"!x.to_vec()"') 00:17:52 verbose #10985 > > 00:17:52 verbose #10986 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:52 verbose #10987 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:52 verbose #10988 > > │ ### to_vec'' │ 00:17:52 verbose #10989 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:52 verbose #10990 > > 00:17:52 verbose #10991 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:52 verbose #10992 > > inl to_vec'' forall (t : * -> *) (u : * -> *) v. (x : t (u v)) : vec v = 00:17:52 verbose #10993 > > !\($'$"!x.to_vec()"') 00:17:52 verbose #10994 > > 00:17:52 verbose #10995 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:52 verbose #10996 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:52 verbose #10997 > > │ ### vec_push │ 00:17:52 verbose #10998 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:52 verbose #10999 > > 00:17:52 verbose #11000 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:52 verbose #11001 > > inl vec_push forall el. (el : el) (vec : vec el) : vec el = 00:17:52 verbose #11002 > > inl el = join el 00:17:52 verbose #11003 > > inl vec = join vec 00:17:52 verbose #11004 > > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore 00:17:52 verbose #11005 > > // inl vec = vec |> rust.to_mut 00:17:52 verbose #11006 > > (!\($'"true; !vec.push(!el)"') : bool) |> ignore 00:17:52 verbose #11007 > > !\($'"!vec"') 00:17:53 verbose #11008 > > 00:17:53 verbose #11009 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:53 verbose #11010 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:53 verbose #11011 > > │ ### vec_reverse │ 00:17:53 verbose #11012 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:53 verbose #11013 > > 00:17:53 verbose #11014 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:53 verbose #11015 > > inl vec_reverse forall el. (vec : vec el) : vec el = 00:17:53 verbose #11016 > > inl vec = join vec 00:17:53 verbose #11017 > > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore 00:17:53 verbose #11018 > > (!\($'"true; !vec.reverse()"') : bool) |> ignore 00:17:53 verbose #11019 > > !\($'"!vec"') 00:17:53 verbose #11020 > > 00:17:53 verbose #11021 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:53 verbose #11022 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:53 verbose #11023 > > │ ### vec_retain │ 00:17:53 verbose #11024 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:53 verbose #11025 > > 00:17:53 verbose #11026 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:53 verbose #11027 > > inl vec_retain forall el. (fn : el -> bool) (vec : vec el) : vec el = 00:17:53 verbose #11028 > > inl vec = join vec 00:17:53 verbose #11029 > > inl fn = join fn 00:17:53 verbose #11030 > > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore 00:17:53 verbose #11031 > > // inl vec = vec |> rust.to_mut 00:17:53 verbose #11032 > > (!\($'"true; !vec.retain(|x| !fn(x.clone()))"') : bool) |> ignore 00:17:53 verbose #11033 > > !\($'"!vec"') 00:17:54 verbose #11034 > > 00:17:54 verbose #11035 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:54 verbose #11036 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:54 verbose #11037 > > │ ### vec_sort_by_key │ 00:17:54 verbose #11038 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:54 verbose #11039 > > 00:17:54 verbose #11040 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:54 verbose #11041 > > inl vec_sort_by_key forall el t. (fn : el -> t) (vec : vec el) : vec el = 00:17:54 verbose #11042 > > inl vec = join vec 00:17:54 verbose #11043 > > inl fn = join fn 00:17:54 verbose #11044 > > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore 00:17:54 verbose #11045 > > // inl vec = vec |> rust.to_mut 00:17:54 verbose #11046 > > (!\($'"true; !vec.sort_by_key(|x| !fn(x.clone()))"') : bool) |> ignore 00:17:54 verbose #11047 > > !\($'"!vec"') 00:17:54 verbose #11048 > > 00:17:54 verbose #11049 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:54 verbose #11050 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:54 verbose #11051 > > │ ### vec_extend │ 00:17:54 verbose #11052 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:54 verbose #11053 > > 00:17:54 verbose #11054 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:54 verbose #11055 > > inl vec_extend forall el. (el : vec el) (vec : vec el) : vec el = 00:17:54 verbose #11056 > > inl el = join el 00:17:54 verbose #11057 > > inl vec = join vec 00:17:54 verbose #11058 > > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore 00:17:54 verbose #11059 > > // inl vec = vec |> rust.to_mut 00:17:54 verbose #11060 > > (!\($'"true; !vec.extend(!el)"') : bool) |> ignore 00:17:54 verbose #11061 > > !\($'"!vec"') 00:17:55 verbose #11062 > > 00:17:55 verbose #11063 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:55 verbose #11064 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:55 verbose #11065 > > │ ### vec_collect │ 00:17:55 verbose #11066 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:55 verbose #11067 > > 00:17:55 verbose #11068 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:55 verbose #11069 > > inl vec_collect fn vec = 00:17:55 verbose #11070 > > ((;[[]] |> to_vec), (vec |> from_vec : _ i32 _)) 00:17:55 verbose #11071 > > ||> am.fold fun acc x => 00:17:55 verbose #11072 > > acc |> vec_extend (fn x) 00:17:55 verbose #11073 > > 00:17:55 verbose #11074 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:55 verbose #11075 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:55 verbose #11076 > > │ ### vec_collect_option │ 00:17:55 verbose #11077 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:55 verbose #11078 > > 00:17:55 verbose #11079 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:55 verbose #11080 > > inl vec_collect_option vec = 00:17:55 verbose #11081 > > ((;[[]] |> to_vec |> Ok), (vec |> from_vec : _ i32 _)) 00:17:55 verbose #11082 > > ||> am.fold fun acc x => 00:17:55 verbose #11083 > > x 00:17:55 verbose #11084 > > |> resultm.unbox 00:17:55 verbose #11085 > > |> fun x => 00:17:55 verbose #11086 > > match acc, x |> resultm.map optionm'.unbox with 00:17:55 verbose #11087 > > | Ok acc, Ok (Some x) => acc |> vec_extend x |> Ok 00:17:55 verbose #11088 > > | _, Error error => error |> Error 00:17:55 verbose #11089 > > | _ => acc 00:17:55 verbose #11090 > > 00:17:55 verbose #11091 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:55 verbose #11092 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:55 verbose #11093 > > │ ### vec_collect_into │ 00:17:55 verbose #11094 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:55 verbose #11095 > > 00:17:55 verbose #11096 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:55 verbose #11097 > > inl vec_collect_into forall (c : * -> * -> *) t e. 00:17:55 verbose #11098 > > (x : vec (c t e)) 00:17:55 verbose #11099 > > : c (vec t) e 00:17:55 verbose #11100 > > = 00:17:55 verbose #11101 > > !\($'"!x.into_iter().collect()"') 00:17:56 verbose #11102 > > 00:17:56 verbose #11103 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:56 verbose #11104 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:56 verbose #11105 > > │ ### vec_mapi │ 00:17:56 verbose #11106 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:56 verbose #11107 > > 00:17:56 verbose #11108 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:56 verbose #11109 > > inl vec_mapi forall dim t u. (fn : dim -> t -> u) (ar : vec t) : vec u = 00:17:56 verbose #11110 > > inl fn = join fn 00:17:56 verbose #11111 > > inl ar = join ar 00:17:56 verbose #11112 > > !\($'"!ar.iter().enumerate().map(|(i, x)| 00:17:56 verbose #11113 > > !fn(i.try_into().unwrap())(x.clone())).collect::<Vec<_>>()"') 00:17:56 verbose #11114 > > 00:17:56 verbose #11115 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:56 verbose #11116 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:56 verbose #11117 > > │ ### vec_map │ 00:17:56 verbose #11118 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:56 verbose #11119 > > 00:17:56 verbose #11120 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:56 verbose #11121 > > inl vec_map forall t u. (fn : t -> u) (ar : vec t) : vec u = 00:17:56 verbose #11122 > > (!\\(ar, $'"true; let _vec_map : Vec<_> = $0.into_iter().map(|x| { //"') : 00:17:56 verbose #11123 > > bool) |> ignore 00:17:56 verbose #11124 > > inl result = fn !\($'"x"') 00:17:56 verbose #11125 > > inl is_unit = 00:17:56 verbose #11126 > > real 00:17:56 verbose #11127 > > typecase u with 00:17:56 verbose #11128 > > | () => true 00:17:56 verbose #11129 > > | _ => false 00:17:56 verbose #11130 > > if is_unit 00:17:56 verbose #11131 > > then (!\($'"true; }}).collect::<Vec<_>>()"') : bool) |> ignore 00:17:56 verbose #11132 > > else (!\\(result, $'"true; $0 }).collect::<Vec<_>>()"') : bool) |> ignore 00:17:56 verbose #11133 > > !\($'"_vec_map"') 00:17:57 verbose #11134 > > 00:17:57 verbose #11135 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:57 verbose #11136 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:57 verbose #11137 > > │ ### vec_map' │ 00:17:57 verbose #11138 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:57 verbose #11139 > > 00:17:57 verbose #11140 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:57 verbose #11141 > > inl vec_map' forall t u. (fn : t -> u) (ar : vec t) : vec u = 00:17:57 verbose #11142 > > !\\((ar, fn), $'"$0.into_iter().map(|x| 00:17:57 verbose #11143 > > $1(x.clone())).collect::<Vec<_>>()"') 00:17:57 verbose #11144 > > 00:17:57 verbose #11145 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:57 verbose #11146 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:57 verbose #11147 > > │ ### vec_fold' │ 00:17:57 verbose #11148 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:57 verbose #11149 > > 00:17:57 verbose #11150 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:57 verbose #11151 > > inl vec_fold' forall t u. (fn : u -> t -> u) (init : u) (ar : vec t) : u = 00:17:57 verbose #11152 > > (!\\(ar, $'"true; let _vec_fold_ = $0.into_iter().fold(!init, |acc, x| { 00:17:57 verbose #11153 > > //"') : bool) |> ignore 00:17:57 verbose #11154 > > (!\\(fn !\($'"acc"') !\($'"x"'), $'"true; $0 })"') : bool) |> ignore 00:17:57 verbose #11155 > > !\($'"_vec_fold_"') 00:17:58 verbose #11156 > > 00:17:58 verbose #11157 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:58 verbose #11158 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:58 verbose #11159 > > │ ### vec_for_each │ 00:17:58 verbose #11160 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:58 verbose #11161 > > 00:17:58 verbose #11162 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:58 verbose #11163 > > inl vec_for_each forall t. (fn : t -> ()) (ar : vec t) : () = 00:17:58 verbose #11164 > > (!\\((ar, fn), $'"true; $0.iter().for_each(|x| { $1(x.clone()); }); //"') : 00:17:58 verbose #11165 > > bool) |> ignore 00:17:58 verbose #11166 > > 00:17:58 verbose #11167 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:58 verbose #11168 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:58 verbose #11169 > > │ ### vec_for_each' │ 00:17:58 verbose #11170 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:58 verbose #11171 > > 00:17:58 verbose #11172 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:58 verbose #11173 > > inl vec_for_each' forall t. (fn : t -> ()) (ar : vec t) : () = 00:17:58 verbose #11174 > > (!\\(ar, $'"true; $0.into_iter().for_each(|x| { //"') : bool) |> ignore 00:17:58 verbose #11175 > > (!\\(fn !\($'"x"'), $'$"true"') : bool) |> ignore 00:17:58 verbose #11176 > > (!\($'"true; }}); { //"') : bool) |> ignore 00:17:58 verbose #11177 > > 00:17:58 verbose #11178 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:58 verbose #11179 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:58 verbose #11180 > > │ ### vec_for_each'' │ 00:17:58 verbose #11181 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:58 verbose #11182 > > 00:17:58 verbose #11183 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:58 verbose #11184 > > inl vec_for_each'' forall t. (fn : t -> ()) (ar : vec t) : () = 00:17:58 verbose #11185 > > (!\\(ar, $'"true; $0.into_iter().for_each(|x| { //"') : bool) |> ignore 00:17:58 verbose #11186 > > (!\\(fn !\($'"x"'), $'$"true"') : bool) |> ignore 00:17:58 verbose #11187 > > (!\($'"true; }}); //"') : bool) |> ignore 00:17:59 verbose #11188 > > 00:17:59 verbose #11189 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:59 verbose #11190 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:59 verbose #11191 > > │ ### vec_for_each''' │ 00:17:59 verbose #11192 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:59 verbose #11193 > > 00:17:59 verbose #11194 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:59 verbose #11195 > > inl vec_for_each''' forall t. (fn : t -> ()) (ar : vec t) : () = 00:17:59 verbose #11196 > > (!\\(ar, $'"true; $0.into_iter().for_each(|x| { //"') : bool) |> ignore 00:17:59 verbose #11197 > > (!\\(fn !\($'"x"'), $'$"true"') : bool) |> ignore 00:17:59 verbose #11198 > > (!\($'"true; }); //"') : bool) |> ignore 00:17:59 verbose #11199 > > 00:17:59 verbose #11200 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:17:59 verbose #11201 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:17:59 verbose #11202 > > │ ### vec_filter │ 00:17:59 verbose #11203 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:17:59 verbose #11204 > > 00:17:59 verbose #11205 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:17:59 verbose #11206 > > inl vec_filter forall t. (fn : t -> bool) (ar : vec t) : vec t = 00:17:59 verbose #11207 > > inl fn = join fn 00:17:59 verbose #11208 > > inl ar = join ar 00:17:59 verbose #11209 > > !\($'"!ar.into_iter().filter(|x| 00:17:59 verbose #11210 > > !fn(x.clone().clone())).collect::<Vec<_>>()"') 00:18:00 verbose #11211 > > 00:18:00 verbose #11212 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:00 verbose #11213 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:00 verbose #11214 > > │ ### vec_len │ 00:18:00 verbose #11215 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:00 verbose #11216 > > 00:18:00 verbose #11217 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:00 verbose #11218 > > inl vec_len forall t. (vec : vec t) : unativeint = 00:18:00 verbose #11219 > > !\\(vec, $'"$0.len()"') 00:18:00 verbose #11220 > > 00:18:00 verbose #11221 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:00 verbose #11222 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:00 verbose #11223 > > │ ### vec_chunks │ 00:18:00 verbose #11224 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:00 verbose #11225 > > 00:18:00 verbose #11226 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:00 verbose #11227 > > inl vec_chunks forall t. (n : i32) (vec : vec t) : vec (vec t) = 00:18:00 verbose #11228 > > !\\(vec, $'"$0.chunks(!n).map(|x| x.into_iter().map(|x| 00:18:00 verbose #11229 > > x.clone()).collect::<Vec<_>>()).collect::<Vec<_>>()"') 00:18:01 verbose #11230 > > 00:18:01 verbose #11231 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:01 verbose #11232 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:01 verbose #11233 > > │ ### slice │ 00:18:01 verbose #11234 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:01 verbose #11235 > > 00:18:01 verbose #11236 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:01 verbose #11237 > > nominal slice t = 00:18:01 verbose #11238 > > `( 00:18:01 verbose #11239 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:18:01 verbose #11240 > > Fable.Core.Emit(\"[[$0]]\")>]]\n#endif\ntype Slice<'T> = class end" 00:18:01 verbose #11241 > > $'' : $'Slice<`t>' 00:18:01 verbose #11242 > > ) 00:18:01 verbose #11243 > > 00:18:01 verbose #11244 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:01 verbose #11245 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:01 verbose #11246 > > │ ### slice' │ 00:18:01 verbose #11247 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:01 verbose #11248 > > 00:18:01 verbose #11249 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:01 verbose #11250 > > nominal slice' el dim = 00:18:01 verbose #11251 > > `( 00:18:01 verbose #11252 > > backend_switch `(()) `({}) { 00:18:01 verbose #11253 > > Fsharp = 00:18:01 verbose #11254 > > (fun () => 00:18:01 verbose #11255 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:18:01 verbose #11256 > > Fable.Core.Emit(\"_\")>]]\n#endif\ntype Slice'<'T> = class end" 00:18:01 verbose #11257 > > ) : () -> () 00:18:01 verbose #11258 > > } 00:18:01 verbose #11259 > > $'' : $'Slice\'<`el>' 00:18:01 verbose #11260 > > ) 00:18:01 verbose #11261 > > 00:18:01 verbose #11262 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:01 verbose #11263 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:01 verbose #11264 > > │ ### slice_singleton │ 00:18:01 verbose #11265 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:01 verbose #11266 > > 00:18:01 verbose #11267 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:01 verbose #11268 > > inl slice_singleton forall dim el. (x : option el) : slice' el dim = 00:18:01 verbose #11269 > > match x with 00:18:01 verbose #11270 > > | Some x => !\($'"[[!x]]"') 00:18:01 verbose #11271 > > | None => 00:18:01 verbose #11272 > > !\($'"[[\\\"\\\".to_string()]]"') : slice' el dim 00:18:01 verbose #11273 > > // emit_expr `(()) `(slice' el dim) () ($'"[[@dim]]"' : string) : 00:18:01 verbose #11274 > > slice' el 10 00:18:01 verbose #11275 > > // !\( : string) : slice' el i32 // !\($'"[[]]"') 00:18:02 verbose #11276 > > 00:18:02 verbose #11277 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:02 verbose #11278 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:02 verbose #11279 > > │ ### slice_length │ 00:18:02 verbose #11280 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:02 verbose #11281 > > 00:18:02 verbose #11282 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:02 verbose #11283 > > inl slice_length forall t dim. (x : slice' t dim) : unativeint = 00:18:02 verbose #11284 > > !\($'"!x.len()"') 00:18:02 verbose #11285 > > 00:18:02 verbose #11286 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:02 verbose #11287 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:02 verbose #11288 > > │ ### slice_range │ 00:18:02 verbose #11289 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:02 verbose #11290 > > 00:18:02 verbose #11291 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:02 verbose #11292 > > inl slice_range forall t dim. (start : range t) (end : range t) (s : slice' t 00:18:02 verbose #11293 > > dim) : rust.ref (slice' t dim) = 00:18:02 verbose #11294 > > inl len = s |> slice_length 00:18:02 verbose #11295 > > inl start, (end : unativeint) = 00:18:02 verbose #11296 > > match start, end with 00:18:02 verbose #11297 > > | Start start, End fn => start, len |> convert |> fn |> convert 00:18:02 verbose #11298 > > | End start_fn, End end_fn => len |> convert |> start_fn, len |> convert 00:18:02 verbose #11299 > > |> end_fn |> convert 00:18:02 verbose #11300 > > match start, end with 00:18:02 verbose #11301 > > | start, end when unbox end =. len => !\($'"&!s[[!start..]]"') 00:18:02 verbose #11302 > > | start, end => !\\((start, end), $'"&!s[[$0..$1]]"') 00:18:03 verbose #11303 > > 00:18:03 verbose #11304 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:03 verbose #11305 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:03 verbose #11306 > > │ ### new_slice │ 00:18:03 verbose #11307 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:03 verbose #11308 > > 00:18:03 verbose #11309 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:03 verbose #11310 > > inl new_slice forall el dim. (el : el) : slice' el dim = 00:18:03 verbose #11311 > > !\\(el, $'"[[$0; @dim]]"') 00:18:03 verbose #11312 > > 00:18:03 verbose #11313 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:03 verbose #11314 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:03 verbose #11315 > > │ ### as_slice │ 00:18:03 verbose #11316 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:03 verbose #11317 > > 00:18:03 verbose #11318 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:03 verbose #11319 > > inl as_slice forall t. (x : array_base t) : rust.ref (slice t) = 00:18:03 verbose #11320 > > inl x = x |> to_vec 00:18:03 verbose #11321 > > !\($'"!x.as_slice()"') 00:18:04 verbose #11322 > > 00:18:04 verbose #11323 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:04 verbose #11324 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:04 verbose #11325 > > │ ### slice_to_vec │ 00:18:04 verbose #11326 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:04 verbose #11327 > > 00:18:04 verbose #11328 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:04 verbose #11329 > > inl slice_to_vec forall t. (slice : rust.ref (slice t)) : vec t = 00:18:04 verbose #11330 > > !\\(slice, $'"$0.iter().map(|x| *x).collect::<Vec<_>>()"') 00:18:04 verbose #11331 > > 00:18:04 verbose #11332 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:04 verbose #11333 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:04 verbose #11334 > > │ ### to_le_bytes │ 00:18:04 verbose #11335 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:04 verbose #11336 > > 00:18:04 verbose #11337 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:04 verbose #11338 > > inl to_le_bytes forall t. (x : t) : slice' u8 8 = 00:18:04 verbose #11339 > > !\($'$"!x.to_le_bytes()"') 00:18:05 verbose #11340 > > 00:18:05 verbose #11341 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:05 verbose #11342 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:05 verbose #11343 > > │ ### as_bytes │ 00:18:05 verbose #11344 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:05 verbose #11345 > > 00:18:05 verbose #11346 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:05 verbose #11347 > > inl as_bytes forall t. (x : t) : rust.ref (slice u8) = 00:18:05 verbose #11348 > > !\($'$"!x.as_bytes()"') 00:18:05 verbose #11349 > > 00:18:05 verbose #11350 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:05 verbose #11351 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:05 verbose #11352 > > │ ### any │ 00:18:05 verbose #11353 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:05 verbose #11354 > > 00:18:05 verbose #11355 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:05 verbose #11356 > > inl any forall t. (fn : t -> bool) (source : array_base t) : bool = 00:18:05 verbose #11357 > > !\($'"!source.any(|x| !fn(x))"') 00:18:05 verbose #11358 > > 00:18:05 verbose #11359 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:05 verbose #11360 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:05 verbose #11361 > > │ ### iter_collect vec │ 00:18:05 verbose #11362 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:05 verbose #11363 > > 00:18:05 verbose #11364 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:05 verbose #11365 > > instance iter_collect vec = fun (iter : into_iterator u) => 00:18:05 verbose #11366 > > !\\(iter, $'"$0.collect::<Vec<_>>()"') 00:18:05 verbose #11367 > > 00:18:05 verbose #11368 > > instance iter_collect'' vec = fun (iter : into_iterator (t (u v))) => 00:18:05 verbose #11369 > > !\\(iter, $'"$0.collect::<Vec<_>>()"') 00:18:06 verbose #11370 > > 00:18:06 verbose #11371 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:06 verbose #11372 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:06 verbose #11373 > > │ ### new_vec │ 00:18:06 verbose #11374 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:06 verbose #11375 > > 00:18:06 verbose #11376 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:06 verbose #11377 > > inl new_vec forall t. (items : list t) : vec t = 00:18:06 verbose #11378 > > inl items = 00:18:06 verbose #11379 > > (items, ("", 0i32)) 00:18:06 verbose #11380 > > ||> listm.foldBack fun (x : t) (acc, i) => 00:18:06 verbose #11381 > > inl x = join x 00:18:06 verbose #11382 > > $'"!x"' +. (if i = 0 then "" else ", ") +. acc, i + 1 00:18:06 verbose #11383 > > |> fst 00:18:06 verbose #11384 > > !\($'"vec\![[" + !items + "]]"') 00:18:06 verbose #11385 > > 00:18:06 verbose #11386 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:06 verbose #11387 > > //// test 00:18:06 verbose #11388 > > ///! rust 00:18:06 verbose #11389 > > 00:18:06 verbose #11390 > > [[ 0i32; 1 ]] 00:18:06 verbose #11391 > > |> new_vec 00:18:06 verbose #11392 > > |> sm'.format_debug' 00:18:06 verbose #11393 > > |> sm'.from_std_string 00:18:06 verbose #11394 > > |> _assert_eq "[[0, 1]]" 00:18:25 verbose #11395 > > 00:18:25 verbose #11396 > > ╭─[ 18.29s - return value ]────────────────────────────────────────────────────╮ 00:18:25 verbose #11397 > > │ __assert_eq / actual: "[0, 1]" / expected: "[0, 1]" │ 00:18:25 verbose #11398 > > │ │ 00:18:25 verbose #11399 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:25 verbose #11400 > > 00:18:25 verbose #11401 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:25 verbose #11402 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:25 verbose #11403 > > │ ## fsharp │ 00:18:25 verbose #11404 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:25 verbose #11405 > > 00:18:25 verbose #11406 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:25 verbose #11407 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:25 verbose #11408 > > │ ### average │ 00:18:25 verbose #11409 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:25 verbose #11410 > > 00:18:25 verbose #11411 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:25 verbose #11412 > > inl average forall el {number}. (a : a _ el) : el = 00:18:25 verbose #11413 > > $'!a |> Array.average' 00:18:25 verbose #11414 > > 00:18:25 verbose #11415 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:25 verbose #11416 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:25 verbose #11417 > > │ ### distinct │ 00:18:25 verbose #11418 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:25 verbose #11419 > > 00:18:25 verbose #11420 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:25 verbose #11421 > > inl distinct forall dim el. (a : a dim el) : a dim el = 00:18:25 verbose #11422 > > $'!a |> Array.distinct' 00:18:25 verbose #11423 > > 00:18:25 verbose #11424 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:25 verbose #11425 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:25 verbose #11426 > > │ ### skip │ 00:18:25 verbose #11427 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:25 verbose #11428 > > 00:18:25 verbose #11429 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:25 verbose #11430 > > inl skip forall dim el. (n : dim) (a : a dim el) : a dim el = 00:18:25 verbose #11431 > > $'!a |> Array.skip !n ' 00:18:26 verbose #11432 > > 00:18:26 verbose #11433 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:26 verbose #11434 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:26 verbose #11435 > > │ ### skip_while │ 00:18:26 verbose #11436 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:26 verbose #11437 > > 00:18:26 verbose #11438 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:26 verbose #11439 > > inl skip_while forall dim el. (fn : el -> bool) (a : a dim el) : a dim el = 00:18:26 verbose #11440 > > $'!a |> Array.skipWhile !fn ' 00:18:26 verbose #11441 > > 00:18:26 verbose #11442 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:26 verbose #11443 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:26 verbose #11444 > > │ ### to_list' │ 00:18:26 verbose #11445 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:26 verbose #11446 > > 00:18:26 verbose #11447 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:26 verbose #11448 > > inl to_list' forall dim t. (items : a dim t) : listm'.list' t = 00:18:26 verbose #11449 > > $'!items |> Array.toList' 00:18:27 verbose #11450 > > 00:18:27 verbose #11451 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:27 verbose #11452 > > //// test 00:18:27 verbose #11453 > > ///! fsharp 00:18:27 verbose #11454 > > ////! cuda 00:18:27 verbose #11455 > > ///! rust 00:18:27 verbose #11456 > > ///! typescript 00:18:27 verbose #11457 > > ///! python 00:18:27 verbose #11458 > > 00:18:27 verbose #11459 > > a' ;[[ -3i32; 6 ]] 00:18:27 verbose #11460 > > |> to_list' 00:18:27 verbose #11461 > > |> listm'.unbox 00:18:27 verbose #11462 > > |> _assert_eq [[ -3; 6 ]] 00:18:45 verbose #11463 > > 00:18:45 verbose #11464 > > ╭─[ 18.05s - return value ]────────────────────────────────────────────────────╮ 00:18:45 verbose #11465 > > │ .rs output: │ 00:18:45 verbose #11466 > > │ __assert_eq / actual: UH0_1(-3, UH0_1(6, UH0_0)) / expected: UH0_1(-3, │ 00:18:45 verbose #11467 > > │ UH0_1(6, UH0_0)) │ 00:18:45 verbose #11468 > > │ │ 00:18:45 verbose #11469 > > │ .ts output: │ 00:18:45 verbose #11470 > > │ __assert_eq / actual: UH0_1 (-3, UH0_1 (6, UH0_0)) / expected: UH0_1 (-3, │ 00:18:45 verbose #11471 > > │ UH0_1 (6, UH0_0)) │ 00:18:45 verbose #11472 > > │ │ 00:18:45 verbose #11473 > > │ .py output: │ 00:18:45 verbose #11474 > > │ __assert_eq / actual: UH0_1 (-3, UH0_1 (6, UH0_0)) / expected: UH0_1 (-3, │ 00:18:45 verbose #11475 > > │ UH0_1 (6, UH0_0)) │ 00:18:45 verbose #11476 > > │ │ 00:18:45 verbose #11477 > > │ │ 00:18:45 verbose #11478 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:45 verbose #11479 > > 00:18:45 verbose #11480 > > ╭─[ 18.05s - stdout ]──────────────────────────────────────────────────────────╮ 00:18:45 verbose #11481 > > │ .fsx output: │ 00:18:45 verbose #11482 > > │ __assert_eq / actual: UH0_1 (-3, UH0_1 (6, UH0_0)) / expected: UH0_1 (-3, │ 00:18:45 verbose #11483 > > │ UH0_1 (6, UH0_0)) │ 00:18:45 verbose #11484 > > │ │ 00:18:45 verbose #11485 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:45 verbose #11486 > > 00:18:45 verbose #11487 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:45 verbose #11488 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:45 verbose #11489 > > │ ### parallel_map │ 00:18:45 verbose #11490 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:45 verbose #11491 > > 00:18:45 verbose #11492 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:45 verbose #11493 > > inl parallel_map forall dim el el'. (fn : el -> el') (a : a dim el) : a dim el' 00:18:45 verbose #11494 > > = 00:18:45 verbose #11495 > > $'!a |> Array.Parallel.map !fn ' 00:18:45 verbose #11496 > > 00:18:45 verbose #11497 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:45 verbose #11498 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:45 verbose #11499 > > │ ### map' │ 00:18:45 verbose #11500 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:45 verbose #11501 > > 00:18:45 verbose #11502 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:45 verbose #11503 > > inl map' forall dim el el'. (fn : el -> el') (a : a dim el) : a dim el' = 00:18:45 verbose #11504 > > $'!a |> Array.map !fn ' 00:18:46 verbose #11505 > > 00:18:46 verbose #11506 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:46 verbose #11507 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:46 verbose #11508 > > │ ### sort_by │ 00:18:46 verbose #11509 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:46 verbose #11510 > > 00:18:46 verbose #11511 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:46 verbose #11512 > > inl sort_by forall dim el. (fn : el -> _) (a : a dim el) : a dim el = 00:18:46 verbose #11513 > > $'!a |> Array.sortBy !fn ' 00:18:46 verbose #11514 > > 00:18:46 verbose #11515 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:46 verbose #11516 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:46 verbose #11517 > > │ ### sort │ 00:18:46 verbose #11518 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:46 verbose #11519 > > 00:18:46 verbose #11520 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:46 verbose #11521 > > inl sort forall dim el. (a : a dim el) : a dim el = 00:18:46 verbose #11522 > > $'!a |> Array.sort' 00:18:47 verbose #11523 > > 00:18:47 verbose #11524 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:47 verbose #11525 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:47 verbose #11526 > > │ ### sort_descending │ 00:18:47 verbose #11527 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:47 verbose #11528 > > 00:18:47 verbose #11529 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:47 verbose #11530 > > inl sort_descending forall dim el. (a : a dim el) : a dim el = 00:18:47 verbose #11531 > > $'!a |> Array.sortDescending' 00:18:47 verbose #11532 > > 00:18:47 verbose #11533 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:47 verbose #11534 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:47 verbose #11535 > > │ ### transpose │ 00:18:47 verbose #11536 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:47 verbose #11537 > > 00:18:47 verbose #11538 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:47 verbose #11539 > > inl transpose forall el. (a : array_base (array_base el)) : array_base 00:18:47 verbose #11540 > > (array_base el) = 00:18:47 verbose #11541 > > $'!a |> Array.transpose' 00:18:48 verbose #11542 > > 00:18:48 verbose #11543 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:48 verbose #11544 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:48 verbose #11545 > > │ ### try_item │ 00:18:48 verbose #11546 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:48 verbose #11547 > > 00:18:48 verbose #11548 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:48 verbose #11549 > > inl try_item forall dim el. (i : i32) (a : a dim el) : option el = 00:18:48 verbose #11550 > > $'!a |> Array.tryItem !i ' |> optionm'.unbox 00:18:48 verbose #11551 > 00:03:16 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 84721 } 00:18:48 verbose #11552 > 00:03:16 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:18:48 verbose #11553 > "nbconvert", 00:18:48 verbose #11554 > "c:/home/git/polyglot/lib/spiral/am'.dib.ipynb", 00:18:48 verbose #11555 > "--to", 00:18:48 verbose #11556 > "html", 00:18:48 verbose #11557 > "--HTMLExporter.theme=dark", 00:18:48 verbose #11558 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/am'.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:18:50 verbose #11559 > 00:03:18 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/am'.dib.ipynb to html 00:18:50 verbose #11560 > 00:03:18 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:18:50 verbose #11561 > 00:03:18 verbose #7 ! validate(nb) 00:18:53 verbose #11562 > 00:03:20 verbose #8 ! [NbConvertApp] Writing 468786 bytes to c:\home\git\polyglot\lib\spiral\am'.dib.html 00:18:53 verbose #11563 > 00:03:21 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 637 } 00:18:53 verbose #11564 > 00:03:21 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 637 } 00:18:53 verbose #11565 > 00:03:21 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:18:53 verbose #11566 > "-c", 00:18:53 verbose #11567 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/am''.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:18:53 verbose #11568 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/am''.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:18:53 verbose #11569 > 00:03:21 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:18:53 verbose #11570 > 00:03:21 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:18:53 verbose #11571 > 00:03:21 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 85417 } 00:18:53 debug #11572 runtime.execute_with_options_async / { exit_code = 0; output_length = 90976 } 00:18:53 debug #12 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path am'.dib --retries 3 00:18:53 debug #11573 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path crypto.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:18:53 verbose #11574 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "crypto.dib", "--retries", "3"])) } 00:18:53 verbose #11575 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:18:53 verbose #11576 > "repl", 00:18:53 verbose #11577 > "--exit-after-run", 00:18:53 verbose #11578 > "--run", 00:18:53 verbose #11579 > "c:/home/git/polyglot/lib/spiral/crypto.dib", 00:18:53 verbose #11580 > "--output-path", 00:18:53 verbose #11581 > "c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb", 00:18:53 verbose #11582 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/crypto.dib" --output-path "c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:18:55 verbose #11583 > > 00:18:55 verbose #11584 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:18:55 verbose #11585 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:18:55 verbose #11586 > > │ # crypto │ 00:18:55 verbose #11587 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:18:59 verbose #11588 > > 00:18:59 verbose #11589 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:18:59 verbose #11590 > > open rust 00:18:59 verbose #11591 > > open rust_operators 00:19:01 verbose #11592 > > 00:19:01 verbose #11593 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:19:01 verbose #11594 > > //// test 00:19:01 verbose #11595 > > 00:19:01 verbose #11596 > > open testing 00:19:01 verbose #11597 > > open file_system_operators 00:19:01 verbose #11598 > > 00:19:01 verbose #11599 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:19:01 verbose #11600 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:19:01 verbose #11601 > > │ ## fsharp │ 00:19:01 verbose #11602 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:19:01 verbose #11603 > > 00:19:01 verbose #11604 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:19:01 verbose #11605 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:19:01 verbose #11606 > > │ ### sha256 │ 00:19:01 verbose #11607 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:19:01 verbose #11608 > > 00:19:01 verbose #11609 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:19:01 verbose #11610 > > nominal sha256 = $'System.Security.Cryptography.SHA256' 00:19:01 verbose #11611 > > 00:19:01 verbose #11612 > > inl sha256 () : sha256 = 00:19:01 verbose #11613 > > $'`sha256.Create' () 00:19:01 verbose #11614 > > 00:19:01 verbose #11615 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:19:01 verbose #11616 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:19:01 verbose #11617 > > │ ### sha256_compute_hash │ 00:19:01 verbose #11618 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:19:01 verbose #11619 > > 00:19:01 verbose #11620 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:19:01 verbose #11621 > > inl sha256_compute_hash (x : sha256) (data : a i32 u8) : a i32 u8 = 00:19:01 verbose #11622 > > data |> $'!x.ComputeHash' 00:19:02 verbose #11623 > > 00:19:02 verbose #11624 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:19:02 verbose #11625 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:19:02 verbose #11626 > > │ ## rust │ 00:19:02 verbose #11627 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:19:02 verbose #11628 > > 00:19:02 verbose #11629 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:19:02 verbose #11630 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:19:02 verbose #11631 > > │ ### get_file_hash' │ 00:19:02 verbose #11632 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:19:02 verbose #11633 > > 00:19:02 verbose #11634 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:19:02 verbose #11635 > > inl get_file_hash' (path : string) : result string string = 00:19:02 verbose #11636 > > inl path = path |> file_system.normalize_path 00:19:02 verbose #11637 > > inl exit_code, result = 00:19:02 verbose #11638 > > runtime.execution_options fun x => { x with 00:19:02 verbose #11639 > > command = $'$"pwsh -c \\\"(Get-FileHash \'{!path}\' -Algorithm 00:19:02 verbose #11640 > > SHA256).Hash\\\""' 00:19:02 verbose #11641 > > } 00:19:02 verbose #11642 > > |> runtime.execute_with_options 00:19:02 verbose #11643 > > if exit_code = 0 00:19:02 verbose #11644 > > then result |> sm'.to_lower |> Ok 00:19:02 verbose #11645 > > else result |> Error 00:19:02 verbose #11646 > > 00:19:02 verbose #11647 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:19:02 verbose #11648 > > //// test 00:19:02 verbose #11649 > > 00:19:02 verbose #11650 > > inl file_name = "test.txt" 00:19:02 verbose #11651 > > inl text = "\n" 00:19:02 verbose #11652 > > 00:19:02 verbose #11653 > > inl temp_dir, disposable = 00:19:02 verbose #11654 > > (file_name, text) 00:19:02 verbose #11655 > > |> sm'.format_debug 00:19:02 verbose #11656 > > |> crypto.hash_text 00:19:02 verbose #11657 > > |> file_system.create_temp_dir' 00:19:02 verbose #11658 > > disposable |> use |> ignore 00:19:02 verbose #11659 > > inl path = temp_dir </> file_name 00:19:02 verbose #11660 > > text |> file_system.write_all_text_async path |> async.run_synchronously 00:19:02 verbose #11661 > > path 00:19:02 verbose #11662 > > |> get_file_hash' 00:19:02 verbose #11663 > > |> resultm.get 00:19:02 verbose #11664 > > |> _assert_eq "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b" 00:19:13 verbose #11665 > > 00:19:13 verbose #11666 > > ╭─[ 10.46s - stdout ]──────────────────────────────────────────────────────────╮ 00:19:13 verbose #11667 > > │ 00:00:00 debug #1 runtime.execute_with_options_async / { options = { │ 00:19:13 verbose #11668 > > │ command = pwsh -c "(Get-FileHash │ 00:19:13 verbose #11669 > > │ 'c:/Users/i574n/AppData/Local/Temp/!create_temp_path_/dotnet-repl/9ca8b18d-e │ 00:19:13 verbose #11670 > > │ e77-4684-ad12-21e1354945fc/test.txt' -Algorithm SHA256).Hash"; │ 00:19:13 verbose #11671 > > │ cancellation_token = None; environment_variables = [||]; on_line = None; │ 00:19:13 verbose #11672 > > │ stdin = None; trace = true; working_directory = None } } │ 00:19:13 verbose #11673 > > │ 00:00:00 verbose #2 > │ 00:19:13 verbose #11674 > > │ 01BA4719C80B6FE911B091A7C05124B64EEECE964E09C058EF8F9805DACA546B │ 00:19:13 verbose #11675 > > │ 00:00:00 debug #3 runtime.execute_with_options_async / { exit_code = │ 00:19:13 verbose #11676 > > │ 0; output_length = 64 } │ 00:19:13 verbose #11677 > > │ __assert_eq / actual: │ 00:19:13 verbose #11678 > > │ "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b" / │ 00:19:13 verbose #11679 > > │ expected: "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b" │ 00:19:13 verbose #11680 > > │ │ 00:19:13 verbose #11681 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:19:13 verbose #11682 > > 00:19:13 verbose #11683 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:19:13 verbose #11684 > > //// test 00:19:13 verbose #11685 > > ///! rust -d chrono encoding_rs encoding_rs_io regex sha2 00:19:13 verbose #11686 > > 00:19:13 verbose #11687 > > inl file_name = "test.txt" 00:19:13 verbose #11688 > > inl text = "\n" 00:19:13 verbose #11689 > > 00:19:13 verbose #11690 > > inl temp_dir, disposable = 00:19:13 verbose #11691 > > (file_name, text) 00:19:13 verbose #11692 > > |> sm'.format_debug 00:19:13 verbose #11693 > > |> crypto.hash_text 00:19:13 verbose #11694 > > |> file_system.create_temp_dir' 00:19:13 verbose #11695 > > inl path = temp_dir </> file_name 00:19:13 verbose #11696 > > text |> file_system.write_all_text path 00:19:13 verbose #11697 > > path 00:19:13 verbose #11698 > > |> get_file_hash' 00:19:13 verbose #11699 > > |> resultm.get 00:19:13 verbose #11700 > > |> _assert_eq "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b" 00:19:13 verbose #11701 > > disposable |> use |> ignore 00:19:45 verbose #11702 > > 00:19:45 verbose #11703 > > ╭─[ 31.81s - return value ]────────────────────────────────────────────────────╮ 00:19:45 verbose #11704 > > │ 00:00:00 verbose #1 file_system.create_dir / { dir = │ 00:19:45 verbose #11705 > > │ C:\Users\i574n\AppData\Local\Temp\!create_temp_path_\spiral_builder_4e1de5ae │ 00:19:45 verbose #11706 > > │ f755b8ef21ed2ec0bf106c740d799d06d1a8f956a2bdcb8a80691070\ba0aa16a-6c5a-be3f- │ 00:19:45 verbose #11707 > > │ b526-70110c680e36 } │ 00:19:45 verbose #11708 > > │ 00:00:00 debug #2 runtime.execute_with_options / { file_name = pwsh; │ 00:19:45 verbose #11709 > > │ arguments = [ │ 00:19:45 verbose #11710 > > │ "-c", │ 00:19:45 verbose #11711 > > │ "(Get-FileHash │ 00:19:45 verbose #11712 > > │ 'c:/Users/i574n/AppData/Local/Temp/!create_temp_path_/spiral_builder_4e1de5a │ 00:19:45 verbose #11713 > > │ ef755b8ef21ed2ec0bf106c740d799d06d1a8f956a2bdcb8a80691070/ba0aa16a-6c5a-be3f │ 00:19:45 verbose #11714 > > │ -b526-70110c680e36/test.txt' -Algorithm SHA256).Hash", │ 00:19:45 verbose #11715 > > │ ]; options = { command = pwsh -c "(Get-FileHash │ 00:19:45 verbose #11716 > > │ 'c:/Users/i574n/AppData/Local/Temp/!create_temp_path_/spiral_builder_4e1de5a │ 00:19:45 verbose #11717 > > │ ef755b8ef21ed2ec0bf106c740d799d06d1a8f956a2bdcb8a80691070/ba0aa16a-6c5a-be3f │ 00:19:45 verbose #11718 > > │ -b526-70110c680e36/test.txt' -Algorithm SHA256).Hash"; cancellation_token = │ 00:19:45 verbose #11719 > > │ None; environment_variables = Array(MutCell([])); on_line = None; stdin = │ 00:19:45 verbose #11720 > > │ None; trace = true; working_directory = None } } │ 00:19:45 verbose #11721 > > │ 00:00:00 verbose #3 > │ 00:19:45 verbose #11722 > > │ 01BA4719C80B6FE911B091A7C05124B64EEECE964E09C058EF8F9805DACA546B │ 00:19:45 verbose #11723 > > │ 00:00:00 verbose #4 runtime.execute_with_options / result / { │ 00:19:45 verbose #11724 > > │ exit_code = 0; std_trace_length = 64 } │ 00:19:45 verbose #11725 > > │ __assert_eq / actual: │ 00:19:45 verbose #11726 > > │ "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b" / │ 00:19:45 verbose #11727 > > │ expected: "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b" │ 00:19:45 verbose #11728 > > │ │ 00:19:45 verbose #11729 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:19:45 verbose #11730 > > 00:19:45 verbose #11731 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:19:45 verbose #11732 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:19:45 verbose #11733 > > │ ### sha256' │ 00:19:45 verbose #11734 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:19:45 verbose #11735 > > 00:19:45 verbose #11736 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:19:45 verbose #11737 > > nominal sha256' = 00:19:45 verbose #11738 > > `( 00:19:45 verbose #11739 > > backend_switch `(()) `({}) { 00:19:45 verbose #11740 > > Fsharp = 00:19:45 verbose #11741 > > (fun () => 00:19:45 verbose #11742 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:19:45 verbose #11743 > > Fable.Core.Emit(\"sha2::Sha256\")>]]\n#endif\ntype sha2_Sha256 = class end" 00:19:45 verbose #11744 > > ) : () -> () 00:19:45 verbose #11745 > > } 00:19:45 verbose #11746 > > $'' : $'sha2_Sha256' 00:19:45 verbose #11747 > > ) 00:19:45 verbose #11748 > > 00:19:45 verbose #11749 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:19:45 verbose #11750 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:19:45 verbose #11751 > > │ ### new_sha256 │ 00:19:45 verbose #11752 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:19:45 verbose #11753 > > 00:19:45 verbose #11754 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:19:45 verbose #11755 > > inl new_sha256 () : sha256' = 00:19:45 verbose #11756 > > !\($'"let result : sha2::Sha256 = sha2::Digest::new()"') 00:19:45 verbose #11757 > > !\($'"result"') 00:19:45 verbose #11758 > > 00:19:45 verbose #11759 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:19:45 verbose #11760 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:19:45 verbose #11761 > > │ ### hasher_update │ 00:19:45 verbose #11762 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:19:45 verbose #11763 > > 00:19:45 verbose #11764 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:19:45 verbose #11765 > > inl hasher_update forall el dim. (slice : rust.ref (am'.slice' el dim)) (hasher 00:19:45 verbose #11766 > > : sha256') : () = 00:19:45 verbose #11767 > > !\($'"sha2::Digest::update(&mut !hasher, !slice)"') 00:19:46 verbose #11768 > > 00:19:46 verbose #11769 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:19:46 verbose #11770 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:19:46 verbose #11771 > > │ ### hasher_finalize │ 00:19:46 verbose #11772 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:19:46 verbose #11773 > > 00:19:46 verbose #11774 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:19:46 verbose #11775 > > inl hasher_finalize (hasher : sha256') : rust.ref (am'.slice u8) = 00:19:46 verbose #11776 > > !\($'"&sha2::Digest::finalize(!hasher)"') 00:19:46 verbose #11777 > > 00:19:46 verbose #11778 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:19:46 verbose #11779 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:19:46 verbose #11780 > > │ ### hash_read │ 00:19:46 verbose #11781 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:19:46 verbose #11782 > > 00:19:46 verbose #11783 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:19:46 verbose #11784 > > inl hash_read data : resultm.result' string stream.io_error = 00:19:46 verbose #11785 > > inl reader = data |> stream.new_buf_reader 00:19:46 verbose #11786 > > (!\($'"true; let mut !reader = !reader"') : bool) |> ignore 00:19:46 verbose #11787 > > inl hasher = new_sha256 () 00:19:46 verbose #11788 > > (!\($'"true; let mut !hasher = !hasher"') : bool) |> ignore 00:19:46 verbose #11789 > > 00:19:46 verbose #11790 > > real 00:19:46 verbose #11791 > > inl size = 1024 00:19:46 verbose #11792 > > inl zero = convert `i32 `unativeint 0 00:19:46 verbose #11793 > > inl buffer = am'.new_slice `u8 `@size 0u8 00:19:46 verbose #11794 > > 00:19:46 verbose #11795 > > rust.loop 2 fun () => 00:19:46 verbose #11796 > > inl count = stream.buf_reader_read `u8 `@size buffer reader 00:19:46 verbose #11797 > > inl count = resultm.unwrap' `unativeint `(stream.io_error) count 00:19:46 verbose #11798 > > 00:19:46 verbose #11799 > > if (=.) `unativeint count zero then rust.break () 00:19:46 verbose #11800 > > 00:19:46 verbose #11801 > > hasher_update `u8 `@size 00:19:46 verbose #11802 > > ( 00:19:46 verbose #11803 > > am'.slice_range `u8 `@size 00:19:46 verbose #11804 > > (am'.Start `unativeint zero) 00:19:46 verbose #11805 > > (am'.End `unativeint ((fun _ => count) : unativeint -> 00:19:46 verbose #11806 > > unativeint)) 00:19:46 verbose #11807 > > buffer 00:19:46 verbose #11808 > > ) 00:19:46 verbose #11809 > > hasher 00:19:46 verbose #11810 > > 00:19:46 verbose #11811 > > hasher 00:19:46 verbose #11812 > > |> hasher_finalize 00:19:46 verbose #11813 > > |> am'.slice_to_vec 00:19:46 verbose #11814 > > |> am'.vec_map (sm'.format_hex' >> sm'.from_std_string) 00:19:46 verbose #11815 > > |> am'.from_vec 00:19:46 verbose #11816 > > |> fun x => x : _ i32 _ 00:19:46 verbose #11817 > > |> seq.of_array' 00:19:46 verbose #11818 > > |> sm'.concat (join "") 00:19:46 verbose #11819 > > |> Ok 00:19:46 verbose #11820 > > |> resultm.box 00:19:47 verbose #11821 > > 00:19:47 verbose #11822 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:19:47 verbose #11823 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:19:47 verbose #11824 > > │ ### get_file_hash │ 00:19:47 verbose #11825 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:19:47 verbose #11826 > > 00:19:47 verbose #11827 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:19:47 verbose #11828 > > inl get_file_hash (path : string) = 00:19:47 verbose #11829 > > inl path = path |> file_system.normalize_path 00:19:47 verbose #11830 > > inl file = path |> file_system.file_open |> resultm.unwrap' 00:19:47 verbose #11831 > > inl reader = file |> stream.new_buf_reader 00:19:47 verbose #11832 > > reader 00:19:47 verbose #11833 > > |> hash_read 00:19:47 verbose #11834 > > 00:19:47 verbose #11835 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:19:47 verbose #11836 > > //// test 00:19:47 verbose #11837 > > ///! rust -d chrono regex sha2 00:19:47 verbose #11838 > > 00:19:47 verbose #11839 > > inl file_name = join "test.txt" 00:19:47 verbose #11840 > > inl text = "\n" 00:19:47 verbose #11841 > > 00:19:47 verbose #11842 > > inl temp_dir, disposable = 00:19:47 verbose #11843 > > (file_name, text) 00:19:47 verbose #11844 > > |> sm'.format_debug 00:19:47 verbose #11845 > > |> crypto.hash_text 00:19:47 verbose #11846 > > |> file_system.create_temp_dir' 00:19:47 verbose #11847 > > 00:19:47 verbose #11848 > > inl path = temp_dir </> file_name 00:19:47 verbose #11849 > > text |> file_system.write_all_text path 00:19:47 verbose #11850 > > 00:19:47 verbose #11851 > > path 00:19:47 verbose #11852 > > |> get_file_hash 00:19:47 verbose #11853 > > |> resultm.unwrap' 00:19:47 verbose #11854 > > |> _assert_eq "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b" 00:19:47 verbose #11855 > > disposable |> use |> ignore 00:20:12 verbose #11856 > > 00:20:12 verbose #11857 > > ╭─[ 24.79s - return value ]────────────────────────────────────────────────────╮ 00:20:12 verbose #11858 > > │ 00:00:00 verbose #1 file_system.create_dir / { dir = │ 00:20:12 verbose #11859 > > │ C:\Users\i574n\AppData\Local\Temp\!create_temp_path_\spiral_builder_18f88cf7 │ 00:20:12 verbose #11860 > > │ 8a44f6441f9c726266414a01eb744a65d637a85d5534e8f3100c5594\ba0aa16a-6c5a-be3f- │ 00:20:12 verbose #11861 > > │ b526-70110c680e36 } │ 00:20:12 verbose #11862 > > │ __assert_eq / actual: │ 00:20:12 verbose #11863 > > │ "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b" / │ 00:20:12 verbose #11864 > > │ expected: "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b" │ 00:20:12 verbose #11865 > > │ │ 00:20:12 verbose #11866 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:20:12 verbose #11867 > > 00:20:12 verbose #11868 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:20:12 verbose #11869 > > //// test 00:20:12 verbose #11870 > > ///! rust -d chrono regex sha2 00:20:12 verbose #11871 > > 00:20:12 verbose #11872 > > inl file_name = join "test.txt" 00:20:12 verbose #11873 > > inl text = "" 00:20:12 verbose #11874 > > 00:20:12 verbose #11875 > > inl temp_dir, disposable = 00:20:12 verbose #11876 > > (file_name, text) 00:20:12 verbose #11877 > > |> sm'.format_debug 00:20:12 verbose #11878 > > |> crypto.hash_text 00:20:12 verbose #11879 > > |> file_system.create_temp_dir' 00:20:12 verbose #11880 > > 00:20:12 verbose #11881 > > inl path = temp_dir </> file_name 00:20:12 verbose #11882 > > text |> file_system.write_all_text path 00:20:12 verbose #11883 > > path 00:20:12 verbose #11884 > > |> get_file_hash 00:20:12 verbose #11885 > > |> resultm.unwrap' 00:20:12 verbose #11886 > > |> _assert_eq "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" 00:20:12 verbose #11887 > > disposable |> use |> ignore 00:20:48 verbose #11888 > > 00:20:48 verbose #11889 > > ╭─[ 35.48s - return value ]────────────────────────────────────────────────────╮ 00:20:48 verbose #11890 > > │ 00:00:00 verbose #1 file_system.create_dir / { dir = │ 00:20:48 verbose #11891 > > │ C:\Users\i574n\AppData\Local\Temp\!create_temp_path_\spiral_builder_86c2ba01 │ 00:20:48 verbose #11892 > > │ 37b668bb3d717a1e91800cd3a7b579eb8e12a6cecb95399b90a9bb84\c0e26dac-4cb1-4b09- │ 00:20:48 verbose #11893 > > │ be07-ff616700f056 } │ 00:20:48 verbose #11894 > > │ __assert_eq / actual: │ 00:20:48 verbose #11895 > > │ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" / │ 00:20:48 verbose #11896 > > │ expected: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" │ 00:20:48 verbose #11897 > > │ │ 00:20:48 verbose #11898 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:20:48 verbose #11899 > > 00:20:48 verbose #11900 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:20:48 verbose #11901 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:20:48 verbose #11902 > > │ ## typescript │ 00:20:48 verbose #11903 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:20:48 verbose #11904 > > 00:20:48 verbose #11905 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:20:48 verbose #11906 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:20:48 verbose #11907 > > │ ### create_hash │ 00:20:48 verbose #11908 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:20:48 verbose #11909 > > 00:20:48 verbose #11910 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:20:48 verbose #11911 > > inl create_hash (x : string) : any = 00:20:48 verbose #11912 > > open typescript_operators 00:20:48 verbose #11913 > > global "type ICryptoCreateHash = abstract createHash: x: string -> obj" 00:20:48 verbose #11914 > > inl crypto : $'ICryptoCreateHash' = typescript.import_all "crypto" 00:20:48 verbose #11915 > > !\\(x, $'"!crypto.createHash($0)"') 00:20:48 verbose #11916 > > 00:20:48 verbose #11917 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:20:48 verbose #11918 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:20:48 verbose #11919 > > │ ### hash_update │ 00:20:48 verbose #11920 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:20:48 verbose #11921 > > 00:20:48 verbose #11922 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:20:48 verbose #11923 > > inl hash_update (s : string) (x : any) : any = 00:20:48 verbose #11924 > > open typescript_operators 00:20:48 verbose #11925 > > !\\((x, s), $'"$0.update($1, \'utf8\')"') 00:20:48 verbose #11926 > > 00:20:48 verbose #11927 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:20:48 verbose #11928 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:20:48 verbose #11929 > > │ ### hash_digest │ 00:20:48 verbose #11930 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:20:48 verbose #11931 > > 00:20:48 verbose #11932 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:20:48 verbose #11933 > > inl hash_digest (s : string) (x : any) : string = 00:20:48 verbose #11934 > > open typescript_operators 00:20:48 verbose #11935 > > !\\((x, s), $'"$0.digest($1)"') 00:20:49 verbose #11936 > > 00:20:49 verbose #11937 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:20:49 verbose #11938 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:20:49 verbose #11939 > > │ ## python │ 00:20:49 verbose #11940 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:20:49 verbose #11941 > > 00:20:49 verbose #11942 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:20:49 verbose #11943 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:20:49 verbose #11944 > > │ ### py_sha256 │ 00:20:49 verbose #11945 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:20:49 verbose #11946 > > 00:20:49 verbose #11947 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:20:49 verbose #11948 > > nominal py_sha256 = any 00:20:49 verbose #11949 > > 00:20:49 verbose #11950 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:20:49 verbose #11951 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:20:49 verbose #11952 > > │ ### hashlib_sha256 │ 00:20:49 verbose #11953 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:20:49 verbose #11954 > > 00:20:49 verbose #11955 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:20:49 verbose #11956 > > inl hashlib_sha256 () : py_sha256 = 00:20:49 verbose #11957 > > backend_switch { 00:20:49 verbose #11958 > > Fsharp = fun () => 00:20:49 verbose #11959 > > open python_operators 00:20:49 verbose #11960 > > global "type IHashlibSha256 = abstract sha256: x: unit -> obj" 00:20:49 verbose #11961 > > inl hashlib : $'IHashlibSha256' = python.import_all "hashlib" 00:20:49 verbose #11962 > > !\($'"!hashlib.sha256()"') : py_sha256 00:20:49 verbose #11963 > > Python = fun () => 00:20:49 verbose #11964 > > global "import hashlib" 00:20:49 verbose #11965 > > $'hashlib.sha256()' : py_sha256 00:20:49 verbose #11966 > > } 00:20:50 verbose #11967 > > 00:20:50 verbose #11968 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:20:50 verbose #11969 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:20:50 verbose #11970 > > │ ### sha256_update │ 00:20:50 verbose #11971 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:20:50 verbose #11972 > > 00:20:50 verbose #11973 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:20:50 verbose #11974 > > inl sha256_update (x : string) (sha256 : py_sha256) : py_sha256 = 00:20:50 verbose #11975 > > backend_switch { 00:20:50 verbose #11976 > > Fsharp = fun () => 00:20:50 verbose #11977 > > open python_operators 00:20:50 verbose #11978 > > !\\(x, $'"!sha256.update($0)"') : () 00:20:50 verbose #11979 > > Python = fun () => 00:20:50 verbose #11980 > > $'!sha256.update(!x)' : () 00:20:50 verbose #11981 > > } 00:20:50 verbose #11982 > > sha256 00:20:50 verbose #11983 > > 00:20:50 verbose #11984 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:20:50 verbose #11985 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:20:50 verbose #11986 > > │ ### sha256_hexdigest │ 00:20:50 verbose #11987 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:20:50 verbose #11988 > > 00:20:50 verbose #11989 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:20:50 verbose #11990 > > inl sha256_hexdigest (sha256 : py_sha256) : string = 00:20:50 verbose #11991 > > backend_switch { 00:20:50 verbose #11992 > > Fsharp = fun () => 00:20:50 verbose #11993 > > open python_operators 00:20:50 verbose #11994 > > !\($'"!sha256.hexdigest()"') : string 00:20:50 verbose #11995 > > Python = fun () => 00:20:50 verbose #11996 > > $'!sha256.hexdigest()' : string 00:20:50 verbose #11997 > > } 00:20:50 verbose #11998 > > 00:20:50 verbose #11999 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:20:50 verbose #12000 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:20:50 verbose #12001 > > │ ## crypto │ 00:20:50 verbose #12002 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:20:50 verbose #12003 > > 00:20:50 verbose #12004 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:20:50 verbose #12005 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:20:50 verbose #12006 > > │ ### hash_text │ 00:20:50 verbose #12007 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:20:50 verbose #12008 > > 00:20:50 verbose #12009 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:20:50 verbose #12010 > > let hash_text (~input : string) = 00:20:50 verbose #12011 > > run_target function 00:20:50 verbose #12012 > > | Fsharp (Native) => fun () => 00:20:50 verbose #12013 > > inl sha256 = sha256 () |> use 00:20:50 verbose #12014 > > input 00:20:50 verbose #12015 > > |> sm'.utf8_get_bytes 00:20:50 verbose #12016 > > |> sha256_compute_hash sha256 00:20:50 verbose #12017 > > |> am.map (sm'.byte_to_string "x2") 00:20:50 verbose #12018 > > |> seq.of_array' 00:20:50 verbose #12019 > > |> sm'.concat (join "") 00:20:50 verbose #12020 > > | TypeScript (Native) => fun () => 00:20:50 verbose #12021 > > create_hash "sha256" 00:20:50 verbose #12022 > > |> hash_update input 00:20:50 verbose #12023 > > |> hash_digest "hex" 00:20:50 verbose #12024 > > | Rust (Native) => fun () => 00:20:50 verbose #12025 > > input 00:20:50 verbose #12026 > > |> sm'.utf8_get_bytes 00:20:50 verbose #12027 > > |> fun (a x) => x 00:20:50 verbose #12028 > > |> am'.to_vec 00:20:50 verbose #12029 > > |> stream.new_cursor 00:20:50 verbose #12030 > > |> hash_read 00:20:50 verbose #12031 > > |> resultm.unwrap' 00:20:50 verbose #12032 > > | Python (Native) | Cuda (Native) => fun () => 00:20:50 verbose #12033 > > hashlib_sha256 () 00:20:50 verbose #12034 > > |> sha256_update (input |> sm'.encode_utf8) 00:20:50 verbose #12035 > > |> sha256_hexdigest 00:20:50 verbose #12036 > > | _ => fun () => null () 00:20:51 verbose #12037 > > 00:20:51 verbose #12038 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:20:51 verbose #12039 > > //// test 00:20:51 verbose #12040 > > ///! fsharp 00:20:51 verbose #12041 > > ///! cuda 00:20:51 verbose #12042 > > ///! rust -d sha2 00:20:51 verbose #12043 > > ///! typescript 00:20:51 verbose #12044 > > ///! python 00:20:51 verbose #12045 > > 00:20:51 verbose #12046 > > "\n" 00:20:51 verbose #12047 > > |> hash_text 00:20:51 verbose #12048 > > |> _assert_eq "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b" 00:20:51 verbose #12049 > > 00:20:51 verbose #12050 > > "" 00:20:51 verbose #12051 > > |> hash_text 00:20:51 verbose #12052 > > |> _assert_eq "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" 00:21:14 verbose #12053 > > 00:21:14 verbose #12054 > > ╭─[ 23.30s - return value ]────────────────────────────────────────────────────╮ 00:21:14 verbose #12055 > > │ │ 00:21:14 verbose #12056 > > │ .py output (Cuda): │ 00:21:14 verbose #12057 > > │ __assert_eq / actual: │ 00:21:14 verbose #12058 > > │ 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b / expected: │ 00:21:14 verbose #12059 > > │ 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b │ 00:21:14 verbose #12060 > > │ __assert_eq / actual: │ 00:21:14 verbose #12061 > > │ e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 / expected: │ 00:21:14 verbose #12062 > > │ e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 │ 00:21:14 verbose #12063 > > │ │ 00:21:14 verbose #12064 > > │ │ 00:21:14 verbose #12065 > > │ .rs output (rust -d sha2): │ 00:21:14 verbose #12066 > > │ __assert_eq / actual: │ 00:21:14 verbose #12067 > > │ "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b" / │ 00:21:14 verbose #12068 > > │ expected: "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b" │ 00:21:14 verbose #12069 > > │ __assert_eq / actual: │ 00:21:14 verbose #12070 > > │ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" / │ 00:21:14 verbose #12071 > > │ expected: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" │ 00:21:14 verbose #12072 > > │ │ 00:21:14 verbose #12073 > > │ │ 00:21:14 verbose #12074 > > │ .ts output: │ 00:21:14 verbose #12075 > > │ __assert_eq / actual: │ 00:21:14 verbose #12076 > > │ 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b / expected: │ 00:21:14 verbose #12077 > > │ 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b │ 00:21:14 verbose #12078 > > │ __assert_eq / actual: │ 00:21:14 verbose #12079 > > │ e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 / expected: │ 00:21:14 verbose #12080 > > │ e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 │ 00:21:14 verbose #12081 > > │ │ 00:21:14 verbose #12082 > > │ │ 00:21:14 verbose #12083 > > │ .py output: │ 00:21:14 verbose #12084 > > │ __assert_eq / actual: │ 00:21:14 verbose #12085 > > │ 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b / expected: │ 00:21:14 verbose #12086 > > │ 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b │ 00:21:14 verbose #12087 > > │ __assert_eq / actual: │ 00:21:14 verbose #12088 > > │ e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 / expected: │ 00:21:14 verbose #12089 > > │ e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 │ 00:21:14 verbose #12090 > > │ │ 00:21:14 verbose #12091 > > │ │ 00:21:14 verbose #12092 > > │ │ 00:21:14 verbose #12093 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:21:14 verbose #12094 > > 00:21:14 verbose #12095 > > ╭─[ 23.30s - stdout ]──────────────────────────────────────────────────────────╮ 00:21:14 verbose #12096 > > │ .fsx output: │ 00:21:14 verbose #12097 > > │ __assert_eq / actual: │ 00:21:14 verbose #12098 > > │ "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b" / │ 00:21:14 verbose #12099 > > │ expected: "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b" │ 00:21:14 verbose #12100 > > │ __assert_eq / actual: │ 00:21:14 verbose #12101 > > │ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" / │ 00:21:14 verbose #12102 > > │ expected: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" │ 00:21:14 verbose #12103 > > │ │ 00:21:14 verbose #12104 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:21:14 verbose #12105 > > 00:21:14 verbose #12106 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:21:14 verbose #12107 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:21:14 verbose #12108 > > │ ### hash_to_port │ 00:21:14 verbose #12109 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:21:14 verbose #12110 > > 00:21:14 verbose #12111 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:21:14 verbose #12112 > > inl hash_to_port (text : string) : u16 = 00:21:14 verbose #12113 > > inl first_letter_code = text |> sm'.index 0i32 |> i32 00:21:14 verbose #12114 > > inl hash_part = text |> sm'.slice 0i32 7 00:21:14 verbose #12115 > > inl combined_value = convert_i32_base 16 hash_part + first_letter_code |> 00:21:14 verbose #12116 > > u16 00:21:14 verbose #12117 > > trace Verbose 00:21:14 verbose #12118 > > fun () => "crypto.hash_to_port" 00:21:14 verbose #12119 > > fun () => { first_letter_code hash_part combined_value } 00:21:14 verbose #12120 > > combined_value % 48128 + 1024 00:21:15 verbose #12121 > > 00:21:15 verbose #12122 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:21:15 verbose #12123 > > //// test 00:21:15 verbose #12124 > > ///! fsharp 00:21:15 verbose #12125 > > ////! cuda // Only stack allocated primitive types (i8,i16,i32,i64 and 00:21:15 verbose #12126 > > u8,u16,u32,u64 and f32,f64 and bool) are allowed in CuPy arrays. 00:21:15 verbose #12127 > > ///! rust -d sha2 00:21:15 verbose #12128 > > ///! typescript 00:21:15 verbose #12129 > > ///! python 00:21:15 verbose #12130 > > 00:21:15 verbose #12131 > > "\n" 00:21:15 verbose #12132 > > |> hash_text 00:21:15 verbose #12133 > > |> hash_to_port 00:21:15 verbose #12134 > > |> _assert_eq 19273 00:21:58 verbose #12135 > > 00:21:58 verbose #12136 > > ╭─[ 43.38s - return value ]────────────────────────────────────────────────────╮ 00:21:58 verbose #12137 > > │ │ 00:21:58 verbose #12138 > > │ .rs output (rust -d sha2): │ 00:21:58 verbose #12139 > > │ 00:00:00 verbose #1 crypto.hash_to_port / { first_letter_code = 48; │ 00:21:58 verbose #12140 > > │ hash_part = 01ba4719; combined_value = 18249 } │ 00:21:58 verbose #12141 > > │ __assert_eq / actual: 19273 / expected: 19273 │ 00:21:58 verbose #12142 > > │ │ 00:21:58 verbose #12143 > > │ │ 00:21:58 verbose #12144 > > │ .ts output: │ 00:21:58 verbose #12145 > > │ 00:00:00 verbose #1 crypto.hash_to_port / { first_letter_code = 48; │ 00:21:58 verbose #12146 > > │ hash_part = 01ba4719; combined_value = 18249 } │ 00:21:58 verbose #12147 > > │ __assert_eq / actual: 19273 / expected: 19273 │ 00:21:58 verbose #12148 > > │ │ 00:21:58 verbose #12149 > > │ │ 00:21:58 verbose #12150 > > │ .py output: │ 00:21:58 verbose #12151 > > │ 00:00:00 verbose #1 crypto.hash_to_port / { first_letter_code = 48; │ 00:21:58 verbose #12152 > > │ hash_part = 01ba4719; combined_value = 18249 } │ 00:21:58 verbose #12153 > > │ __assert_eq / actual: 19273 / expected: 19273 │ 00:21:58 verbose #12154 > > │ │ 00:21:58 verbose #12155 > > │ │ 00:21:58 verbose #12156 > > │ │ 00:21:58 verbose #12157 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:21:58 verbose #12158 > > 00:21:58 verbose #12159 > > ╭─[ 43.38s - stdout ]──────────────────────────────────────────────────────────╮ 00:21:58 verbose #12160 > > │ .fsx output: │ 00:21:58 verbose #12161 > > │ 00:00:00 verbose #1 crypto.hash_to_port / { first_letter_code = 48; │ 00:21:58 verbose #12162 > > │ hash_part = 01ba4719; combined_value = 18249 } │ 00:21:58 verbose #12163 > > │ __assert_eq / actual: 19273us / expected: 19273us │ 00:21:58 verbose #12164 > > │ │ 00:21:58 verbose #12165 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:21:58 verbose #12166 > > 00:21:58 verbose #12167 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:21:58 verbose #12168 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:21:58 verbose #12169 > > │ ## main │ 00:21:58 verbose #12170 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:21:58 verbose #12171 > > 00:21:58 verbose #12172 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:21:58 verbose #12173 > > inl main () = 00:21:58 verbose #12174 > > $'let hash_text x = !hash_text x' : () 00:21:58 verbose #12175 > > $'let hash_to_port x = !hash_to_port x' : () 00:21:59 verbose #12176 > 00:03:05 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 29996 } 00:21:59 verbose #12177 > 00:03:05 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:21:59 verbose #12178 > "nbconvert", 00:21:59 verbose #12179 > "c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb", 00:21:59 verbose #12180 > "--to", 00:21:59 verbose #12181 > "html", 00:21:59 verbose #12182 > "--HTMLExporter.theme=dark", 00:21:59 verbose #12183 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:22:01 verbose #12184 > 00:03:07 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb to html 00:22:01 verbose #12185 > 00:03:07 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:22:01 verbose #12186 > 00:03:07 verbose #7 ! validate(nb) 00:22:03 verbose #12187 > 00:03:09 verbose #8 ! [NbConvertApp] Writing 341022 bytes to c:\home\git\polyglot\lib\spiral\crypto.dib.html 00:22:03 verbose #12188 > 00:03:09 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 643 } 00:22:03 verbose #12189 > 00:03:09 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 643 } 00:22:03 verbose #12190 > 00:03:09 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:22:03 verbose #12191 > "-c", 00:22:03 verbose #12192 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/crypto.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:22:03 verbose #12193 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/crypto.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:22:03 verbose #12194 > 00:03:09 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:22:03 verbose #12195 > 00:03:09 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:22:03 verbose #12196 > 00:03:09 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 30698 } 00:22:03 debug #12197 runtime.execute_with_options_async / { exit_code = 0; output_length = 34562 } 00:22:03 debug #13 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path crypto.dib --retries 3 00:22:03 debug #12198 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path common.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:22:03 verbose #12199 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "common.dib", "--retries", "3"])) } 00:22:03 verbose #12200 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:22:03 verbose #12201 > "repl", 00:22:03 verbose #12202 > "--exit-after-run", 00:22:03 verbose #12203 > "--run", 00:22:03 verbose #12204 > "c:/home/git/polyglot/lib/spiral/common.dib", 00:22:03 verbose #12205 > "--output-path", 00:22:03 verbose #12206 > "c:/home/git/polyglot/lib/spiral/common.dib.ipynb", 00:22:03 verbose #12207 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/common.dib" --output-path "c:/home/git/polyglot/lib/spiral/common.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:22:05 verbose #12208 > > 00:22:05 verbose #12209 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:22:05 verbose #12210 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:22:05 verbose #12211 > > │ # common │ 00:22:05 verbose #12212 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:22:09 verbose #12213 > > 00:22:09 verbose #12214 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:22:09 verbose #12215 > > //// test 00:22:09 verbose #12216 > > 00:22:09 verbose #12217 > > open testing 00:22:10 verbose #12218 > > 00:22:10 verbose #12219 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:22:10 verbose #12220 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:22:10 verbose #12221 > > │ ## common │ 00:22:10 verbose #12222 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:22:10 verbose #12223 > > 00:22:10 verbose #12224 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:22:10 verbose #12225 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:22:10 verbose #12226 > > │ ### (:>) │ 00:22:10 verbose #12227 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:22:10 verbose #12228 > > 00:22:10 verbose #12229 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:22:10 verbose #12230 > > prototype (~:>) r : forall t. t -> r 00:22:11 verbose #12231 > > 00:22:11 verbose #12232 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:22:11 verbose #12233 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:22:11 verbose #12234 > > │ ### to_any │ 00:22:11 verbose #12235 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:22:11 verbose #12236 > > 00:22:11 verbose #12237 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:22:11 verbose #12238 > > inl to_any forall t. (obj : t) : any = 00:22:11 verbose #12239 > > $'!obj ' 00:22:11 verbose #12240 > > 00:22:11 verbose #12241 > > instance (~:>) any = to_any 00:22:11 verbose #12242 > > 00:22:11 verbose #12243 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:22:11 verbose #12244 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:22:11 verbose #12245 > > │ ### (||>) │ 00:22:11 verbose #12246 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:22:11 verbose #12247 > > 00:22:11 verbose #12248 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:22:11 verbose #12249 > > //// test 00:22:11 verbose #12250 > > ///! fsharp 00:22:11 verbose #12251 > > ///! cuda 00:22:11 verbose #12252 > > ///! rust 00:22:11 verbose #12253 > > ///! typescript 00:22:11 verbose #12254 > > ///! python 00:22:11 verbose #12255 > > 00:22:11 verbose #12256 > > (3i32, 2i32) 00:22:11 verbose #12257 > > ||> fun a b => a - b 00:22:11 verbose #12258 > > |> _assert_eq 1 00:22:29 verbose #12259 > > 00:22:29 verbose #12260 > > ╭─[ 18.00s - return value ]────────────────────────────────────────────────────╮ 00:22:29 verbose #12261 > > │ .py output (Cuda): │ 00:22:29 verbose #12262 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:22:29 verbose #12263 > > │ │ 00:22:29 verbose #12264 > > │ .rs output: │ 00:22:29 verbose #12265 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:22:29 verbose #12266 > > │ │ 00:22:29 verbose #12267 > > │ .ts output: │ 00:22:29 verbose #12268 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:22:29 verbose #12269 > > │ │ 00:22:29 verbose #12270 > > │ .py output: │ 00:22:29 verbose #12271 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:22:29 verbose #12272 > > │ │ 00:22:29 verbose #12273 > > │ │ 00:22:29 verbose #12274 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:22:29 verbose #12275 > > 00:22:29 verbose #12276 > > ╭─[ 18.00s - stdout ]──────────────────────────────────────────────────────────╮ 00:22:29 verbose #12277 > > │ .fsx output: │ 00:22:29 verbose #12278 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:22:29 verbose #12279 > > │ │ 00:22:29 verbose #12280 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:22:29 verbose #12281 > > 00:22:29 verbose #12282 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:22:29 verbose #12283 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:22:29 verbose #12284 > > │ ### flip │ 00:22:29 verbose #12285 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:22:29 verbose #12286 > > 00:22:29 verbose #12287 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:22:29 verbose #12288 > > inl flip fn a b = 00:22:29 verbose #12289 > > fn b a 00:22:30 verbose #12290 > > 00:22:30 verbose #12291 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:22:30 verbose #12292 > > //// test 00:22:30 verbose #12293 > > ///! fsharp 00:22:30 verbose #12294 > > ///! cuda 00:22:30 verbose #12295 > > ///! rust 00:22:30 verbose #12296 > > ///! typescript 00:22:30 verbose #12297 > > ///! python 00:22:30 verbose #12298 > > 00:22:30 verbose #12299 > > (1i32, 2i32) 00:22:30 verbose #12300 > > ||> flip pair 00:22:30 verbose #12301 > > |> _assert_eq (2, 1) 00:22:47 verbose #12302 > > 00:22:47 verbose #12303 > > ╭─[ 17.73s - return value ]────────────────────────────────────────────────────╮ 00:22:47 verbose #12304 > > │ .py output (Cuda): │ 00:22:47 verbose #12305 > > │ __assert_eq / actual: (2, 1) / expected: (2, 1) │ 00:22:47 verbose #12306 > > │ │ 00:22:47 verbose #12307 > > │ .rs output: │ 00:22:47 verbose #12308 > > │ __assert_eq / actual: (2, 1) / expected: (2, 1) │ 00:22:47 verbose #12309 > > │ │ 00:22:47 verbose #12310 > > │ .ts output: │ 00:22:47 verbose #12311 > > │ __assert_eq / actual: 2,1 / expected: 2,1 │ 00:22:47 verbose #12312 > > │ │ 00:22:47 verbose #12313 > > │ .py output: │ 00:22:47 verbose #12314 > > │ __assert_eq / actual: (2, 1) / expected: (2, 1) │ 00:22:47 verbose #12315 > > │ │ 00:22:47 verbose #12316 > > │ │ 00:22:47 verbose #12317 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:22:47 verbose #12318 > > 00:22:47 verbose #12319 > > ╭─[ 17.73s - stdout ]──────────────────────────────────────────────────────────╮ 00:22:47 verbose #12320 > > │ .fsx output: │ 00:22:47 verbose #12321 > > │ __assert_eq / actual: struct (2, 1) / expected: struct (2, 1) │ 00:22:47 verbose #12322 > > │ │ 00:22:47 verbose #12323 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:22:47 verbose #12324 > > 00:22:47 verbose #12325 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:22:47 verbose #12326 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:22:47 verbose #12327 > > │ ### join_body │ 00:22:47 verbose #12328 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:22:47 verbose #12329 > > 00:22:47 verbose #12330 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:22:47 verbose #12331 > > inl join_body body acc x = 00:22:47 verbose #12332 > > if var_is x |> not 00:22:47 verbose #12333 > > then body acc x 00:22:47 verbose #12334 > > else 00:22:47 verbose #12335 > > inl acc = dyn acc 00:22:47 verbose #12336 > > join body acc x 00:22:48 verbose #12337 > > 00:22:48 verbose #12338 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:22:48 verbose #12339 > > //// test 00:22:48 verbose #12340 > > 00:22:48 verbose #12341 > > inl rec fold_list f s = function 00:22:48 verbose #12342 > > | Cons (x, x') => fold_list f (f s x) x' 00:22:48 verbose #12343 > > | Nil => s 00:22:48 verbose #12344 > > 00:22:48 verbose #12345 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:22:48 verbose #12346 > > //// test 00:22:48 verbose #12347 > > ///! fsharp 00:22:48 verbose #12348 > > ///! cuda 00:22:48 verbose #12349 > > ///! rust 00:22:48 verbose #12350 > > ///! typescript 00:22:48 verbose #12351 > > ///! python 00:22:48 verbose #12352 > > //// print_code=true 00:22:48 verbose #12353 > > 00:22:48 verbose #12354 > > [[ 5i32; 4; join 3; 2; 1 ]] 00:22:48 verbose #12355 > > |> fold_list (+) 0 00:22:48 verbose #12356 > > |> _assert_eq 15 00:23:06 verbose #12357 > > 00:23:06 verbose #12358 > > ╭─[ 17.78s - return value ]────────────────────────────────────────────────────╮ 00:23:06 verbose #12359 > > │ .py output (Cuda): │ 00:23:06 verbose #12360 > > │ __assert_eq / actual: 15 / expected: 15 │ 00:23:06 verbose #12361 > > │ │ 00:23:06 verbose #12362 > > │ .rs output: │ 00:23:06 verbose #12363 > > │ __assert_eq / actual: 15 / expected: 15 │ 00:23:06 verbose #12364 > > │ │ 00:23:06 verbose #12365 > > │ .ts output: │ 00:23:06 verbose #12366 > > │ __assert_eq / actual: 15 / expected: 15 │ 00:23:06 verbose #12367 > > │ │ 00:23:06 verbose #12368 > > │ .py output: │ 00:23:06 verbose #12369 > > │ __assert_eq / actual: 15 / expected: 15 │ 00:23:06 verbose #12370 > > │ │ 00:23:06 verbose #12371 > > │ │ 00:23:06 verbose #12372 > > │ │ 00:23:06 verbose #12373 > > │ │ 00:23:06 verbose #12374 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:23:06 verbose #12375 > > 00:23:06 verbose #12376 > > ╭─[ 17.78s - stdout ]──────────────────────────────────────────────────────────╮ 00:23:06 verbose #12377 > > │ .fsx: │ 00:23:06 verbose #12378 > > │ let rec method1 () : int32 = │ 00:23:06 verbose #12379 > > │ 3 │ 00:23:06 verbose #12380 > > │ and method2 (v0 : bool) : bool = │ 00:23:06 verbose #12381 > > │ v0 │ 00:23:06 verbose #12382 > > │ and closure0 (v0 : string) () : unit = │ 00:23:06 verbose #12383 > > │ let v1 : (string -> unit) = System.Console.WriteLine │ 00:23:06 verbose #12384 > > │ v1 v0 │ 00:23:06 verbose #12385 > > │ and method0 () : unit = │ 00:23:06 verbose #12386 > > │ let v0 : int32 = method1() │ 00:23:06 verbose #12387 > > │ let v1 : int32 = 9 + v0 │ 00:23:06 verbose #12388 > > │ let v2 : int32 = v1 + 2 │ 00:23:06 verbose #12389 > > │ let v3 : int32 = v2 + 1 │ 00:23:06 verbose #12390 > > │ let v4 : bool = v3 = 15 │ 00:23:06 verbose #12391 > > │ let v6 : bool = │ 00:23:06 verbose #12392 > > │ if v4 then │ 00:23:06 verbose #12393 > > │ true │ 00:23:06 verbose #12394 > > │ else │ 00:23:06 verbose #12395 > > │ method2(v4) │ 00:23:06 verbose #12396 > > │ let v7 : string = "__assert_eq" │ 00:23:06 verbose #12397 > > │ let v8 : string = $"{v7} / actual: %A{v3} / expected: %A{15}" │ 00:23:06 verbose #12398 > > │ let v11 : unit = () │ 00:23:06 verbose #12399 > > │ let v12 : (unit -> unit) = closure0(v8) │ 00:23:06 verbose #12400 > > │ let v13 : unit = (fun () -> v12 (); v11) () │ 00:23:06 verbose #12401 > > │ let v15 : bool = v6 = false │ 00:23:06 verbose #12402 > > │ if v15 then │ 00:23:06 verbose #12403 > > │ failwith<unit> v8 │ 00:23:06 verbose #12404 > > │ method0() │ 00:23:06 verbose #12405 > > │ │ 00:23:06 verbose #12406 > > │ │ 00:23:06 verbose #12407 > > │ .rs: │ 00:23:06 verbose #12408 > > │ #![allow(dead_code)] │ 00:23:06 verbose #12409 > > │ #![allow(non_camel_case_types)] │ 00:23:06 verbose #12410 > > │ #![allow(non_snake_case)] │ 00:23:06 verbose #12411 > > │ #![allow(non_upper_case_globals)] │ 00:23:06 verbose #12412 > > │ #![allow(unreachable_code)] │ 00:23:06 verbose #12413 > > │ #![allow(unused_attributes)] │ 00:23:06 verbose #12414 > > │ #![allow(unused_imports)] │ 00:23:06 verbose #12415 > > │ #![allow(unused_macros)] │ 00:23:06 verbose #12416 > > │ #![allow(unused_parens)] │ 00:23:06 verbose #12417 > > │ #![allow(unused_variables)] │ 00:23:06 verbose #12418 > > │ mod module_5170bee5 { │ 00:23:06 verbose #12419 > > │ pub mod Spiral_builder { │ 00:23:06 verbose #12420 > > │ use super::*; │ 00:23:06 verbose #12421 > > │ use fable_library_rust::Native_::on_startup; │ 00:23:06 verbose #12422 > > │ use fable_library_rust::String_::printfn; │ 00:23:06 verbose #12423 > > │ use fable_library_rust::String_::sprintf; │ 00:23:06 verbose #12424 > > │ use fable_library_rust::String_::string; │ 00:23:06 verbose #12425 > > │ pub fn method1() -> i32 { │ 00:23:06 verbose #12426 > > │ 3_i32 │ 00:23:06 verbose #12427 > > │ } │ 00:23:06 verbose #12428 > > │ pub fn method2(v0: bool) -> bool { │ 00:23:06 verbose #12429 > > │ v0 │ 00:23:06 verbose #12430 > > │ } │ 00:23:06 verbose #12431 > > │ pub fn closure0(v0: string, unitVar: ()) { │ 00:23:06 verbose #12432 > > │ printfn!("{0}", v0); │ 00:23:06 verbose #12433 > > │ } │ 00:23:06 verbose #12434 > > │ pub fn method0() { │ 00:23:06 verbose #12435 > > │ let v3: i32 = 9_i32 + Spiral_builder::method1() + 2_i32 + 1_i32; │ 00:23:06 verbose #12436 > > │ let v4: bool = v3 == 15_i32; │ 00:23:06 verbose #12437 > > │ let v6: bool = if v4 { │ 00:23:06 verbose #12438 > > │ true │ 00:23:06 verbose #12439 > > │ } else { │ 00:23:06 verbose #12440 > > │ Spiral_builder::method2(v4) │ 00:23:06 verbose #12441 > > │ }; │ 00:23:06 verbose #12442 > > │ let v8: string = sprintf!( │ 00:23:06 verbose #12443 > > │ "{} / actual: {:?} / expected: {:?}", │ 00:23:06 verbose #12444 > > │ string("__assert_eq"), │ 00:23:06 verbose #12445 > > │ v3, │ 00:23:06 verbose #12446 > > │ 15_i32 │ 00:23:06 verbose #12447 > > │ ); │ 00:23:06 verbose #12448 > > │ let v13: () = { │ 00:23:06 verbose #12449 > > │ Spiral_builder::closure0(v8.clone(), ()); │ 00:23:06 verbose #12450 > > │ () │ 00:23:06 verbose #12451 > > │ }; │ 00:23:06 verbose #12452 > > │ if v6 == false { │ 00:23:06 verbose #12453 > > │ panic!("{}", v8,); │ 00:23:06 verbose #12454 > > │ } │ 00:23:06 verbose #12455 > > │ } │ 00:23:06 verbose #12456 > > │ on_startup!(Spiral_builder::method0()); │ 00:23:06 verbose #12457 > > │ } │ 00:23:06 verbose #12458 > > │ } │ 00:23:06 verbose #12459 > > │ pub use module_5170bee5::*; │ 00:23:06 verbose #12460 > > │ │ 00:23:06 verbose #12461 > > │ .ts: │ 00:23:06 verbose #12462 > > │ import { int32 } from "./fable_modules/fable-library-ts.4.21.0/Int32.js"; │ 00:23:06 verbose #12463 > > │ import { interpolate, toText } from │ 00:23:06 verbose #12464 > > │ "./fable_modules/fable-library-ts.4.21.0/String.js"; │ 00:23:06 verbose #12465 > > │ │ 00:23:06 verbose #12466 > > │ export function method1(): int32 { │ 00:23:06 verbose #12467 > > │ return 3; │ 00:23:06 verbose #12468 > > │ } │ 00:23:06 verbose #12469 > > │ │ 00:23:06 verbose #12470 > > │ export function method2(v0: boolean): boolean { │ 00:23:06 verbose #12471 > > │ return v0; │ 00:23:06 verbose #12472 > > │ } │ 00:23:06 verbose #12473 > > │ │ 00:23:06 verbose #12474 > > │ export function closure0(v0: string, unitVar: void): void { │ 00:23:06 verbose #12475 > > │ console.log(v0); │ 00:23:06 verbose #12476 > > │ } │ 00:23:06 verbose #12477 > > │ │ 00:23:06 verbose #12478 > > │ export function method0(): void { │ 00:23:06 verbose #12479 > > │ const v3: int32 = (((9 + method1()) + 2) + 1) | 0; │ 00:23:06 verbose #12480 > > │ const v4: boolean = v3 === 15; │ 00:23:06 verbose #12481 > > │ const v6: boolean = v4 ? true : method2(v4); │ 00:23:06 verbose #12482 > > │ const v8: string = toText(interpolate("%P() / actual: %A%P() / expected: │ 00:23:06 verbose #12483 > > │ %A%P()", ["__assert_eq", v3, 15])); │ 00:23:06 verbose #12484 > > │ let v13: any; │ 00:23:06 verbose #12485 > > │ closure0(v8, undefined); │ 00:23:06 verbose #12486 > > │ v13 = undefined; │ 00:23:06 verbose #12487 > > │ if (v6 === false) { │ 00:23:06 verbose #12488 > > │ throw new Error(v8); │ 00:23:06 verbose #12489 > > │ } │ 00:23:06 verbose #12490 > > │ } │ 00:23:06 verbose #12491 > > │ │ 00:23:06 verbose #12492 > > │ method0(); │ 00:23:06 verbose #12493 > > │ │ 00:23:06 verbose #12494 > > │ │ 00:23:06 verbose #12495 > > │ │ 00:23:06 verbose #12496 > > │ // spiral_builder.process_typescript │ 00:23:06 verbose #12497 > > │ │ 00:23:06 verbose #12498 > > │ .py: │ 00:23:06 verbose #12499 > > │ from fable_modules.fable_library.string_ import (to_text, interpolate) │ 00:23:06 verbose #12500 > > │ │ 00:23:06 verbose #12501 > > │ def method1(__unit: None=None) -> int: │ 00:23:06 verbose #12502 > > │ return 3 │ 00:23:06 verbose #12503 > > │ │ 00:23:06 verbose #12504 > > │ │ 00:23:06 verbose #12505 > > │ def method2(v0: bool) -> bool: │ 00:23:06 verbose #12506 > > │ return v0 │ 00:23:06 verbose #12507 > > │ │ 00:23:06 verbose #12508 > > │ │ 00:23:06 verbose #12509 > > │ def closure0(v0: str, unit_var: None) -> None: │ 00:23:06 verbose #12510 > > │ print(v0) │ 00:23:06 verbose #12511 > > │ │ 00:23:06 verbose #12512 > > │ │ 00:23:06 verbose #12513 > > │ def method0(__unit: None=None) -> None: │ 00:23:06 verbose #12514 > > │ v3: int = (((9 + method1()) + 2) + 1) or 0 │ 00:23:06 verbose #12515 > > │ v4: bool = v3 == 15 │ 00:23:06 verbose #12516 > > │ v6: bool = True if v4 else method2(v4) │ 00:23:06 verbose #12517 > > │ v8: str = to_text(interpolate("%P() / actual: %A%P() / expected: │ 00:23:06 verbose #12518 > > │ %A%P()", ["__assert_eq", v3, 15])) │ 00:23:06 verbose #12519 > > │ v13: None │ 00:23:06 verbose #12520 > > │ closure0(v8, None) │ 00:23:06 verbose #12521 > > │ v13 = None │ 00:23:06 verbose #12522 > > │ if v6 == False: │ 00:23:06 verbose #12523 > > │ raise Exception(v8) │ 00:23:06 verbose #12524 > > │ │ 00:23:06 verbose #12525 > > │ │ 00:23:06 verbose #12526 > > │ │ 00:23:06 verbose #12527 > > │ method0() │ 00:23:06 verbose #12528 > > │ │ 00:23:06 verbose #12529 > > │ │ 00:23:06 verbose #12530 > > │ │ 00:23:06 verbose #12531 > > │ # spiral_builder.process_python │ 00:23:06 verbose #12532 > > │ │ 00:23:06 verbose #12533 > > │ .py: │ 00:23:06 verbose #12534 > > │ kernel = r""" │ 00:23:06 verbose #12535 > > │ """ │ 00:23:06 verbose #12536 > > │ class static_array(): │ 00:23:06 verbose #12537 > > │ def __init__(self, length): │ 00:23:06 verbose #12538 > > │ self.ptr = [] │ 00:23:06 verbose #12539 > > │ for _ in range(length): │ 00:23:06 verbose #12540 > > │ self.ptr.append(None) │ 00:23:06 verbose #12541 > > │ │ 00:23:06 verbose #12542 > > │ def __getitem__(self, index): │ 00:23:06 verbose #12543 > > │ assert 0 <= index < len(self.ptr), "The get index needs to be in │ 00:23:06 verbose #12544 > > │ range." │ 00:23:06 verbose #12545 > > │ return self.ptr[index] │ 00:23:06 verbose #12546 > > │ │ 00:23:06 verbose #12547 > > │ def __setitem__(self, index, value): │ 00:23:06 verbose #12548 > > │ assert 0 <= index < len(self.ptr), "The set index needs to be in │ 00:23:06 verbose #12549 > > │ range." │ 00:23:06 verbose #12550 > > │ self.ptr[index] = value │ 00:23:06 verbose #12551 > > │ │ 00:23:06 verbose #12552 > > │ class static_array_list(static_array): │ 00:23:06 verbose #12553 > > │ def __init__(self, length): │ 00:23:06 verbose #12554 > > │ super().__init__(length) │ 00:23:06 verbose #12555 > > │ self.length = 0 │ 00:23:06 verbose #12556 > > │ │ 00:23:06 verbose #12557 > > │ def __getitem__(self, index): │ 00:23:06 verbose #12558 > > │ assert 0 <= index < self.length, "The get index needs to be in │ 00:23:06 verbose #12559 > > │ range." │ 00:23:06 verbose #12560 > > │ return self.ptr[index] │ 00:23:06 verbose #12561 > > │ │ 00:23:06 verbose #12562 > > │ def __setitem__(self, index, value): │ 00:23:06 verbose #12563 > > │ assert 0 <= index < self.length, "The set index needs to be in │ 00:23:06 verbose #12564 > > │ range." │ 00:23:06 verbose #12565 > > │ self.ptr[index] = value │ 00:23:06 verbose #12566 > > │ │ 00:23:06 verbose #12567 > > │ def push(self,value): │ 00:23:06 verbose #12568 > > │ assert (self.length < len(self.ptr)), "The length before pushing has │ 00:23:06 verbose #12569 > > │ to be less than the maximum length of the array." │ 00:23:06 verbose #12570 > > │ self.ptr[self.length] = value │ 00:23:06 verbose #12571 > > │ self.length += 1 │ 00:23:06 verbose #12572 > > │ │ 00:23:06 verbose #12573 > > │ def pop(self): │ 00:23:06 verbose #12574 > > │ assert (0 < self.length), "The length before popping has to be │ 00:23:06 verbose #12575 > > │ greater than 0." │ 00:23:06 verbose #12576 > > │ self.length -= 1 │ 00:23:06 verbose #12577 > > │ return self.ptr[self.length] │ 00:23:06 verbose #12578 > > │ │ 00:23:06 verbose #12579 > > │ def unsafe_set_length(self,i): │ 00:23:06 verbose #12580 > > │ assert 0 <= i <= len(self.ptr), "The new length has to be in range." │ 00:23:06 verbose #12581 > > │ self.length = i │ 00:23:06 verbose #12582 > > │ │ 00:23:06 verbose #12583 > > │ class dynamic_array(static_array): │ 00:23:06 verbose #12584 > > │ pass │ 00:23:06 verbose #12585 > > │ │ 00:23:06 verbose #12586 > > │ class dynamic_array_list(static_array_list): │ 00:23:06 verbose #12587 > > │ def length_(self): return self.length │ 00:23:06 verbose #12588 > > │ │ 00:23:06 verbose #12589 > > │ import cupy as cp │ 00:23:06 verbose #12590 > > │ from dataclasses import dataclass │ 00:23:06 verbose #12591 > > │ from typing import NamedTuple, Union, Callable, Tuple │ 00:23:06 verbose #12592 > > │ i8 = i16 = i32 = i64 = u8 = u16 = u32 = u64 = int; f32 = f64 = float; char = │ 00:23:06 verbose #12593 > > │ string = str │ 00:23:06 verbose #12594 > > │ │ 00:23:06 verbose #12595 > > │ def method1() -> i32: │ 00:23:06 verbose #12596 > > │ return 3 │ 00:23:06 verbose #12597 > > │ def method2(v0 : bool) -> bool: │ 00:23:06 verbose #12598 > > │ return v0 │ 00:23:06 verbose #12599 > > │ def method0() -> None: │ 00:23:06 verbose #12600 > > │ v0 = method1() │ 00:23:06 verbose #12601 > > │ v1 = 9 + v0 │ 00:23:06 verbose #12602 > > │ del v0 │ 00:23:06 verbose #12603 > > │ v2 = v1 + 2 │ 00:23:06 verbose #12604 > > │ del v1 │ 00:23:06 verbose #12605 > > │ v3 = v2 + 1 │ 00:23:06 verbose #12606 > > │ del v2 │ 00:23:06 verbose #12607 > > │ v4 = v3 == 15 │ 00:23:06 verbose #12608 > > │ if v4: │ 00:23:06 verbose #12609 > > │ v6 = True │ 00:23:06 verbose #12610 > > │ else: │ 00:23:06 verbose #12611 > > │ v6 = method2(v4) │ 00:23:06 verbose #12612 > > │ del v4 │ 00:23:06 verbose #12613 > > │ v9 = "__assert_eq" │ 00:23:06 verbose #12614 > > │ v10 = f"{v9} / actual: {v3} / expected: {15}" │ 00:23:06 verbose #12615 > > │ del v3, v9 │ 00:23:06 verbose #12616 > > │ print(v10) │ 00:23:06 verbose #12617 > > │ v16 = v6 == False │ 00:23:06 verbose #12618 > > │ del v6 │ 00:23:06 verbose #12619 > > │ if v16: │ 00:23:06 verbose #12620 > > │ del v16 │ 00:23:06 verbose #12621 > > │ raise Exception(v10) │ 00:23:06 verbose #12622 > > │ else: │ 00:23:06 verbose #12623 > > │ del v10, v16 │ 00:23:06 verbose #12624 > > │ return │ 00:23:06 verbose #12625 > > │ def main(): │ 00:23:06 verbose #12626 > > │ return method0() │ 00:23:06 verbose #12627 > > │ │ 00:23:06 verbose #12628 > > │ if __name__ == '__main__': result = main(); None if result is None else │ 00:23:06 verbose #12629 > > │ print(result) │ 00:23:06 verbose #12630 > > │ │ 00:23:06 verbose #12631 > > │ │ 00:23:06 verbose #12632 > > │ .py: │ 00:23:06 verbose #12633 > > │ kernel = r""" │ 00:23:06 verbose #12634 > > │ """ │ 00:23:06 verbose #12635 > > │ class static_array(): │ 00:23:06 verbose #12636 > > │ def __init__(self, length): │ 00:23:06 verbose #12637 > > │ self.ptr = [] │ 00:23:06 verbose #12638 > > │ for _ in range(length): │ 00:23:06 verbose #12639 > > │ self.ptr.append(None) │ 00:23:06 verbose #12640 > > │ │ 00:23:06 verbose #12641 > > │ def __getitem__(self, index): │ 00:23:06 verbose #12642 > > │ assert 0 <= index < len(self.ptr), "The get index needs to be in │ 00:23:06 verbose #12643 > > │ range." │ 00:23:06 verbose #12644 > > │ return self.ptr[index] │ 00:23:06 verbose #12645 > > │ │ 00:23:06 verbose #12646 > > │ def __setitem__(self, index, value): │ 00:23:06 verbose #12647 > > │ assert 0 <= index < len(self.ptr), "The set index needs to be in │ 00:23:06 verbose #12648 > > │ range." │ 00:23:06 verbose #12649 > > │ self.ptr[index] = value │ 00:23:06 verbose #12650 > > │ │ 00:23:06 verbose #12651 > > │ class static_array_list(static_array): │ 00:23:06 verbose #12652 > > │ def __init__(self, length): │ 00:23:06 verbose #12653 > > │ super().__init__(length) │ 00:23:06 verbose #12654 > > │ self.length = 0 │ 00:23:06 verbose #12655 > > │ │ 00:23:06 verbose #12656 > > │ def __getitem__(self, index): │ 00:23:06 verbose #12657 > > │ assert 0 <= index < self.length, "The get index needs to be in │ 00:23:06 verbose #12658 > > │ range." │ 00:23:06 verbose #12659 > > │ return self.ptr[index] │ 00:23:06 verbose #12660 > > │ │ 00:23:06 verbose #12661 > > │ def __setitem__(self, index, value): │ 00:23:06 verbose #12662 > > │ assert 0 <= index < self.length, "The set index needs to be in │ 00:23:06 verbose #12663 > > │ range." │ 00:23:06 verbose #12664 > > │ self.ptr[index] = value │ 00:23:06 verbose #12665 > > │ │ 00:23:06 verbose #12666 > > │ def push(self,value): │ 00:23:06 verbose #12667 > > │ assert (self.length < len(self.ptr)), "The length before pushing has │ 00:23:06 verbose #12668 > > │ to be less than the maximum length of the array." │ 00:23:06 verbose #12669 > > │ self.ptr[self.length] = value │ 00:23:06 verbose #12670 > > │ self.length += 1 │ 00:23:06 verbose #12671 > > │ │ 00:23:06 verbose #12672 > > │ def pop(self): │ 00:23:06 verbose #12673 > > │ assert (0 < self.length), "The length before popping has to be │ 00:23:06 verbose #12674 > > │ greater than 0." │ 00:23:06 verbose #12675 > > │ self.length -= 1 │ 00:23:06 verbose #12676 > > │ return self.ptr[self.length] │ 00:23:06 verbose #12677 > > │ │ 00:23:06 verbose #12678 > > │ def unsafe_set_length(self,i): │ 00:23:06 verbose #12679 > > │ assert 0 <= i <= len(self.ptr), "The new length has to be in range." │ 00:23:06 verbose #12680 > > │ self.length = i │ 00:23:06 verbose #12681 > > │ │ 00:23:06 verbose #12682 > > │ class dynamic_array(static_array): │ 00:23:06 verbose #12683 > > │ pass │ 00:23:06 verbose #12684 > > │ │ 00:23:06 verbose #12685 > > │ class dynamic_array_list(static_array_list): │ 00:23:06 verbose #12686 > > │ def length_(self): return self.length │ 00:23:06 verbose #12687 > > │ │ 00:23:06 verbose #12688 > > │ import cupy as cp │ 00:23:06 verbose #12689 > > │ from dataclasses import dataclass │ 00:23:06 verbose #12690 > > │ from typing import NamedTuple, Union, Callable, Tuple │ 00:23:06 verbose #12691 > > │ i8 = i16 = i32 = i64 = u8 = u16 = u32 = u64 = int; f32 = f64 = float; char = │ 00:23:06 verbose #12692 > > │ string = str │ 00:23:06 verbose #12693 > > │ │ 00:23:06 verbose #12694 > > │ def method1() -> i32: │ 00:23:06 verbose #12695 > > │ return 3 │ 00:23:06 verbose #12696 > > │ def method2(v0 : bool) -> bool: │ 00:23:06 verbose #12697 > > │ return v0 │ 00:23:06 verbose #12698 > > │ def method0() -> None: │ 00:23:06 verbose #12699 > > │ v0 = method1() │ 00:23:06 verbose #12700 > > │ v1 = 9 + v0 │ 00:23:06 verbose #12701 > > │ del v0 │ 00:23:06 verbose #12702 > > │ v2 = v1 + 2 │ 00:23:06 verbose #12703 > > │ del v1 │ 00:23:06 verbose #12704 > > │ v3 = v2 + 1 │ 00:23:06 verbose #12705 > > │ del v2 │ 00:23:06 verbose #12706 > > │ v4 = v3 == 15 │ 00:23:06 verbose #12707 > > │ if v4: │ 00:23:06 verbose #12708 > > │ v6 = True │ 00:23:06 verbose #12709 > > │ else: │ 00:23:06 verbose #12710 > > │ v6 = method2(v4) │ 00:23:06 verbose #12711 > > │ del v4 │ 00:23:06 verbose #12712 > > │ v9 = "__assert_eq" │ 00:23:06 verbose #12713 > > │ v10 = f"{v9} / actual: {v3} / expected: {15}" │ 00:23:06 verbose #12714 > > │ del v3, v9 │ 00:23:06 verbose #12715 > > │ print(v10) │ 00:23:06 verbose #12716 > > │ v16 = v6 == False │ 00:23:06 verbose #12717 > > │ del v6 │ 00:23:06 verbose #12718 > > │ if v16: │ 00:23:06 verbose #12719 > > │ del v16 │ 00:23:06 verbose #12720 > > │ raise Exception(v10) │ 00:23:06 verbose #12721 > > │ else: │ 00:23:06 verbose #12722 > > │ del v10, v16 │ 00:23:06 verbose #12723 > > │ return │ 00:23:06 verbose #12724 > > │ def main(): │ 00:23:06 verbose #12725 > > │ return method0() │ 00:23:06 verbose #12726 > > │ │ 00:23:06 verbose #12727 > > │ if __name__ == '__main__': result = main(); None if result is None else │ 00:23:06 verbose #12728 > > │ print(result) │ 00:23:06 verbose #12729 > > │ │ 00:23:06 verbose #12730 > > │ .fsx output: │ 00:23:06 verbose #12731 > > │ __assert_eq / actual: 15 / expected: 15 │ 00:23:06 verbose #12732 > > │ │ 00:23:06 verbose #12733 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:23:06 verbose #12734 > > 00:23:06 verbose #12735 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:23:06 verbose #12736 > > //// test 00:23:06 verbose #12737 > > ///! fsharp 00:23:06 verbose #12738 > > ///! cuda 00:23:06 verbose #12739 > > ///! rust 00:23:06 verbose #12740 > > ///! typescript 00:23:06 verbose #12741 > > ///! python 00:23:06 verbose #12742 > > //// print_code=true 00:23:06 verbose #12743 > > 00:23:06 verbose #12744 > > [[ 5i32; 4; join 3; 2; 1 ]] 00:23:06 verbose #12745 > > |> fold_list (join_body (+)) 0 00:23:06 verbose #12746 > > |> _assert_eq 15 00:23:24 verbose #12747 > > 00:23:24 verbose #12748 > > ╭─[ 17.35s - return value ]────────────────────────────────────────────────────╮ 00:23:24 verbose #12749 > > │ .py output (Cuda): │ 00:23:24 verbose #12750 > > │ __assert_eq / actual: 15 / expected: 15 │ 00:23:24 verbose #12751 > > │ │ 00:23:24 verbose #12752 > > │ .rs output: │ 00:23:24 verbose #12753 > > │ __assert_eq / actual: 15 / expected: 15 │ 00:23:24 verbose #12754 > > │ │ 00:23:24 verbose #12755 > > │ .ts output: │ 00:23:24 verbose #12756 > > │ __assert_eq / actual: 15 / expected: 15 │ 00:23:24 verbose #12757 > > │ │ 00:23:24 verbose #12758 > > │ .py output: │ 00:23:24 verbose #12759 > > │ __assert_eq / actual: 15 / expected: 15 │ 00:23:24 verbose #12760 > > │ │ 00:23:24 verbose #12761 > > │ │ 00:23:24 verbose #12762 > > │ │ 00:23:24 verbose #12763 > > │ │ 00:23:24 verbose #12764 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:23:24 verbose #12765 > > 00:23:24 verbose #12766 > > ╭─[ 17.35s - stdout ]──────────────────────────────────────────────────────────╮ 00:23:24 verbose #12767 > > │ .fsx: │ 00:23:24 verbose #12768 > > │ let rec method1 () : int32 = │ 00:23:24 verbose #12769 > > │ 3 │ 00:23:24 verbose #12770 > > │ and method2 (v0 : int32, v1 : int32) : int32 = │ 00:23:24 verbose #12771 > > │ let v2 : int32 = v1 + v0 │ 00:23:24 verbose #12772 > > │ v2 │ 00:23:24 verbose #12773 > > │ and method3 (v0 : bool) : bool = │ 00:23:24 verbose #12774 > > │ v0 │ 00:23:24 verbose #12775 > > │ and closure0 (v0 : string) () : unit = │ 00:23:24 verbose #12776 > > │ let v1 : (string -> unit) = System.Console.WriteLine │ 00:23:24 verbose #12777 > > │ v1 v0 │ 00:23:24 verbose #12778 > > │ and method0 () : unit = │ 00:23:24 verbose #12779 > > │ let v0 : int32 = method1() │ 00:23:24 verbose #12780 > > │ let v1 : int32 = 9 │ 00:23:24 verbose #12781 > > │ let v2 : int32 = method2(v0, v1) │ 00:23:24 verbose #12782 > > │ let v3 : int32 = v2 + 2 │ 00:23:24 verbose #12783 > > │ let v4 : int32 = v3 + 1 │ 00:23:24 verbose #12784 > > │ let v5 : bool = v4 = 15 │ 00:23:24 verbose #12785 > > │ let v7 : bool = │ 00:23:24 verbose #12786 > > │ if v5 then │ 00:23:24 verbose #12787 > > │ true │ 00:23:24 verbose #12788 > > │ else │ 00:23:24 verbose #12789 > > │ method3(v5) │ 00:23:24 verbose #12790 > > │ let v8 : string = "__assert_eq" │ 00:23:24 verbose #12791 > > │ let v9 : string = $"{v8} / actual: %A{v4} / expected: %A{15}" │ 00:23:24 verbose #12792 > > │ let v12 : unit = () │ 00:23:24 verbose #12793 > > │ let v13 : (unit -> unit) = closure0(v9) │ 00:23:24 verbose #12794 > > │ let v14 : unit = (fun () -> v13 (); v12) () │ 00:23:24 verbose #12795 > > │ let v16 : bool = v7 = false │ 00:23:24 verbose #12796 > > │ if v16 then │ 00:23:24 verbose #12797 > > │ failwith<unit> v9 │ 00:23:24 verbose #12798 > > │ method0() │ 00:23:24 verbose #12799 > > │ │ 00:23:24 verbose #12800 > > │ │ 00:23:24 verbose #12801 > > │ .rs: │ 00:23:24 verbose #12802 > > │ #![allow(dead_code)] │ 00:23:24 verbose #12803 > > │ #![allow(non_camel_case_types)] │ 00:23:24 verbose #12804 > > │ #![allow(non_snake_case)] │ 00:23:24 verbose #12805 > > │ #![allow(non_upper_case_globals)] │ 00:23:24 verbose #12806 > > │ #![allow(unreachable_code)] │ 00:23:24 verbose #12807 > > │ #![allow(unused_attributes)] │ 00:23:24 verbose #12808 > > │ #![allow(unused_imports)] │ 00:23:24 verbose #12809 > > │ #![allow(unused_macros)] │ 00:23:24 verbose #12810 > > │ #![allow(unused_parens)] │ 00:23:24 verbose #12811 > > │ #![allow(unused_variables)] │ 00:23:24 verbose #12812 > > │ mod module_84d7d073 { │ 00:23:24 verbose #12813 > > │ pub mod Spiral_builder { │ 00:23:24 verbose #12814 > > │ use super::*; │ 00:23:24 verbose #12815 > > │ use fable_library_rust::Native_::on_startup; │ 00:23:24 verbose #12816 > > │ use fable_library_rust::String_::printfn; │ 00:23:24 verbose #12817 > > │ use fable_library_rust::String_::sprintf; │ 00:23:24 verbose #12818 > > │ use fable_library_rust::String_::string; │ 00:23:24 verbose #12819 > > │ pub fn method1() -> i32 { │ 00:23:24 verbose #12820 > > │ 3_i32 │ 00:23:24 verbose #12821 > > │ } │ 00:23:24 verbose #12822 > > │ pub fn method2(v0: i32, v1: i32) -> i32 { │ 00:23:24 verbose #12823 > > │ v1 + v0 │ 00:23:24 verbose #12824 > > │ } │ 00:23:24 verbose #12825 > > │ pub fn method3(v0: bool) -> bool { │ 00:23:24 verbose #12826 > > │ v0 │ 00:23:24 verbose #12827 > > │ } │ 00:23:24 verbose #12828 > > │ pub fn closure0(v0: string, unitVar: ()) { │ 00:23:24 verbose #12829 > > │ printfn!("{0}", v0); │ 00:23:24 verbose #12830 > > │ } │ 00:23:24 verbose #12831 > > │ pub fn method0() { │ 00:23:24 verbose #12832 > > │ let v4: i32 = Spiral_builder::method2(Spiral_builder::method1(), │ 00:23:24 verbose #12833 > > │ 9_i32) + 2_i32 + 1_i32; │ 00:23:24 verbose #12834 > > │ let v5: bool = v4 == 15_i32; │ 00:23:24 verbose #12835 > > │ let v7: bool = if v5 { │ 00:23:24 verbose #12836 > > │ true │ 00:23:24 verbose #12837 > > │ } else { │ 00:23:24 verbose #12838 > > │ Spiral_builder::method3(v5) │ 00:23:24 verbose #12839 > > │ }; │ 00:23:24 verbose #12840 > > │ let v9: string = sprintf!( │ 00:23:24 verbose #12841 > > │ "{} / actual: {:?} / expected: {:?}", │ 00:23:24 verbose #12842 > > │ string("__assert_eq"), │ 00:23:24 verbose #12843 > > │ v4, │ 00:23:24 verbose #12844 > > │ 15_i32 │ 00:23:24 verbose #12845 > > │ ); │ 00:23:24 verbose #12846 > > │ let v14: () = { │ 00:23:24 verbose #12847 > > │ Spiral_builder::closure0(v9.clone(), ()); │ 00:23:24 verbose #12848 > > │ () │ 00:23:24 verbose #12849 > > │ }; │ 00:23:24 verbose #12850 > > │ if v7 == false { │ 00:23:24 verbose #12851 > > │ panic!("{}", v9,); │ 00:23:24 verbose #12852 > > │ } │ 00:23:24 verbose #12853 > > │ } │ 00:23:24 verbose #12854 > > │ on_startup!(Spiral_builder::method0()); │ 00:23:24 verbose #12855 > > │ } │ 00:23:24 verbose #12856 > > │ } │ 00:23:24 verbose #12857 > > │ pub use module_84d7d073::*; │ 00:23:24 verbose #12858 > > │ │ 00:23:24 verbose #12859 > > │ .ts: │ 00:23:24 verbose #12860 > > │ import { int32 } from "./fable_modules/fable-library-ts.4.21.0/Int32.js"; │ 00:23:24 verbose #12861 > > │ import { interpolate, toText } from │ 00:23:24 verbose #12862 > > │ "./fable_modules/fable-library-ts.4.21.0/String.js"; │ 00:23:24 verbose #12863 > > │ │ 00:23:24 verbose #12864 > > │ export function method1(): int32 { │ 00:23:24 verbose #12865 > > │ return 3; │ 00:23:24 verbose #12866 > > │ } │ 00:23:24 verbose #12867 > > │ │ 00:23:24 verbose #12868 > > │ export function method2(v0: int32, v1: int32): int32 { │ 00:23:24 verbose #12869 > > │ return v1 + v0; │ 00:23:24 verbose #12870 > > │ } │ 00:23:24 verbose #12871 > > │ │ 00:23:24 verbose #12872 > > │ export function method3(v0: boolean): boolean { │ 00:23:24 verbose #12873 > > │ return v0; │ 00:23:24 verbose #12874 > > │ } │ 00:23:24 verbose #12875 > > │ │ 00:23:24 verbose #12876 > > │ export function closure0(v0: string, unitVar: void): void { │ 00:23:24 verbose #12877 > > │ console.log(v0); │ 00:23:24 verbose #12878 > > │ } │ 00:23:24 verbose #12879 > > │ │ 00:23:24 verbose #12880 > > │ export function method0(): void { │ 00:23:24 verbose #12881 > > │ const v4: int32 = ((method2(method1(), 9) + 2) + 1) | 0; │ 00:23:24 verbose #12882 > > │ const v5: boolean = v4 === 15; │ 00:23:24 verbose #12883 > > │ const v7: boolean = v5 ? true : method3(v5); │ 00:23:24 verbose #12884 > > │ const v9: string = toText(interpolate("%P() / actual: %A%P() / expected: │ 00:23:24 verbose #12885 > > │ %A%P()", ["__assert_eq", v4, 15])); │ 00:23:24 verbose #12886 > > │ let v14: any; │ 00:23:24 verbose #12887 > > │ closure0(v9, undefined); │ 00:23:24 verbose #12888 > > │ v14 = undefined; │ 00:23:24 verbose #12889 > > │ if (v7 === false) { │ 00:23:24 verbose #12890 > > │ throw new Error(v9); │ 00:23:24 verbose #12891 > > │ } │ 00:23:24 verbose #12892 > > │ } │ 00:23:24 verbose #12893 > > │ │ 00:23:24 verbose #12894 > > │ method0(); │ 00:23:24 verbose #12895 > > │ │ 00:23:24 verbose #12896 > > │ │ 00:23:24 verbose #12897 > > │ │ 00:23:24 verbose #12898 > > │ // spiral_builder.process_typescript │ 00:23:24 verbose #12899 > > │ │ 00:23:24 verbose #12900 > > │ .py: │ 00:23:24 verbose #12901 > > │ from fable_modules.fable_library.string_ import (to_text, interpolate) │ 00:23:24 verbose #12902 > > │ │ 00:23:24 verbose #12903 > > │ def method1(__unit: None=None) -> int: │ 00:23:24 verbose #12904 > > │ return 3 │ 00:23:24 verbose #12905 > > │ │ 00:23:24 verbose #12906 > > │ │ 00:23:24 verbose #12907 > > │ def method2(v0: int, v1: int) -> int: │ 00:23:24 verbose #12908 > > │ return v1 + v0 │ 00:23:24 verbose #12909 > > │ │ 00:23:24 verbose #12910 > > │ │ 00:23:24 verbose #12911 > > │ def method3(v0: bool) -> bool: │ 00:23:24 verbose #12912 > > │ return v0 │ 00:23:24 verbose #12913 > > │ │ 00:23:24 verbose #12914 > > │ │ 00:23:24 verbose #12915 > > │ def closure0(v0: str, unit_var: None) -> None: │ 00:23:24 verbose #12916 > > │ print(v0) │ 00:23:24 verbose #12917 > > │ │ 00:23:24 verbose #12918 > > │ │ 00:23:24 verbose #12919 > > │ def method0(__unit: None=None) -> None: │ 00:23:24 verbose #12920 > > │ v4: int = ((method2(method1(), 9) + 2) + 1) or 0 │ 00:23:24 verbose #12921 > > │ v5: bool = v4 == 15 │ 00:23:24 verbose #12922 > > │ v7: bool = True if v5 else method3(v5) │ 00:23:24 verbose #12923 > > │ v9: str = to_text(interpolate("%P() / actual: %A%P() / expected: │ 00:23:24 verbose #12924 > > │ %A%P()", ["__assert_eq", v4, 15])) │ 00:23:24 verbose #12925 > > │ v14: None │ 00:23:24 verbose #12926 > > │ closure0(v9, None) │ 00:23:24 verbose #12927 > > │ v14 = None │ 00:23:24 verbose #12928 > > │ if v7 == False: │ 00:23:24 verbose #12929 > > │ raise Exception(v9) │ 00:23:24 verbose #12930 > > │ │ 00:23:24 verbose #12931 > > │ │ 00:23:24 verbose #12932 > > │ │ 00:23:24 verbose #12933 > > │ method0() │ 00:23:24 verbose #12934 > > │ │ 00:23:24 verbose #12935 > > │ │ 00:23:24 verbose #12936 > > │ │ 00:23:24 verbose #12937 > > │ # spiral_builder.process_python │ 00:23:24 verbose #12938 > > │ │ 00:23:24 verbose #12939 > > │ .py: │ 00:23:24 verbose #12940 > > │ kernel = r""" │ 00:23:24 verbose #12941 > > │ """ │ 00:23:24 verbose #12942 > > │ class static_array(): │ 00:23:24 verbose #12943 > > │ def __init__(self, length): │ 00:23:24 verbose #12944 > > │ self.ptr = [] │ 00:23:24 verbose #12945 > > │ for _ in range(length): │ 00:23:24 verbose #12946 > > │ self.ptr.append(None) │ 00:23:24 verbose #12947 > > │ │ 00:23:24 verbose #12948 > > │ def __getitem__(self, index): │ 00:23:24 verbose #12949 > > │ assert 0 <= index < len(self.ptr), "The get index needs to be in │ 00:23:24 verbose #12950 > > │ range." │ 00:23:24 verbose #12951 > > │ return self.ptr[index] │ 00:23:24 verbose #12952 > > │ │ 00:23:24 verbose #12953 > > │ def __setitem__(self, index, value): │ 00:23:24 verbose #12954 > > │ assert 0 <= index < len(self.ptr), "The set index needs to be in │ 00:23:24 verbose #12955 > > │ range." │ 00:23:24 verbose #12956 > > │ self.ptr[index] = value │ 00:23:24 verbose #12957 > > │ │ 00:23:24 verbose #12958 > > │ class static_array_list(static_array): │ 00:23:24 verbose #12959 > > │ def __init__(self, length): │ 00:23:24 verbose #12960 > > │ super().__init__(length) │ 00:23:24 verbose #12961 > > │ self.length = 0 │ 00:23:24 verbose #12962 > > │ │ 00:23:24 verbose #12963 > > │ def __getitem__(self, index): │ 00:23:24 verbose #12964 > > │ assert 0 <= index < self.length, "The get index needs to be in │ 00:23:24 verbose #12965 > > │ range." │ 00:23:24 verbose #12966 > > │ return self.ptr[index] │ 00:23:24 verbose #12967 > > │ │ 00:23:24 verbose #12968 > > │ def __setitem__(self, index, value): │ 00:23:24 verbose #12969 > > │ assert 0 <= index < self.length, "The set index needs to be in │ 00:23:24 verbose #12970 > > │ range." │ 00:23:24 verbose #12971 > > │ self.ptr[index] = value │ 00:23:24 verbose #12972 > > │ │ 00:23:24 verbose #12973 > > │ def push(self,value): │ 00:23:24 verbose #12974 > > │ assert (self.length < len(self.ptr)), "The length before pushing has │ 00:23:24 verbose #12975 > > │ to be less than the maximum length of the array." │ 00:23:24 verbose #12976 > > │ self.ptr[self.length] = value │ 00:23:24 verbose #12977 > > │ self.length += 1 │ 00:23:24 verbose #12978 > > │ │ 00:23:24 verbose #12979 > > │ def pop(self): │ 00:23:24 verbose #12980 > > │ assert (0 < self.length), "The length before popping has to be │ 00:23:24 verbose #12981 > > │ greater than 0." │ 00:23:24 verbose #12982 > > │ self.length -= 1 │ 00:23:24 verbose #12983 > > │ return self.ptr[self.length] │ 00:23:24 verbose #12984 > > │ │ 00:23:24 verbose #12985 > > │ def unsafe_set_length(self,i): │ 00:23:24 verbose #12986 > > │ assert 0 <= i <= len(self.ptr), "The new length has to be in range." │ 00:23:24 verbose #12987 > > │ self.length = i │ 00:23:24 verbose #12988 > > │ │ 00:23:24 verbose #12989 > > │ class dynamic_array(static_array): │ 00:23:24 verbose #12990 > > │ pass │ 00:23:24 verbose #12991 > > │ │ 00:23:24 verbose #12992 > > │ class dynamic_array_list(static_array_list): │ 00:23:24 verbose #12993 > > │ def length_(self): return self.length │ 00:23:24 verbose #12994 > > │ │ 00:23:24 verbose #12995 > > │ import cupy as cp │ 00:23:24 verbose #12996 > > │ from dataclasses import dataclass │ 00:23:24 verbose #12997 > > │ from typing import NamedTuple, Union, Callable, Tuple │ 00:23:24 verbose #12998 > > │ i8 = i16 = i32 = i64 = u8 = u16 = u32 = u64 = int; f32 = f64 = float; char = │ 00:23:24 verbose #12999 > > │ string = str │ 00:23:24 verbose #13000 > > │ │ 00:23:24 verbose #13001 > > │ def method1() -> i32: │ 00:23:24 verbose #13002 > > │ return 3 │ 00:23:24 verbose #13003 > > │ def method2(v0 : i32, v1 : i32) -> i32: │ 00:23:24 verbose #13004 > > │ v2 = v1 + v0 │ 00:23:24 verbose #13005 > > │ del v0, v1 │ 00:23:24 verbose #13006 > > │ return v2 │ 00:23:24 verbose #13007 > > │ def method3(v0 : bool) -> bool: │ 00:23:24 verbose #13008 > > │ return v0 │ 00:23:24 verbose #13009 > > │ def method0() -> None: │ 00:23:24 verbose #13010 > > │ v0 = method1() │ 00:23:24 verbose #13011 > > │ v1 = 9 │ 00:23:24 verbose #13012 > > │ v2 = method2(v0, v1) │ 00:23:24 verbose #13013 > > │ del v0, v1 │ 00:23:24 verbose #13014 > > │ v3 = v2 + 2 │ 00:23:24 verbose #13015 > > │ del v2 │ 00:23:24 verbose #13016 > > │ v4 = v3 + 1 │ 00:23:24 verbose #13017 > > │ del v3 │ 00:23:24 verbose #13018 > > │ v5 = v4 == 15 │ 00:23:24 verbose #13019 > > │ if v5: │ 00:23:24 verbose #13020 > > │ v7 = True │ 00:23:24 verbose #13021 > > │ else: │ 00:23:24 verbose #13022 > > │ v7 = method3(v5) │ 00:23:24 verbose #13023 > > │ del v5 │ 00:23:24 verbose #13024 > > │ v10 = "__assert_eq" │ 00:23:24 verbose #13025 > > │ v11 = f"{v10} / actual: {v4} / expected: {15}" │ 00:23:24 verbose #13026 > > │ del v4, v10 │ 00:23:24 verbose #13027 > > │ print(v11) │ 00:23:24 verbose #13028 > > │ v17 = v7 == False │ 00:23:24 verbose #13029 > > │ del v7 │ 00:23:24 verbose #13030 > > │ if v17: │ 00:23:24 verbose #13031 > > │ del v17 │ 00:23:24 verbose #13032 > > │ raise Exception(v11) │ 00:23:24 verbose #13033 > > │ else: │ 00:23:24 verbose #13034 > > │ del v11, v17 │ 00:23:24 verbose #13035 > > │ return │ 00:23:24 verbose #13036 > > │ def main(): │ 00:23:24 verbose #13037 > > │ return method0() │ 00:23:24 verbose #13038 > > │ │ 00:23:24 verbose #13039 > > │ if __name__ == '__main__': result = main(); None if result is None else │ 00:23:24 verbose #13040 > > │ print(result) │ 00:23:24 verbose #13041 > > │ │ 00:23:24 verbose #13042 > > │ │ 00:23:24 verbose #13043 > > │ .py: │ 00:23:24 verbose #13044 > > │ kernel = r""" │ 00:23:24 verbose #13045 > > │ """ │ 00:23:24 verbose #13046 > > │ class static_array(): │ 00:23:24 verbose #13047 > > │ def __init__(self, length): │ 00:23:24 verbose #13048 > > │ self.ptr = [] │ 00:23:24 verbose #13049 > > │ for _ in range(length): │ 00:23:24 verbose #13050 > > │ self.ptr.append(None) │ 00:23:24 verbose #13051 > > │ │ 00:23:24 verbose #13052 > > │ def __getitem__(self, index): │ 00:23:24 verbose #13053 > > │ assert 0 <= index < len(self.ptr), "The get index needs to be in │ 00:23:24 verbose #13054 > > │ range." │ 00:23:24 verbose #13055 > > │ return self.ptr[index] │ 00:23:24 verbose #13056 > > │ │ 00:23:24 verbose #13057 > > │ def __setitem__(self, index, value): │ 00:23:24 verbose #13058 > > │ assert 0 <= index < len(self.ptr), "The set index needs to be in │ 00:23:24 verbose #13059 > > │ range." │ 00:23:24 verbose #13060 > > │ self.ptr[index] = value │ 00:23:24 verbose #13061 > > │ │ 00:23:24 verbose #13062 > > │ class static_array_list(static_array): │ 00:23:24 verbose #13063 > > │ def __init__(self, length): │ 00:23:24 verbose #13064 > > │ super().__init__(length) │ 00:23:24 verbose #13065 > > │ self.length = 0 │ 00:23:24 verbose #13066 > > │ │ 00:23:24 verbose #13067 > > │ def __getitem__(self, index): │ 00:23:24 verbose #13068 > > │ assert 0 <= index < self.length, "The get index needs to be in │ 00:23:24 verbose #13069 > > │ range." │ 00:23:24 verbose #13070 > > │ return self.ptr[index] │ 00:23:24 verbose #13071 > > │ │ 00:23:24 verbose #13072 > > │ def __setitem__(self, index, value): │ 00:23:24 verbose #13073 > > │ assert 0 <= index < self.length, "The set index needs to be in │ 00:23:24 verbose #13074 > > │ range." │ 00:23:24 verbose #13075 > > │ self.ptr[index] = value │ 00:23:24 verbose #13076 > > │ │ 00:23:24 verbose #13077 > > │ def push(self,value): │ 00:23:24 verbose #13078 > > │ assert (self.length < len(self.ptr)), "The length before pushing has │ 00:23:24 verbose #13079 > > │ to be less than the maximum length of the array." │ 00:23:24 verbose #13080 > > │ self.ptr[self.length] = value │ 00:23:24 verbose #13081 > > │ self.length += 1 │ 00:23:24 verbose #13082 > > │ │ 00:23:24 verbose #13083 > > │ def pop(self): │ 00:23:24 verbose #13084 > > │ assert (0 < self.length), "The length before popping has to be │ 00:23:24 verbose #13085 > > │ greater than 0." │ 00:23:24 verbose #13086 > > │ self.length -= 1 │ 00:23:24 verbose #13087 > > │ return self.ptr[self.length] │ 00:23:24 verbose #13088 > > │ │ 00:23:24 verbose #13089 > > │ def unsafe_set_length(self,i): │ 00:23:24 verbose #13090 > > │ assert 0 <= i <= len(self.ptr), "The new length has to be in range." │ 00:23:24 verbose #13091 > > │ self.length = i │ 00:23:24 verbose #13092 > > │ │ 00:23:24 verbose #13093 > > │ class dynamic_array(static_array): │ 00:23:24 verbose #13094 > > │ pass │ 00:23:24 verbose #13095 > > │ │ 00:23:24 verbose #13096 > > │ class dynamic_array_list(static_array_list): │ 00:23:24 verbose #13097 > > │ def length_(self): return self.length │ 00:23:24 verbose #13098 > > │ │ 00:23:24 verbose #13099 > > │ import cupy as cp │ 00:23:24 verbose #13100 > > │ from dataclasses import dataclass │ 00:23:24 verbose #13101 > > │ from typing import NamedTuple, Union, Callable, Tuple │ 00:23:24 verbose #13102 > > │ i8 = i16 = i32 = i64 = u8 = u16 = u32 = u64 = int; f32 = f64 = float; char = │ 00:23:24 verbose #13103 > > │ string = str │ 00:23:24 verbose #13104 > > │ │ 00:23:24 verbose #13105 > > │ def method1() -> i32: │ 00:23:24 verbose #13106 > > │ return 3 │ 00:23:24 verbose #13107 > > │ def method2(v0 : i32, v1 : i32) -> i32: │ 00:23:24 verbose #13108 > > │ v2 = v1 + v0 │ 00:23:24 verbose #13109 > > │ del v0, v1 │ 00:23:24 verbose #13110 > > │ return v2 │ 00:23:24 verbose #13111 > > │ def method3(v0 : bool) -> bool: │ 00:23:24 verbose #13112 > > │ return v0 │ 00:23:24 verbose #13113 > > │ def method0() -> None: │ 00:23:24 verbose #13114 > > │ v0 = method1() │ 00:23:24 verbose #13115 > > │ v1 = 9 │ 00:23:24 verbose #13116 > > │ v2 = method2(v0, v1) │ 00:23:24 verbose #13117 > > │ del v0, v1 │ 00:23:24 verbose #13118 > > │ v3 = v2 + 2 │ 00:23:24 verbose #13119 > > │ del v2 │ 00:23:24 verbose #13120 > > │ v4 = v3 + 1 │ 00:23:24 verbose #13121 > > │ del v3 │ 00:23:24 verbose #13122 > > │ v5 = v4 == 15 │ 00:23:24 verbose #13123 > > │ if v5: │ 00:23:24 verbose #13124 > > │ v7 = True │ 00:23:24 verbose #13125 > > │ else: │ 00:23:24 verbose #13126 > > │ v7 = method3(v5) │ 00:23:24 verbose #13127 > > │ del v5 │ 00:23:24 verbose #13128 > > │ v10 = "__assert_eq" │ 00:23:24 verbose #13129 > > │ v11 = f"{v10} / actual: {v4} / expected: {15}" │ 00:23:24 verbose #13130 > > │ del v4, v10 │ 00:23:24 verbose #13131 > > │ print(v11) │ 00:23:24 verbose #13132 > > │ v17 = v7 == False │ 00:23:24 verbose #13133 > > │ del v7 │ 00:23:24 verbose #13134 > > │ if v17: │ 00:23:24 verbose #13135 > > │ del v17 │ 00:23:24 verbose #13136 > > │ raise Exception(v11) │ 00:23:24 verbose #13137 > > │ else: │ 00:23:24 verbose #13138 > > │ del v11, v17 │ 00:23:24 verbose #13139 > > │ return │ 00:23:24 verbose #13140 > > │ def main(): │ 00:23:24 verbose #13141 > > │ return method0() │ 00:23:24 verbose #13142 > > │ │ 00:23:24 verbose #13143 > > │ if __name__ == '__main__': result = main(); None if result is None else │ 00:23:24 verbose #13144 > > │ print(result) │ 00:23:24 verbose #13145 > > │ │ 00:23:24 verbose #13146 > > │ .fsx output: │ 00:23:24 verbose #13147 > > │ __assert_eq / actual: 15 / expected: 15 │ 00:23:24 verbose #13148 > > │ │ 00:23:24 verbose #13149 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:23:24 verbose #13150 > > 00:23:24 verbose #13151 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:23:24 verbose #13152 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:23:24 verbose #13153 > > │ ### join_body_unit │ 00:23:24 verbose #13154 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:23:24 verbose #13155 > > 00:23:24 verbose #13156 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:23:24 verbose #13157 > > inl join_body_unit body d x = 00:23:24 verbose #13158 > > if var_is d |> not 00:23:24 verbose #13159 > > then body x 00:23:24 verbose #13160 > > else 00:23:24 verbose #13161 > > inl x = dyn x 00:23:24 verbose #13162 > > join body x 00:23:24 verbose #13163 > > 00:23:24 verbose #13164 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:23:24 verbose #13165 > > //// test 00:23:24 verbose #13166 > > ///! fsharp 00:23:24 verbose #13167 > > ///! cuda 00:23:24 verbose #13168 > > ///! rust 00:23:24 verbose #13169 > > ///! typescript 00:23:24 verbose #13170 > > ///! python 00:23:24 verbose #13171 > > //// print_code=true 00:23:24 verbose #13172 > > 00:23:24 verbose #13173 > > [[ 5i32; 4; join 3; 2; 1 ]] 00:23:24 verbose #13174 > > |> fold_list (fun acc n => join_body_unit ((+) acc) n n) 0 00:23:24 verbose #13175 > > |> _assert_eq 15 00:23:42 verbose #13176 > > 00:23:42 verbose #13177 > > ╭─[ 17.67s - return value ]────────────────────────────────────────────────────╮ 00:23:42 verbose #13178 > > │ .py output (Cuda): │ 00:23:42 verbose #13179 > > │ __assert_eq / actual: 15 / expected: 15 │ 00:23:42 verbose #13180 > > │ │ 00:23:42 verbose #13181 > > │ .rs output: │ 00:23:42 verbose #13182 > > │ __assert_eq / actual: 15 / expected: 15 │ 00:23:42 verbose #13183 > > │ │ 00:23:42 verbose #13184 > > │ .ts output: │ 00:23:42 verbose #13185 > > │ __assert_eq / actual: 15 / expected: 15 │ 00:23:42 verbose #13186 > > │ │ 00:23:42 verbose #13187 > > │ .py output: │ 00:23:42 verbose #13188 > > │ __assert_eq / actual: 15 / expected: 15 │ 00:23:42 verbose #13189 > > │ │ 00:23:42 verbose #13190 > > │ │ 00:23:42 verbose #13191 > > │ │ 00:23:42 verbose #13192 > > │ │ 00:23:42 verbose #13193 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:23:42 verbose #13194 > > 00:23:42 verbose #13195 > > ╭─[ 17.67s - stdout ]──────────────────────────────────────────────────────────╮ 00:23:42 verbose #13196 > > │ .fsx: │ 00:23:42 verbose #13197 > > │ let rec method1 () : int32 = │ 00:23:42 verbose #13198 > > │ 3 │ 00:23:42 verbose #13199 > > │ and method2 (v0 : int32) : int32 = │ 00:23:42 verbose #13200 > > │ let v1 : int32 = 9 + v0 │ 00:23:42 verbose #13201 > > │ v1 │ 00:23:42 verbose #13202 > > │ and method3 (v0 : bool) : bool = │ 00:23:42 verbose #13203 > > │ v0 │ 00:23:42 verbose #13204 > > │ and closure0 (v0 : string) () : unit = │ 00:23:42 verbose #13205 > > │ let v1 : (string -> unit) = System.Console.WriteLine │ 00:23:42 verbose #13206 > > │ v1 v0 │ 00:23:42 verbose #13207 > > │ and method0 () : unit = │ 00:23:42 verbose #13208 > > │ let v0 : int32 = method1() │ 00:23:42 verbose #13209 > > │ let v1 : int32 = method2(v0) │ 00:23:42 verbose #13210 > > │ let v2 : int32 = v1 + 2 │ 00:23:42 verbose #13211 > > │ let v3 : int32 = v2 + 1 │ 00:23:42 verbose #13212 > > │ let v4 : bool = v3 = 15 │ 00:23:42 verbose #13213 > > │ let v6 : bool = │ 00:23:42 verbose #13214 > > │ if v4 then │ 00:23:42 verbose #13215 > > │ true │ 00:23:42 verbose #13216 > > │ else │ 00:23:42 verbose #13217 > > │ method3(v4) │ 00:23:42 verbose #13218 > > │ let v7 : string = "__assert_eq" │ 00:23:42 verbose #13219 > > │ let v8 : string = $"{v7} / actual: %A{v3} / expected: %A{15}" │ 00:23:42 verbose #13220 > > │ let v11 : unit = () │ 00:23:42 verbose #13221 > > │ let v12 : (unit -> unit) = closure0(v8) │ 00:23:42 verbose #13222 > > │ let v13 : unit = (fun () -> v12 (); v11) () │ 00:23:42 verbose #13223 > > │ let v15 : bool = v6 = false │ 00:23:42 verbose #13224 > > │ if v15 then │ 00:23:42 verbose #13225 > > │ failwith<unit> v8 │ 00:23:42 verbose #13226 > > │ method0() │ 00:23:42 verbose #13227 > > │ │ 00:23:42 verbose #13228 > > │ │ 00:23:42 verbose #13229 > > │ .rs: │ 00:23:42 verbose #13230 > > │ #![allow(dead_code)] │ 00:23:42 verbose #13231 > > │ #![allow(non_camel_case_types)] │ 00:23:42 verbose #13232 > > │ #![allow(non_snake_case)] │ 00:23:42 verbose #13233 > > │ #![allow(non_upper_case_globals)] │ 00:23:42 verbose #13234 > > │ #![allow(unreachable_code)] │ 00:23:42 verbose #13235 > > │ #![allow(unused_attributes)] │ 00:23:42 verbose #13236 > > │ #![allow(unused_imports)] │ 00:23:42 verbose #13237 > > │ #![allow(unused_macros)] │ 00:23:42 verbose #13238 > > │ #![allow(unused_parens)] │ 00:23:42 verbose #13239 > > │ #![allow(unused_variables)] │ 00:23:42 verbose #13240 > > │ mod module_e782e7b7 { │ 00:23:42 verbose #13241 > > │ pub mod Spiral_builder { │ 00:23:42 verbose #13242 > > │ use super::*; │ 00:23:42 verbose #13243 > > │ use fable_library_rust::Native_::on_startup; │ 00:23:42 verbose #13244 > > │ use fable_library_rust::String_::printfn; │ 00:23:42 verbose #13245 > > │ use fable_library_rust::String_::sprintf; │ 00:23:42 verbose #13246 > > │ use fable_library_rust::String_::string; │ 00:23:42 verbose #13247 > > │ pub fn method1() -> i32 { │ 00:23:42 verbose #13248 > > │ 3_i32 │ 00:23:42 verbose #13249 > > │ } │ 00:23:42 verbose #13250 > > │ pub fn method2(v0: i32) -> i32 { │ 00:23:42 verbose #13251 > > │ 9_i32 + v0 │ 00:23:42 verbose #13252 > > │ } │ 00:23:42 verbose #13253 > > │ pub fn method3(v0: bool) -> bool { │ 00:23:42 verbose #13254 > > │ v0 │ 00:23:42 verbose #13255 > > │ } │ 00:23:42 verbose #13256 > > │ pub fn closure0(v0: string, unitVar: ()) { │ 00:23:42 verbose #13257 > > │ printfn!("{0}", v0); │ 00:23:42 verbose #13258 > > │ } │ 00:23:42 verbose #13259 > > │ pub fn method0() { │ 00:23:42 verbose #13260 > > │ let v3: i32 = Spiral_builder::method2(Spiral_builder::method1()) │ 00:23:42 verbose #13261 > > │ + 2_i32 + 1_i32; │ 00:23:42 verbose #13262 > > │ let v4: bool = v3 == 15_i32; │ 00:23:42 verbose #13263 > > │ let v6: bool = if v4 { │ 00:23:42 verbose #13264 > > │ true │ 00:23:42 verbose #13265 > > │ } else { │ 00:23:42 verbose #13266 > > │ Spiral_builder::method3(v4) │ 00:23:42 verbose #13267 > > │ }; │ 00:23:42 verbose #13268 > > │ let v8: string = sprintf!( │ 00:23:42 verbose #13269 > > │ "{} / actual: {:?} / expected: {:?}", │ 00:23:42 verbose #13270 > > │ string("__assert_eq"), │ 00:23:42 verbose #13271 > > │ v3, │ 00:23:42 verbose #13272 > > │ 15_i32 │ 00:23:42 verbose #13273 > > │ ); │ 00:23:42 verbose #13274 > > │ let v13: () = { │ 00:23:42 verbose #13275 > > │ Spiral_builder::closure0(v8.clone(), ()); │ 00:23:42 verbose #13276 > > │ () │ 00:23:42 verbose #13277 > > │ }; │ 00:23:42 verbose #13278 > > │ if v6 == false { │ 00:23:42 verbose #13279 > > │ panic!("{}", v8,); │ 00:23:42 verbose #13280 > > │ } │ 00:23:42 verbose #13281 > > │ } │ 00:23:42 verbose #13282 > > │ on_startup!(Spiral_builder::method0()); │ 00:23:42 verbose #13283 > > │ } │ 00:23:42 verbose #13284 > > │ } │ 00:23:42 verbose #13285 > > │ pub use module_e782e7b7::*; │ 00:23:42 verbose #13286 > > │ │ 00:23:42 verbose #13287 > > │ .ts: │ 00:23:42 verbose #13288 > > │ import { int32 } from "./fable_modules/fable-library-ts.4.21.0/Int32.js"; │ 00:23:42 verbose #13289 > > │ import { interpolate, toText } from │ 00:23:42 verbose #13290 > > │ "./fable_modules/fable-library-ts.4.21.0/String.js"; │ 00:23:42 verbose #13291 > > │ │ 00:23:42 verbose #13292 > > │ export function method1(): int32 { │ 00:23:42 verbose #13293 > > │ return 3; │ 00:23:42 verbose #13294 > > │ } │ 00:23:42 verbose #13295 > > │ │ 00:23:42 verbose #13296 > > │ export function method2(v0: int32): int32 { │ 00:23:42 verbose #13297 > > │ return 9 + v0; │ 00:23:42 verbose #13298 > > │ } │ 00:23:42 verbose #13299 > > │ │ 00:23:42 verbose #13300 > > │ export function method3(v0: boolean): boolean { │ 00:23:42 verbose #13301 > > │ return v0; │ 00:23:42 verbose #13302 > > │ } │ 00:23:42 verbose #13303 > > │ │ 00:23:42 verbose #13304 > > │ export function closure0(v0: string, unitVar: void): void { │ 00:23:42 verbose #13305 > > │ console.log(v0); │ 00:23:42 verbose #13306 > > │ } │ 00:23:42 verbose #13307 > > │ │ 00:23:42 verbose #13308 > > │ export function method0(): void { │ 00:23:42 verbose #13309 > > │ const v3: int32 = ((method2(method1()) + 2) + 1) | 0; │ 00:23:42 verbose #13310 > > │ const v4: boolean = v3 === 15; │ 00:23:42 verbose #13311 > > │ const v6: boolean = v4 ? true : method3(v4); │ 00:23:42 verbose #13312 > > │ const v8: string = toText(interpolate("%P() / actual: %A%P() / expected: │ 00:23:42 verbose #13313 > > │ %A%P()", ["__assert_eq", v3, 15])); │ 00:23:42 verbose #13314 > > │ let v13: any; │ 00:23:42 verbose #13315 > > │ closure0(v8, undefined); │ 00:23:42 verbose #13316 > > │ v13 = undefined; │ 00:23:42 verbose #13317 > > │ if (v6 === false) { │ 00:23:42 verbose #13318 > > │ throw new Error(v8); │ 00:23:42 verbose #13319 > > │ } │ 00:23:42 verbose #13320 > > │ } │ 00:23:42 verbose #13321 > > │ │ 00:23:42 verbose #13322 > > │ method0(); │ 00:23:42 verbose #13323 > > │ │ 00:23:42 verbose #13324 > > │ │ 00:23:42 verbose #13325 > > │ │ 00:23:42 verbose #13326 > > │ // spiral_builder.process_typescript │ 00:23:42 verbose #13327 > > │ │ 00:23:42 verbose #13328 > > │ .py: │ 00:23:42 verbose #13329 > > │ from fable_modules.fable_library.string_ import (to_text, interpolate) │ 00:23:42 verbose #13330 > > │ │ 00:23:42 verbose #13331 > > │ def method1(__unit: None=None) -> int: │ 00:23:42 verbose #13332 > > │ return 3 │ 00:23:42 verbose #13333 > > │ │ 00:23:42 verbose #13334 > > │ │ 00:23:42 verbose #13335 > > │ def method2(v0: int) -> int: │ 00:23:42 verbose #13336 > > │ return 9 + v0 │ 00:23:42 verbose #13337 > > │ │ 00:23:42 verbose #13338 > > │ │ 00:23:42 verbose #13339 > > │ def method3(v0: bool) -> bool: │ 00:23:42 verbose #13340 > > │ return v0 │ 00:23:42 verbose #13341 > > │ │ 00:23:42 verbose #13342 > > │ │ 00:23:42 verbose #13343 > > │ def closure0(v0: str, unit_var: None) -> None: │ 00:23:42 verbose #13344 > > │ print(v0) │ 00:23:42 verbose #13345 > > │ │ 00:23:42 verbose #13346 > > │ │ 00:23:42 verbose #13347 > > │ def method0(__unit: None=None) -> None: │ 00:23:42 verbose #13348 > > │ v3: int = ((method2(method1()) + 2) + 1) or 0 │ 00:23:42 verbose #13349 > > │ v4: bool = v3 == 15 │ 00:23:42 verbose #13350 > > │ v6: bool = True if v4 else method3(v4) │ 00:23:42 verbose #13351 > > │ v8: str = to_text(interpolate("%P() / actual: %A%P() / expected: │ 00:23:42 verbose #13352 > > │ %A%P()", ["__assert_eq", v3, 15])) │ 00:23:42 verbose #13353 > > │ v13: None │ 00:23:42 verbose #13354 > > │ closure0(v8, None) │ 00:23:42 verbose #13355 > > │ v13 = None │ 00:23:42 verbose #13356 > > │ if v6 == False: │ 00:23:42 verbose #13357 > > │ raise Exception(v8) │ 00:23:42 verbose #13358 > > │ │ 00:23:42 verbose #13359 > > │ │ 00:23:42 verbose #13360 > > │ │ 00:23:42 verbose #13361 > > │ method0() │ 00:23:42 verbose #13362 > > │ │ 00:23:42 verbose #13363 > > │ │ 00:23:42 verbose #13364 > > │ │ 00:23:42 verbose #13365 > > │ # spiral_builder.process_python │ 00:23:42 verbose #13366 > > │ │ 00:23:42 verbose #13367 > > │ .py: │ 00:23:42 verbose #13368 > > │ kernel = r""" │ 00:23:42 verbose #13369 > > │ """ │ 00:23:42 verbose #13370 > > │ class static_array(): │ 00:23:42 verbose #13371 > > │ def __init__(self, length): │ 00:23:42 verbose #13372 > > │ self.ptr = [] │ 00:23:42 verbose #13373 > > │ for _ in range(length): │ 00:23:42 verbose #13374 > > │ self.ptr.append(None) │ 00:23:42 verbose #13375 > > │ │ 00:23:42 verbose #13376 > > │ def __getitem__(self, index): │ 00:23:42 verbose #13377 > > │ assert 0 <= index < len(self.ptr), "The get index needs to be in │ 00:23:42 verbose #13378 > > │ range." │ 00:23:42 verbose #13379 > > │ return self.ptr[index] │ 00:23:42 verbose #13380 > > │ │ 00:23:42 verbose #13381 > > │ def __setitem__(self, index, value): │ 00:23:42 verbose #13382 > > │ assert 0 <= index < len(self.ptr), "The set index needs to be in │ 00:23:42 verbose #13383 > > │ range." │ 00:23:42 verbose #13384 > > │ self.ptr[index] = value │ 00:23:42 verbose #13385 > > │ │ 00:23:42 verbose #13386 > > │ class static_array_list(static_array): │ 00:23:42 verbose #13387 > > │ def __init__(self, length): │ 00:23:42 verbose #13388 > > │ super().__init__(length) │ 00:23:42 verbose #13389 > > │ self.length = 0 │ 00:23:42 verbose #13390 > > │ │ 00:23:42 verbose #13391 > > │ def __getitem__(self, index): │ 00:23:42 verbose #13392 > > │ assert 0 <= index < self.length, "The get index needs to be in │ 00:23:42 verbose #13393 > > │ range." │ 00:23:42 verbose #13394 > > │ return self.ptr[index] │ 00:23:42 verbose #13395 > > │ │ 00:23:42 verbose #13396 > > │ def __setitem__(self, index, value): │ 00:23:42 verbose #13397 > > │ assert 0 <= index < self.length, "The set index needs to be in │ 00:23:42 verbose #13398 > > │ range." │ 00:23:42 verbose #13399 > > │ self.ptr[index] = value │ 00:23:42 verbose #13400 > > │ │ 00:23:42 verbose #13401 > > │ def push(self,value): │ 00:23:42 verbose #13402 > > │ assert (self.length < len(self.ptr)), "The length before pushing has │ 00:23:42 verbose #13403 > > │ to be less than the maximum length of the array." │ 00:23:42 verbose #13404 > > │ self.ptr[self.length] = value │ 00:23:42 verbose #13405 > > │ self.length += 1 │ 00:23:42 verbose #13406 > > │ │ 00:23:42 verbose #13407 > > │ def pop(self): │ 00:23:42 verbose #13408 > > │ assert (0 < self.length), "The length before popping has to be │ 00:23:42 verbose #13409 > > │ greater than 0." │ 00:23:42 verbose #13410 > > │ self.length -= 1 │ 00:23:42 verbose #13411 > > │ return self.ptr[self.length] │ 00:23:42 verbose #13412 > > │ │ 00:23:42 verbose #13413 > > │ def unsafe_set_length(self,i): │ 00:23:42 verbose #13414 > > │ assert 0 <= i <= len(self.ptr), "The new length has to be in range." │ 00:23:42 verbose #13415 > > │ self.length = i │ 00:23:42 verbose #13416 > > │ │ 00:23:42 verbose #13417 > > │ class dynamic_array(static_array): │ 00:23:42 verbose #13418 > > │ pass │ 00:23:42 verbose #13419 > > │ │ 00:23:42 verbose #13420 > > │ class dynamic_array_list(static_array_list): │ 00:23:42 verbose #13421 > > │ def length_(self): return self.length │ 00:23:42 verbose #13422 > > │ │ 00:23:42 verbose #13423 > > │ import cupy as cp │ 00:23:42 verbose #13424 > > │ from dataclasses import dataclass │ 00:23:42 verbose #13425 > > │ from typing import NamedTuple, Union, Callable, Tuple │ 00:23:42 verbose #13426 > > │ i8 = i16 = i32 = i64 = u8 = u16 = u32 = u64 = int; f32 = f64 = float; char = │ 00:23:42 verbose #13427 > > │ string = str │ 00:23:42 verbose #13428 > > │ │ 00:23:42 verbose #13429 > > │ def method1() -> i32: │ 00:23:42 verbose #13430 > > │ return 3 │ 00:23:42 verbose #13431 > > │ def method2(v0 : i32) -> i32: │ 00:23:42 verbose #13432 > > │ v1 = 9 + v0 │ 00:23:42 verbose #13433 > > │ del v0 │ 00:23:42 verbose #13434 > > │ return v1 │ 00:23:42 verbose #13435 > > │ def method3(v0 : bool) -> bool: │ 00:23:42 verbose #13436 > > │ return v0 │ 00:23:42 verbose #13437 > > │ def method0() -> None: │ 00:23:42 verbose #13438 > > │ v0 = method1() │ 00:23:42 verbose #13439 > > │ v1 = method2(v0) │ 00:23:42 verbose #13440 > > │ del v0 │ 00:23:42 verbose #13441 > > │ v2 = v1 + 2 │ 00:23:42 verbose #13442 > > │ del v1 │ 00:23:42 verbose #13443 > > │ v3 = v2 + 1 │ 00:23:42 verbose #13444 > > │ del v2 │ 00:23:42 verbose #13445 > > │ v4 = v3 == 15 │ 00:23:42 verbose #13446 > > │ if v4: │ 00:23:42 verbose #13447 > > │ v6 = True │ 00:23:42 verbose #13448 > > │ else: │ 00:23:42 verbose #13449 > > │ v6 = method3(v4) │ 00:23:42 verbose #13450 > > │ del v4 │ 00:23:42 verbose #13451 > > │ v9 = "__assert_eq" │ 00:23:42 verbose #13452 > > │ v10 = f"{v9} / actual: {v3} / expected: {15}" │ 00:23:42 verbose #13453 > > │ del v3, v9 │ 00:23:42 verbose #13454 > > │ print(v10) │ 00:23:42 verbose #13455 > > │ v16 = v6 == False │ 00:23:42 verbose #13456 > > │ del v6 │ 00:23:42 verbose #13457 > > │ if v16: │ 00:23:42 verbose #13458 > > │ del v16 │ 00:23:42 verbose #13459 > > │ raise Exception(v10) │ 00:23:42 verbose #13460 > > │ else: │ 00:23:42 verbose #13461 > > │ del v10, v16 │ 00:23:42 verbose #13462 > > │ return │ 00:23:42 verbose #13463 > > │ def main(): │ 00:23:42 verbose #13464 > > │ return method0() │ 00:23:42 verbose #13465 > > │ │ 00:23:42 verbose #13466 > > │ if __name__ == '__main__': result = main(); None if result is None else │ 00:23:42 verbose #13467 > > │ print(result) │ 00:23:42 verbose #13468 > > │ │ 00:23:42 verbose #13469 > > │ │ 00:23:42 verbose #13470 > > │ .py: │ 00:23:42 verbose #13471 > > │ kernel = r""" │ 00:23:42 verbose #13472 > > │ """ │ 00:23:42 verbose #13473 > > │ class static_array(): │ 00:23:42 verbose #13474 > > │ def __init__(self, length): │ 00:23:42 verbose #13475 > > │ self.ptr = [] │ 00:23:42 verbose #13476 > > │ for _ in range(length): │ 00:23:42 verbose #13477 > > │ self.ptr.append(None) │ 00:23:42 verbose #13478 > > │ │ 00:23:42 verbose #13479 > > │ def __getitem__(self, index): │ 00:23:42 verbose #13480 > > │ assert 0 <= index < len(self.ptr), "The get index needs to be in │ 00:23:42 verbose #13481 > > │ range." │ 00:23:42 verbose #13482 > > │ return self.ptr[index] │ 00:23:42 verbose #13483 > > │ │ 00:23:42 verbose #13484 > > │ def __setitem__(self, index, value): │ 00:23:42 verbose #13485 > > │ assert 0 <= index < len(self.ptr), "The set index needs to be in │ 00:23:42 verbose #13486 > > │ range." │ 00:23:42 verbose #13487 > > │ self.ptr[index] = value │ 00:23:42 verbose #13488 > > │ │ 00:23:42 verbose #13489 > > │ class static_array_list(static_array): │ 00:23:42 verbose #13490 > > │ def __init__(self, length): │ 00:23:42 verbose #13491 > > │ super().__init__(length) │ 00:23:42 verbose #13492 > > │ self.length = 0 │ 00:23:42 verbose #13493 > > │ │ 00:23:42 verbose #13494 > > │ def __getitem__(self, index): │ 00:23:42 verbose #13495 > > │ assert 0 <= index < self.length, "The get index needs to be in │ 00:23:42 verbose #13496 > > │ range." │ 00:23:42 verbose #13497 > > │ return self.ptr[index] │ 00:23:42 verbose #13498 > > │ │ 00:23:42 verbose #13499 > > │ def __setitem__(self, index, value): │ 00:23:42 verbose #13500 > > │ assert 0 <= index < self.length, "The set index needs to be in │ 00:23:42 verbose #13501 > > │ range." │ 00:23:42 verbose #13502 > > │ self.ptr[index] = value │ 00:23:42 verbose #13503 > > │ │ 00:23:42 verbose #13504 > > │ def push(self,value): │ 00:23:42 verbose #13505 > > │ assert (self.length < len(self.ptr)), "The length before pushing has │ 00:23:42 verbose #13506 > > │ to be less than the maximum length of the array." │ 00:23:42 verbose #13507 > > │ self.ptr[self.length] = value │ 00:23:42 verbose #13508 > > │ self.length += 1 │ 00:23:42 verbose #13509 > > │ │ 00:23:42 verbose #13510 > > │ def pop(self): │ 00:23:42 verbose #13511 > > │ assert (0 < self.length), "The length before popping has to be │ 00:23:42 verbose #13512 > > │ greater than 0." │ 00:23:42 verbose #13513 > > │ self.length -= 1 │ 00:23:42 verbose #13514 > > │ return self.ptr[self.length] │ 00:23:42 verbose #13515 > > │ │ 00:23:42 verbose #13516 > > │ def unsafe_set_length(self,i): │ 00:23:42 verbose #13517 > > │ assert 0 <= i <= len(self.ptr), "The new length has to be in range." │ 00:23:42 verbose #13518 > > │ self.length = i │ 00:23:42 verbose #13519 > > │ │ 00:23:42 verbose #13520 > > │ class dynamic_array(static_array): │ 00:23:42 verbose #13521 > > │ pass │ 00:23:42 verbose #13522 > > │ │ 00:23:42 verbose #13523 > > │ class dynamic_array_list(static_array_list): │ 00:23:42 verbose #13524 > > │ def length_(self): return self.length │ 00:23:42 verbose #13525 > > │ │ 00:23:42 verbose #13526 > > │ import cupy as cp │ 00:23:42 verbose #13527 > > │ from dataclasses import dataclass │ 00:23:42 verbose #13528 > > │ from typing import NamedTuple, Union, Callable, Tuple │ 00:23:42 verbose #13529 > > │ i8 = i16 = i32 = i64 = u8 = u16 = u32 = u64 = int; f32 = f64 = float; char = │ 00:23:42 verbose #13530 > > │ string = str │ 00:23:42 verbose #13531 > > │ │ 00:23:42 verbose #13532 > > │ def method1() -> i32: │ 00:23:42 verbose #13533 > > │ return 3 │ 00:23:42 verbose #13534 > > │ def method2(v0 : i32) -> i32: │ 00:23:42 verbose #13535 > > │ v1 = 9 + v0 │ 00:23:42 verbose #13536 > > │ del v0 │ 00:23:42 verbose #13537 > > │ return v1 │ 00:23:42 verbose #13538 > > │ def method3(v0 : bool) -> bool: │ 00:23:42 verbose #13539 > > │ return v0 │ 00:23:42 verbose #13540 > > │ def method0() -> None: │ 00:23:42 verbose #13541 > > │ v0 = method1() │ 00:23:42 verbose #13542 > > │ v1 = method2(v0) │ 00:23:42 verbose #13543 > > │ del v0 │ 00:23:42 verbose #13544 > > │ v2 = v1 + 2 │ 00:23:42 verbose #13545 > > │ del v1 │ 00:23:42 verbose #13546 > > │ v3 = v2 + 1 │ 00:23:42 verbose #13547 > > │ del v2 │ 00:23:42 verbose #13548 > > │ v4 = v3 == 15 │ 00:23:42 verbose #13549 > > │ if v4: │ 00:23:42 verbose #13550 > > │ v6 = True │ 00:23:42 verbose #13551 > > │ else: │ 00:23:42 verbose #13552 > > │ v6 = method3(v4) │ 00:23:42 verbose #13553 > > │ del v4 │ 00:23:42 verbose #13554 > > │ v9 = "__assert_eq" │ 00:23:42 verbose #13555 > > │ v10 = f"{v9} / actual: {v3} / expected: {15}" │ 00:23:42 verbose #13556 > > │ del v3, v9 │ 00:23:42 verbose #13557 > > │ print(v10) │ 00:23:42 verbose #13558 > > │ v16 = v6 == False │ 00:23:42 verbose #13559 > > │ del v6 │ 00:23:42 verbose #13560 > > │ if v16: │ 00:23:42 verbose #13561 > > │ del v16 │ 00:23:42 verbose #13562 > > │ raise Exception(v10) │ 00:23:42 verbose #13563 > > │ else: │ 00:23:42 verbose #13564 > > │ del v10, v16 │ 00:23:42 verbose #13565 > > │ return │ 00:23:42 verbose #13566 > > │ def main(): │ 00:23:42 verbose #13567 > > │ return method0() │ 00:23:42 verbose #13568 > > │ │ 00:23:42 verbose #13569 > > │ if __name__ == '__main__': result = main(); None if result is None else │ 00:23:42 verbose #13570 > > │ print(result) │ 00:23:42 verbose #13571 > > │ │ 00:23:42 verbose #13572 > > │ .fsx output: │ 00:23:42 verbose #13573 > > │ __assert_eq / actual: 15 / expected: 15 │ 00:23:42 verbose #13574 > > │ │ 00:23:42 verbose #13575 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:23:42 verbose #13576 > > 00:23:42 verbose #13577 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:23:42 verbose #13578 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:23:42 verbose #13579 > > │ ### retry_fn' │ 00:23:42 verbose #13580 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:23:42 verbose #13581 > > 00:23:42 verbose #13582 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:23:42 verbose #13583 > > inl retry_fn' retries fn = 00:23:42 verbose #13584 > > let rec loop retry = 00:23:42 verbose #13585 > > inl is_error, result = 00:23:42 verbose #13586 > > match fn () with 00:23:42 verbose #13587 > > | Ok x => false, x 00:23:42 verbose #13588 > > | Error x => true, x 00:23:42 verbose #13589 > > if not is_error || retry >= retries 00:23:42 verbose #13590 > > then result 00:23:42 verbose #13591 > > else 00:23:42 verbose #13592 > > trace Debug 00:23:42 verbose #13593 > > fun () => $'"common.retry_fn\' / loop"' 00:23:42 verbose #13594 > > fun () => { is_error retry = $'$"{!retry}/{!retries}"' : string; 00:23:42 verbose #13595 > > result } 00:23:42 verbose #13596 > > loop (retry + 1) 00:23:42 verbose #13597 > > loop 1 00:23:42 verbose #13598 > > 00:23:42 verbose #13599 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:23:42 verbose #13600 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:23:42 verbose #13601 > > │ ## fsharp │ 00:23:42 verbose #13602 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:23:42 verbose #13603 > > 00:23:42 verbose #13604 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:23:42 verbose #13605 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:23:42 verbose #13606 > > │ ### upcast │ 00:23:42 verbose #13607 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:23:42 verbose #13608 > > 00:23:42 verbose #13609 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:23:42 verbose #13610 > > inl upcast forall t u. (x : t) : u = 00:23:42 verbose #13611 > > $'!x :> `u ' 00:23:42 verbose #13612 > > 00:23:42 verbose #13613 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:23:42 verbose #13614 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:23:42 verbose #13615 > > │ ### downcast │ 00:23:42 verbose #13616 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:23:42 verbose #13617 > > 00:23:42 verbose #13618 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:23:42 verbose #13619 > > inl downcast forall t u. (x : t) : u = 00:23:42 verbose #13620 > > $'!x :?> `u ' 00:23:43 verbose #13621 > > 00:23:43 verbose #13622 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:23:43 verbose #13623 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:23:43 verbose #13624 > > │ ### random │ 00:23:43 verbose #13625 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:23:43 verbose #13626 > > 00:23:43 verbose #13627 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:23:43 verbose #13628 > > nominal random = $'System.Random' 00:23:43 verbose #13629 > > 00:23:43 verbose #13630 > > inl random () : random = 00:23:43 verbose #13631 > > $'`random ' () 00:23:43 verbose #13632 > > 00:23:43 verbose #13633 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:23:43 verbose #13634 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:23:43 verbose #13635 > > │ ### random_next │ 00:23:43 verbose #13636 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:23:43 verbose #13637 > > 00:23:43 verbose #13638 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:23:43 verbose #13639 > > inl random_next (min : i32) (max : i32) (random : random) : i32 = 00:23:43 verbose #13640 > > $'!random.Next (!min, !max)' 00:23:44 verbose #13641 > > 00:23:44 verbose #13642 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:23:44 verbose #13643 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:23:44 verbose #13644 > > │ ### disposable │ 00:23:44 verbose #13645 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:23:44 verbose #13646 > > 00:23:44 verbose #13647 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:23:44 verbose #13648 > > nominal disposable t = $"backend_switch `({ Fsharp : $'System.IDisposable'; 00:23:44 verbose #13649 > > Python : $'object' })" 00:23:44 verbose #13650 > > 00:23:44 verbose #13651 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:23:44 verbose #13652 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:23:44 verbose #13653 > > │ ### dispose │ 00:23:44 verbose #13654 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:23:44 verbose #13655 > > 00:23:44 verbose #13656 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:23:44 verbose #13657 > > inl dispose (disposable : disposable _) : () = 00:23:44 verbose #13658 > > backend_switch { 00:23:44 verbose #13659 > > Fsharp = fun () => disposable |> $'_.Dispose()' : () 00:23:44 verbose #13660 > > Python = fun () => $'!disposable.__exit__(None, None, None)' : () 00:23:44 verbose #13661 > > } 00:23:45 verbose #13662 > > 00:23:45 verbose #13663 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:23:45 verbose #13664 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:23:45 verbose #13665 > > │ ### return │ 00:23:45 verbose #13666 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:23:45 verbose #13667 > > 00:23:45 verbose #13668 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:23:45 verbose #13669 > > inl return forall t. (x : t) : () = 00:23:45 verbose #13670 > > $'return !x ' 00:23:45 verbose #13671 > > 00:23:45 verbose #13672 > > inl return' forall t. (x : t) : t = 00:23:45 verbose #13673 > > $'return !x ' 00:23:45 verbose #13674 > > 00:23:45 verbose #13675 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:23:45 verbose #13676 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:23:45 verbose #13677 > > │ ### retry_fn │ 00:23:45 verbose #13678 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:23:45 verbose #13679 > > 00:23:45 verbose #13680 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:23:45 verbose #13681 > > inl retry_fn forall t. retries (fn : () -> t) : option t = 00:23:45 verbose #13682 > > let rec loop retry = 00:23:45 verbose #13683 > > try 00:23:45 verbose #13684 > > fun () => 00:23:45 verbose #13685 > > if retry < retries 00:23:45 verbose #13686 > > then fn () |> Some 00:23:45 verbose #13687 > > else None 00:23:45 verbose #13688 > > fun ex => 00:23:45 verbose #13689 > > trace Warning 00:23:45 verbose #13690 > > fun () => "common.retry_fn" 00:23:45 verbose #13691 > > fun () => { retry ex } 00:23:45 verbose #13692 > > None 00:23:45 verbose #13693 > > |> function 00:23:45 verbose #13694 > > | Some x => x 00:23:45 verbose #13695 > > | None => loop (retry + 1) 00:23:45 verbose #13696 > > loop 0 00:23:45 verbose #13697 > > 00:23:45 verbose #13698 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:23:45 verbose #13699 > > //// test 00:23:45 verbose #13700 > > ///! fsharp 00:23:45 verbose #13701 > > ////! cuda // v3 = $"retry: {v0} / ex: %A{v1} / {v2 ()}" 00:23:45 verbose #13702 > > ///! rust 00:23:45 verbose #13703 > > ///! typescript 00:23:45 verbose #13704 > > ///! python 00:23:45 verbose #13705 > > 00:23:45 verbose #13706 > > inl retry_fn_test = mut 0i32 00:23:45 verbose #13707 > > fun () => 00:23:45 verbose #13708 > > retry_fn_test <- *retry_fn_test + 1 00:23:45 verbose #13709 > > *retry_fn_test 00:23:45 verbose #13710 > > |> retry_fn 3i32 00:23:45 verbose #13711 > > |> _assert_eq' (Some 1i32) 00:24:10 verbose #13712 > > 00:24:10 verbose #13713 > > ╭─[ 24.22s - return value ]────────────────────────────────────────────────────╮ 00:24:10 verbose #13714 > > │ .rs output: │ 00:24:10 verbose #13715 > > │ __assert_eq' / actual: US0_0(1) / expected: US0_0(1) │ 00:24:10 verbose #13716 > > │ │ 00:24:10 verbose #13717 > > │ .ts output: │ 00:24:10 verbose #13718 > > │ __assert_eq' / actual: US0_0 1 / expected: US0_0 1 │ 00:24:10 verbose #13719 > > │ │ 00:24:10 verbose #13720 > > │ .py output: │ 00:24:10 verbose #13721 > > │ __assert_eq' / actual: US0_0 1 / expected: US0_0 1 │ 00:24:10 verbose #13722 > > │ │ 00:24:10 verbose #13723 > > │ │ 00:24:10 verbose #13724 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:24:10 verbose #13725 > > 00:24:10 verbose #13726 > > ╭─[ 24.22s - stdout ]──────────────────────────────────────────────────────────╮ 00:24:10 verbose #13727 > > │ .fsx output: │ 00:24:10 verbose #13728 > > │ __assert_eq' / actual: US0_0 1 / expected: US0_0 1 │ 00:24:10 verbose #13729 > > │ │ 00:24:10 verbose #13730 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:24:10 verbose #13731 > > 00:24:10 verbose #13732 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:24:10 verbose #13733 > > //// test 00:24:10 verbose #13734 > > ///! fsharp 00:24:10 verbose #13735 > > ////! cuda // v3 = $"retry: {v0} / ex: %A{v1} / {v2 ()}" 00:24:10 verbose #13736 > > ///! rust 00:24:10 verbose #13737 > > ///! typescript 00:24:10 verbose #13738 > > ///! python 00:24:10 verbose #13739 > > 00:24:10 verbose #13740 > > inl retry_fn_test = mut 0i32 00:24:10 verbose #13741 > > fun () => 00:24:10 verbose #13742 > > if *retry_fn_test >= 2 00:24:10 verbose #13743 > > then *retry_fn_test 00:24:10 verbose #13744 > > else 00:24:10 verbose #13745 > > retry_fn_test <- *retry_fn_test + 1 00:24:10 verbose #13746 > > failwith "test" 00:24:10 verbose #13747 > > |> retry_fn 3i32 00:24:10 verbose #13748 > > |> _assert_eq' (Some 2i32) 00:24:33 verbose #13749 > > 00:24:33 verbose #13750 > > ╭─[ 23.45s - return value ]────────────────────────────────────────────────────╮ 00:24:33 verbose #13751 > > │ │ 00:24:33 verbose #13752 > > │ .rs output: │ 00:24:33 verbose #13753 > > │ 00:00:00 warning #1 common.retry_fn / { retry = 0; ex = Exception { │ 00:24:33 verbose #13754 > > │ message: "test", │ 00:24:33 verbose #13755 > > │ } } │ 00:24:33 verbose #13756 > > │ 00:00:00 warning #2 common.retry_fn / { retry = 1; ex = Exception { │ 00:24:33 verbose #13757 > > │ message: "test", │ 00:24:33 verbose #13758 > > │ } } │ 00:24:33 verbose #13759 > > │ __assert_eq' / actual: US0_0(2) / expected: US0_0(2) │ 00:24:33 verbose #13760 > > │ │ 00:24:33 verbose #13761 > > │ │ 00:24:33 verbose #13762 > > │ .ts output: │ 00:24:33 verbose #13763 > > │ 00:00:00 warning #1 common.retry_fn / { retry = 0; ex = Error: test } │ 00:24:33 verbose #13764 > > │ 00:00:00 warning #2 common.retry_fn / { retry = 1; ex = Error: test } │ 00:24:33 verbose #13765 > > │ __assert_eq' / actual: US0_0 2 / expected: US0_0 2 │ 00:24:33 verbose #13766 > > │ │ 00:24:33 verbose #13767 > > │ │ 00:24:33 verbose #13768 > > │ .py output: │ 00:24:33 verbose #13769 > > │ 00:00:00 warning #1 common.retry_fn / { retry = 0; ex = test } │ 00:24:33 verbose #13770 > > │ 00:00:00 warning #2 common.retry_fn / { retry = 1; ex = test } │ 00:24:33 verbose #13771 > > │ __assert_eq' / actual: US0_0 2 / expected: US0_0 2 │ 00:24:33 verbose #13772 > > │ │ 00:24:33 verbose #13773 > > │ │ 00:24:33 verbose #13774 > > │ │ 00:24:33 verbose #13775 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:24:33 verbose #13776 > > 00:24:33 verbose #13777 > > ╭─[ 23.45s - stdout ]──────────────────────────────────────────────────────────╮ 00:24:33 verbose #13778 > > │ .fsx output: │ 00:24:33 verbose #13779 > > │ 00:00:00 warning #1 common.retry_fn / { retry = 0; ex = │ 00:24:33 verbose #13780 > > │ System.Exception: test │ 00:24:33 verbose #13781 > > │ at FSI_0031.closure1(Mut0 v0, Int32 v1, Unit unitVar2) │ 00:24:33 verbose #13782 > > │ at FSI_0031.method1(Mut0 v0, Int32 v1) } │ 00:24:33 verbose #13783 > > │ 00:00:00 warning #2 common.retry_fn / { retry = 1; ex = │ 00:24:33 verbose #13784 > > │ System.Exception: test │ 00:24:33 verbose #13785 > > │ at FSI_0031.closure1(Mut0 v0, Int32 v1, Unit unitVar2) │ 00:24:33 verbose #13786 > > │ at FSI_0031.method1(Mut0 v0, Int32 v1) } │ 00:24:33 verbose #13787 > > │ __assert_eq' / actual: US0_0 2 / expected: US0_0 2 │ 00:24:33 verbose #13788 > > │ │ 00:24:33 verbose #13789 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:24:33 verbose #13790 > > 00:24:33 verbose #13791 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:24:33 verbose #13792 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:24:33 verbose #13793 > > │ ## common │ 00:24:33 verbose #13794 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:24:33 verbose #13795 > > 00:24:33 verbose #13796 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:24:33 verbose #13797 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:24:33 verbose #13798 > > │ ### random' │ 00:24:33 verbose #13799 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:24:33 verbose #13800 > > 00:24:33 verbose #13801 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:24:33 verbose #13802 > > inl random' forall t. (min : t) (max : t) : t = 00:24:33 verbose #13803 > > run_target function 00:24:33 verbose #13804 > > | Rust (Contract) => fun () => 00:24:33 verbose #13805 > > failwith "common.random' / target=Rust(Contract)" 00:24:33 verbose #13806 > > | Rust _ => fun () => 00:24:33 verbose #13807 > > open rust.rust_operators 00:24:33 verbose #13808 > > !\\((min, max), $'"rand::Rng::gen_range(&mut rand::thread_rng(), 00:24:33 verbose #13809 > > $0..$1)"') 00:24:33 verbose #13810 > > | _ => fun () => 00:24:33 verbose #13811 > > random () |> random_next (i32 min) (i32 max) |> convert 00:24:34 verbose #13812 > > 00:24:34 verbose #13813 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:24:34 verbose #13814 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:24:34 verbose #13815 > > │ ### new_disposable │ 00:24:34 verbose #13816 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:24:34 verbose #13817 > > 00:24:34 verbose #13818 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:24:34 verbose #13819 > > inl new_disposable (fn : () -> ()) : disposable _ = 00:24:34 verbose #13820 > > run_target function 00:24:34 verbose #13821 > > | Rust _ => fun () => 00:24:34 verbose #13822 > > global "type Disposable (f : unit -> unit) = interface 00:24:34 verbose #13823 > > System.IDisposable with member _.Dispose () = f ()" 00:24:34 verbose #13824 > > inl fn = join fn 00:24:34 verbose #13825 > > $'new Disposable (fun () -> Fable.Core.RustInterop.emitRustExpr !fn 00:24:34 verbose #13826 > > "$0()" )' 00:24:34 verbose #13827 > > | Fsharp _ | TypeScript _ | Python _ => fun () => 00:24:34 verbose #13828 > > inl fn = join fn 00:24:34 verbose #13829 > > $'{ new System.IDisposable with member _.Dispose () = !fn () }' 00:24:34 verbose #13830 > > | Cuda _ => fun () => 00:24:34 verbose #13831 > > $'class Disposable:' 00:24:34 verbose #13832 > > $' def __init__(self, fn):' 00:24:34 verbose #13833 > > $' self.fn = fn' 00:24:34 verbose #13834 > > $' def __exit__(self, exc_type, exc_value, traceback):' 00:24:34 verbose #13835 > > $' self.fn()' 00:24:34 verbose #13836 > > $' return False' 00:24:34 verbose #13837 > > $'Disposable(!fn)' 00:24:34 verbose #13838 > > | _ => fun () => null () 00:24:34 verbose #13839 > > 00:24:34 verbose #13840 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:24:34 verbose #13841 > > //// test 00:24:34 verbose #13842 > > ///! fsharp 00:24:34 verbose #13843 > > ///! cuda 00:24:34 verbose #13844 > > ///! rust 00:24:34 verbose #13845 > > ///! typescript 00:24:34 verbose #13846 > > ///! python 00:24:34 verbose #13847 > > 00:24:34 verbose #13848 > > inl new_disposable_test = mut 0i32 00:24:34 verbose #13849 > > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1 00:24:34 verbose #13850 > > |> fun x => x : disposable () 00:24:34 verbose #13851 > > |> dispose 00:24:34 verbose #13852 > > *new_disposable_test |> _assert_eq 1 00:24:52 verbose #13853 > > 00:24:52 verbose #13854 > > ╭─[ 18.48s - return value ]────────────────────────────────────────────────────╮ 00:24:52 verbose #13855 > > │ .py output (Cuda): │ 00:24:52 verbose #13856 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:24:52 verbose #13857 > > │ │ 00:24:52 verbose #13858 > > │ .rs output: │ 00:24:52 verbose #13859 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:24:52 verbose #13860 > > │ │ 00:24:52 verbose #13861 > > │ .ts output: │ 00:24:52 verbose #13862 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:24:52 verbose #13863 > > │ │ 00:24:52 verbose #13864 > > │ .py output: │ 00:24:52 verbose #13865 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:24:52 verbose #13866 > > │ │ 00:24:52 verbose #13867 > > │ │ 00:24:52 verbose #13868 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:24:52 verbose #13869 > > 00:24:52 verbose #13870 > > ╭─[ 18.48s - stdout ]──────────────────────────────────────────────────────────╮ 00:24:52 verbose #13871 > > │ .fsx output: │ 00:24:52 verbose #13872 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:24:52 verbose #13873 > > │ │ 00:24:52 verbose #13874 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:24:52 verbose #13875 > > 00:24:52 verbose #13876 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:24:52 verbose #13877 > > //// test 00:24:52 verbose #13878 > > 00:24:52 verbose #13879 > > inl new_disposable_test = mut 0i32 00:24:52 verbose #13880 > > fun () => 00:24:52 verbose #13881 > > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1 00:24:52 verbose #13882 > > |> fun x => x : disposable () 00:24:52 verbose #13883 > > |> use 00:24:52 verbose #13884 > > |> ignore 00:24:52 verbose #13885 > > |> return 00:24:52 verbose #13886 > > |> async.new_task 00:24:52 verbose #13887 > > |> async.await_task 00:24:52 verbose #13888 > > |> async.run_synchronously 00:24:52 verbose #13889 > > *new_disposable_test |> _assert_eq 1 00:24:53 verbose #13890 > > 00:24:53 verbose #13891 > > ╭─[ 584.84ms - stdout ]────────────────────────────────────────────────────────╮ 00:24:53 verbose #13892 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:24:53 verbose #13893 > > │ │ 00:24:53 verbose #13894 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:24:53 verbose #13895 > > 00:24:53 verbose #13896 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:24:53 verbose #13897 > > //// test 00:24:53 verbose #13898 > > 00:24:53 verbose #13899 > > inl new_disposable_test = mut 0i32 00:24:53 verbose #13900 > > fun () => 00:24:53 verbose #13901 > > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1 00:24:53 verbose #13902 > > |> fun x => x : disposable () 00:24:53 verbose #13903 > > |> use 00:24:53 verbose #13904 > > |> ignore 00:24:53 verbose #13905 > > |> return 00:24:53 verbose #13906 > > |> async.new_async 00:24:53 verbose #13907 > > |> async.run_synchronously 00:24:53 verbose #13908 > > *new_disposable_test |> _assert_eq 1 00:24:54 verbose #13909 > > 00:24:54 verbose #13910 > > ╭─[ 496.97ms - stdout ]────────────────────────────────────────────────────────╮ 00:24:54 verbose #13911 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:24:54 verbose #13912 > > │ │ 00:24:54 verbose #13913 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:24:54 verbose #13914 > > 00:24:54 verbose #13915 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:24:54 verbose #13916 > > //// test 00:24:54 verbose #13917 > > 00:24:54 verbose #13918 > > inl new_disposable_test = mut 0i32 00:24:54 verbose #13919 > > fun () => 00:24:54 verbose #13920 > > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1 00:24:54 verbose #13921 > > |> fun x => x : disposable () 00:24:54 verbose #13922 > > |> ignore 00:24:54 verbose #13923 > > |> return 00:24:54 verbose #13924 > > |> async.new_async 00:24:54 verbose #13925 > > |> async.run_synchronously 00:24:54 verbose #13926 > > *new_disposable_test |> _assert_eq 0 00:24:54 verbose #13927 > > 00:24:54 verbose #13928 > > ╭─[ 482.14ms - stdout ]────────────────────────────────────────────────────────╮ 00:24:54 verbose #13929 > > │ __assert_eq / actual: 0 / expected: 0 │ 00:24:54 verbose #13930 > > │ │ 00:24:54 verbose #13931 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:24:54 verbose #13932 > > 00:24:54 verbose #13933 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:24:54 verbose #13934 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:24:54 verbose #13935 > > │ ## main │ 00:24:54 verbose #13936 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:24:54 verbose #13937 > > 00:24:54 verbose #13938 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:24:54 verbose #13939 > > inl main () = 00:24:54 verbose #13940 > > init_trace_state None 00:24:54 verbose #13941 > > inl new_disposable x : _ () = new_disposable x 00:24:54 verbose #13942 > > $'let new_disposable x = !new_disposable x' : () 00:24:54 verbose #13943 > > inl retry_fn (r : i32) (x : () -> _) : optionm'.option' () = retry_fn r x |> 00:24:54 verbose #13944 > > optionm'.box 00:24:54 verbose #13945 > > $'let retry_fn x = !retry_fn x' : () 00:24:54 verbose #13946 > > inl memoize (fn : () -> ()) : () -> () = memoize fn 00:24:54 verbose #13947 > > $'let memoize x = !memoize x' : () 00:24:55 verbose #13948 > 00:02:51 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 121422 } 00:24:55 verbose #13949 > 00:02:51 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:24:55 verbose #13950 > "nbconvert", 00:24:55 verbose #13951 > "c:/home/git/polyglot/lib/spiral/common.dib.ipynb", 00:24:55 verbose #13952 > "--to", 00:24:55 verbose #13953 > "html", 00:24:55 verbose #13954 > "--HTMLExporter.theme=dark", 00:24:55 verbose #13955 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/common.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:24:57 verbose #13956 > 00:02:53 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/common.dib.ipynb to html 00:24:57 verbose #13957 > 00:02:53 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:24:57 verbose #13958 > 00:02:53 verbose #7 ! validate(nb) 00:24:59 verbose #13959 > 00:02:55 verbose #8 ! [NbConvertApp] Writing 365441 bytes to c:\home\git\polyglot\lib\spiral\common.dib.html 00:24:59 verbose #13960 > 00:02:55 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 643 } 00:24:59 verbose #13961 > 00:02:55 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 643 } 00:24:59 verbose #13962 > 00:02:55 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:24:59 verbose #13963 > "-c", 00:24:59 verbose #13964 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/common.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:24:59 verbose #13965 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/common.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:24:59 verbose #13966 > 00:02:55 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:24:59 verbose #13967 > 00:02:55 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:24:59 verbose #13968 > 00:02:55 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 122124 } 00:24:59 debug #13969 runtime.execute_with_options_async / { exit_code = 0; output_length = 128284 } 00:24:59 debug #14 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path common.dib --retries 3 00:24:59 debug #13970 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path resultm.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:24:59 verbose #13971 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "resultm.dib", "--retries", "3"])) } 00:24:59 verbose #13972 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:24:59 verbose #13973 > "repl", 00:24:59 verbose #13974 > "--exit-after-run", 00:24:59 verbose #13975 > "--run", 00:24:59 verbose #13976 > "c:/home/git/polyglot/lib/spiral/resultm.dib", 00:24:59 verbose #13977 > "--output-path", 00:24:59 verbose #13978 > "c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb", 00:24:59 verbose #13979 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/resultm.dib" --output-path "c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:25:01 verbose #13980 > > 00:25:01 verbose #13981 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:01 verbose #13982 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:01 verbose #13983 > > │ # resultm │ 00:25:01 verbose #13984 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:05 verbose #13985 > > 00:25:05 verbose #13986 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:05 verbose #13987 > > open rust 00:25:05 verbose #13988 > > open rust_operators 00:25:07 verbose #13989 > > 00:25:07 verbose #13990 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:07 verbose #13991 > > //// test 00:25:07 verbose #13992 > > 00:25:07 verbose #13993 > > open testing 00:25:07 verbose #13994 > > 00:25:07 verbose #13995 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:07 verbose #13996 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:07 verbose #13997 > > │ ## resultm │ 00:25:07 verbose #13998 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:07 verbose #13999 > > 00:25:07 verbose #14000 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:07 verbose #14001 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:07 verbose #14002 > > │ ### from_option_error │ 00:25:07 verbose #14003 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:07 verbose #14004 > > 00:25:07 verbose #14005 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:07 verbose #14006 > > inl from_option_error error opt = 00:25:07 verbose #14007 > > match opt with 00:25:07 verbose #14008 > > | Some x => Ok x 00:25:07 verbose #14009 > > | None => Error error 00:25:07 verbose #14010 > > 00:25:07 verbose #14011 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:07 verbose #14012 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:07 verbose #14013 > > │ ### from_option │ 00:25:07 verbose #14014 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:07 verbose #14015 > > 00:25:07 verbose #14016 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:07 verbose #14017 > > inl from_option opt = 00:25:07 verbose #14018 > > opt |> from_option_error "resultm.from_option / Option does not have a 00:25:07 verbose #14019 > > value." 00:25:08 verbose #14020 > > 00:25:08 verbose #14021 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:08 verbose #14022 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:08 verbose #14023 > > │ ### flatten_option │ 00:25:08 verbose #14024 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:08 verbose #14025 > > 00:25:08 verbose #14026 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:08 verbose #14027 > > inl flatten_option forall t u. (x : option (result (option t) u)) : result 00:25:08 verbose #14028 > > (option t) u = 00:25:08 verbose #14029 > > match x with 00:25:08 verbose #14030 > > | Some (Error x) => Error x 00:25:08 verbose #14031 > > | Some (Ok (Some x)) => Ok (Some x) 00:25:08 verbose #14032 > > | _ => Ok None 00:25:08 verbose #14033 > > 00:25:08 verbose #14034 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:08 verbose #14035 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:08 verbose #14036 > > │ ### flatten │ 00:25:08 verbose #14037 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:08 verbose #14038 > > 00:25:08 verbose #14039 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:08 verbose #14040 > > inl flatten forall t u. (x : result (result t u) u) : result t u = 00:25:08 verbose #14041 > > match x with 00:25:08 verbose #14042 > > | Ok x => x 00:25:08 verbose #14043 > > | Error x => Error x 00:25:09 verbose #14044 > > 00:25:09 verbose #14045 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:09 verbose #14046 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:09 verbose #14047 > > │ ### get │ 00:25:09 verbose #14048 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:09 verbose #14049 > > 00:25:09 verbose #14050 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:09 verbose #14051 > > inl get forall t e. (source : result t e) : t = 00:25:09 verbose #14052 > > match source with 00:25:09 verbose #14053 > > | Ok x => x 00:25:09 verbose #14054 > > | Error x => failwith $'$"resultm.get / Result value was Error: {!x}"' 00:25:09 verbose #14055 > > 00:25:09 verbose #14056 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:09 verbose #14057 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:09 verbose #14058 > > │ ### map │ 00:25:09 verbose #14059 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:09 verbose #14060 > > 00:25:09 verbose #14061 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:09 verbose #14062 > > inl map forall t e u. (fn : t -> u) (source : result t e) : result u e = 00:25:09 verbose #14063 > > match source with 00:25:09 verbose #14064 > > | Ok x => x |> fn |> Ok 00:25:09 verbose #14065 > > | Error x => Error x 00:25:10 verbose #14066 > > 00:25:10 verbose #14067 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:10 verbose #14068 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:10 verbose #14069 > > │ ### map_error │ 00:25:10 verbose #14070 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:10 verbose #14071 > > 00:25:10 verbose #14072 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:10 verbose #14073 > > inl map_error forall t e u. (fn : e -> u) (source : result t e) : result t u = 00:25:10 verbose #14074 > > match source with 00:25:10 verbose #14075 > > | Ok x => Ok x 00:25:10 verbose #14076 > > | Error x => x |> fn |> Error 00:25:10 verbose #14077 > > 00:25:10 verbose #14078 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:10 verbose #14079 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:10 verbose #14080 > > │ ### unwrap_err │ 00:25:10 verbose #14081 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:10 verbose #14082 > > 00:25:10 verbose #14083 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:10 verbose #14084 > > inl unwrap_err forall t u. (x : result t u) : u = 00:25:10 verbose #14085 > > match x with 00:25:10 verbose #14086 > > | Ok x => failwith $'$"resultm.unwrap_err / x: {!x}"' 00:25:10 verbose #14087 > > | Error x => x 00:25:11 verbose #14088 > > 00:25:11 verbose #14089 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:11 verbose #14090 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:11 verbose #14091 > > │ ### ok │ 00:25:11 verbose #14092 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:11 verbose #14093 > > 00:25:11 verbose #14094 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:11 verbose #14095 > > inl ok forall t. (x : result t _) : option t = 00:25:11 verbose #14096 > > match x with 00:25:11 verbose #14097 > > | Ok x => Some x 00:25:11 verbose #14098 > > | Error _ => None 00:25:11 verbose #14099 > > 00:25:11 verbose #14100 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:11 verbose #14101 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:11 verbose #14102 > > │ ## fsharp │ 00:25:11 verbose #14103 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:11 verbose #14104 > > 00:25:11 verbose #14105 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:11 verbose #14106 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:11 verbose #14107 > > │ ### result' │ 00:25:11 verbose #14108 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:11 verbose #14109 > > 00:25:11 verbose #14110 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:11 verbose #14111 > > nominal result' t u = $'Result<`t, `u>' 00:25:11 verbose #14112 > > 00:25:11 verbose #14113 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:11 verbose #14114 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:11 verbose #14115 > > │ ### unbox │ 00:25:11 verbose #14116 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:11 verbose #14117 > > 00:25:11 verbose #14118 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:11 verbose #14119 > > inl unbox forall t u. (x : result' t u) : result t u = 00:25:11 verbose #14120 > > inl ok x : result t u = Ok x 00:25:11 verbose #14121 > > inl error x : result t u = Error x 00:25:11 verbose #14122 > > real 00:25:11 verbose #14123 > > typecase t with 00:25:11 verbose #14124 > > | () => $'match !x with Ok () -> !ok () | Error x -> !error x' : result 00:25:11 verbose #14125 > > t u 00:25:11 verbose #14126 > > | _ => $'match !x with Ok x -> !ok x | Error x -> !error x' : result t u 00:25:12 verbose #14127 > > 00:25:12 verbose #14128 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:12 verbose #14129 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:12 verbose #14130 > > │ ### box │ 00:25:12 verbose #14131 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:12 verbose #14132 > > 00:25:12 verbose #14133 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:12 verbose #14134 > > inl box forall t u. (x : result t u) : result' t u = 00:25:12 verbose #14135 > > match x with 00:25:12 verbose #14136 > > | Ok x => $'Ok !x ' 00:25:12 verbose #14137 > > | Error err => $'Error !err ' 00:25:12 verbose #14138 > > 00:25:12 verbose #14139 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:12 verbose #14140 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:12 verbose #14141 > > │ ## rust │ 00:25:12 verbose #14142 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:12 verbose #14143 > > 00:25:12 verbose #14144 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:12 verbose #14145 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:12 verbose #14146 > > │ ### anyhow_result │ 00:25:12 verbose #14147 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:12 verbose #14148 > > 00:25:12 verbose #14149 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:12 verbose #14150 > > nominal anyhow_result t = 00:25:12 verbose #14151 > > `( 00:25:12 verbose #14152 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:25:12 verbose #14153 > > Fable.Core.Emit(\"anyhow::Result<$0>\")>]]\n#endif\ntype anyhow_Result<'T> = 00:25:12 verbose #14154 > > class end" 00:25:12 verbose #14155 > > $'' : $'anyhow_Result<`t>' 00:25:12 verbose #14156 > > ) 00:25:13 verbose #14157 > > 00:25:13 verbose #14158 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:13 verbose #14159 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:13 verbose #14160 > > │ ### anyhow_error │ 00:25:13 verbose #14161 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:13 verbose #14162 > > 00:25:13 verbose #14163 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:13 verbose #14164 > > nominal anyhow_error = 00:25:13 verbose #14165 > > `( 00:25:13 verbose #14166 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:25:13 verbose #14167 > > Fable.Core.Emit(\"anyhow::Error\")>]]\n#endif\ntype anyhow_Error = class end" 00:25:13 verbose #14168 > > $'' : $'anyhow_Error' 00:25:13 verbose #14169 > > ) 00:25:13 verbose #14170 > > 00:25:13 verbose #14171 > > inl anyhow_error error = 00:25:13 verbose #14172 > > !\\(error, $'"anyhow::anyhow\!($0)"') 00:25:13 verbose #14173 > > 00:25:13 verbose #14174 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:13 verbose #14175 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:13 verbose #14176 > > │ ### try' │ 00:25:13 verbose #14177 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:13 verbose #14178 > > 00:25:13 verbose #14179 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:13 verbose #14180 > > inl try' forall t u. (x : result' t u) : t = 00:25:13 verbose #14181 > > inl is_unit = 00:25:13 verbose #14182 > > real 00:25:13 verbose #14183 > > typecase t with 00:25:13 verbose #14184 > > | () => true 00:25:13 verbose #14185 > > | _ => false 00:25:13 verbose #14186 > > if is_unit 00:25:13 verbose #14187 > > then (!\\(x, $'"true; $0?"') : bool) |> fun _ => $'' 00:25:13 verbose #14188 > > else !\\(x, $'"$0?"') 00:25:14 verbose #14189 > > 00:25:14 verbose #14190 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:14 verbose #14191 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:14 verbose #14192 > > │ ### to_try │ 00:25:14 verbose #14193 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:14 verbose #14194 > > 00:25:14 verbose #14195 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:14 verbose #14196 > > inl to_try forall t u. (x : result' t u) : rust.try t = 00:25:14 verbose #14197 > > !\\(x, $'"$0"') 00:25:14 verbose #14198 > > 00:25:14 verbose #14199 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:14 verbose #14200 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:14 verbose #14201 > > │ ### unwrap' │ 00:25:14 verbose #14202 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:14 verbose #14203 > > 00:25:14 verbose #14204 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:14 verbose #14205 > > inl unwrap' forall t u. (x : result' t u) : t = 00:25:14 verbose #14206 > > run_target function 00:25:14 verbose #14207 > > | Rust _ => fun () => !\\(x, $'"$0.unwrap()"') 00:25:14 verbose #14208 > > | _ => fun () => $'match !x with Ok x -> x | Error e -> failwith 00:25:14 verbose #14209 > > $"resultm.unwrap\' / e: {e}"' 00:25:14 verbose #14210 > > 00:25:14 verbose #14211 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:14 verbose #14212 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:14 verbose #14213 > > │ ### unwrap_err' │ 00:25:14 verbose #14214 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:14 verbose #14215 > > 00:25:14 verbose #14216 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:14 verbose #14217 > > inl unwrap_err' forall t u. (x : result' t u) : u = 00:25:14 verbose #14218 > > $'match !x with Ok x -> failwith $"resultm.unwrap_err\' / x: %A{x}" | Error 00:25:14 verbose #14219 > > x -> x' 00:25:15 verbose #14220 > > 00:25:15 verbose #14221 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:15 verbose #14222 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:15 verbose #14223 > > │ ### unbox' │ 00:25:15 verbose #14224 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:15 verbose #14225 > > 00:25:15 verbose #14226 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:15 verbose #14227 > > inl unbox' forall t u. (x : result' t u) : result t u = 00:25:15 verbose #14228 > > inl ok x : result t u = Ok x 00:25:15 verbose #14229 > > inl ok = join ok 00:25:15 verbose #14230 > > inl error x : result t u = Error x 00:25:15 verbose #14231 > > inl error = join error 00:25:15 verbose #14232 > > real 00:25:15 verbose #14233 > > typecase t with 00:25:15 verbose #14234 > > | () => 00:25:15 verbose #14235 > > (~!\\) 00:25:15 verbose #14236 > > `((result' t u -> result t u) * (result' t u -> result t u)) 00:25:15 verbose #14237 > > `(result t u) 00:25:15 verbose #14238 > > ((ok, error, x), ($'"match $2 { Ok(()) => $0(()), Err(e) => 00:25:15 verbose #14239 > > $1(e) }"' : string)) 00:25:15 verbose #14240 > > | _ => 00:25:15 verbose #14241 > > (~!\\) 00:25:15 verbose #14242 > > `((result' t u -> result t u) * (result' t u -> result t u)) 00:25:15 verbose #14243 > > `(result t u) 00:25:15 verbose #14244 > > ((ok, error, x), ($'"match $2 { Ok(x) => $0(x), Err(e) => $1(e) 00:25:15 verbose #14245 > > }"' : string)) 00:25:15 verbose #14246 > > 00:25:15 verbose #14247 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:15 verbose #14248 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:15 verbose #14249 > > │ ### map' │ 00:25:15 verbose #14250 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:15 verbose #14251 > > 00:25:15 verbose #14252 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:15 verbose #14253 > > inl map' forall t e u. (fn : t -> u) (source : result' t e) : result' u e = 00:25:15 verbose #14254 > > (!\\(source, $'"true; let _result_map_ = $0.map(|x| { //"') : bool) |> 00:25:15 verbose #14255 > > ignore 00:25:15 verbose #14256 > > (!\\(fn !\($'"x"'), $'"true; $0 })"') : bool) |> ignore 00:25:15 verbose #14257 > > !\($'"_result_map_"') 00:25:16 verbose #14258 > > 00:25:16 verbose #14259 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:16 verbose #14260 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:16 verbose #14261 > > │ ### map'' │ 00:25:16 verbose #14262 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:16 verbose #14263 > > 00:25:16 verbose #14264 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:16 verbose #14265 > > inl map'' forall t e u. (fn : t -> u) (source : result' t e) : result' u e = 00:25:16 verbose #14266 > > inl fn = join fn 00:25:16 verbose #14267 > > inl source = join source 00:25:16 verbose #14268 > > !\($'"!source.map(|x| !fn(x))"') 00:25:16 verbose #14269 > > 00:25:16 verbose #14270 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:16 verbose #14271 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:16 verbose #14272 > > │ ### map_error' │ 00:25:16 verbose #14273 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:16 verbose #14274 > > 00:25:16 verbose #14275 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:16 verbose #14276 > > inl map_error' forall t e u. (fn : e -> u) (source : result' t e) : result' t u 00:25:16 verbose #14277 > > = 00:25:16 verbose #14278 > > inl fn = join fn 00:25:16 verbose #14279 > > run_target_args (fun () => fn) function 00:25:16 verbose #14280 > > | Rust _ => fun fn => 00:25:16 verbose #14281 > > !\\((source, fn), $'"$0.map_err(|x| $1(x))"') 00:25:16 verbose #14282 > > | _ => fun fn => 00:25:16 verbose #14283 > > $'match !source with Ok x -> Ok x | Error x -> Error (!fn x)' : 00:25:16 verbose #14284 > > result' t u 00:25:17 verbose #14285 > > 00:25:17 verbose #14286 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:17 verbose #14287 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:17 verbose #14288 > > │ ### map_error'' │ 00:25:17 verbose #14289 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:17 verbose #14290 > > 00:25:17 verbose #14291 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:17 verbose #14292 > > inl map_error'' forall t e u. (fn : e -> u) (source : result' t e) : result' t u 00:25:17 verbose #14293 > > = 00:25:17 verbose #14294 > > (!\\(source, $'"true; let _result_map_error__ = $0.map_err(|x| { //"') : 00:25:17 verbose #14295 > > bool) |> ignore 00:25:17 verbose #14296 > > (!\\(fn !\($'"x"'), $'"true; $0 })"') : bool) |> ignore 00:25:17 verbose #14297 > > !\($'"_result_map_error__"') 00:25:17 verbose #14298 > > 00:25:17 verbose #14299 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:17 verbose #14300 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:17 verbose #14301 > > │ ### option_ok_or │ 00:25:17 verbose #14302 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:17 verbose #14303 > > 00:25:17 verbose #14304 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:17 verbose #14305 > > inl option_ok_or forall t e. (e : e) (source : optionm'.option' t) : result' t e 00:25:17 verbose #14306 > > = 00:25:17 verbose #14307 > > !\\(source, $'"$0.ok_or(!e)"') 00:25:18 verbose #14308 > > 00:25:18 verbose #14309 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:18 verbose #14310 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:18 verbose #14311 > > │ ### unwrap_or_else │ 00:25:18 verbose #14312 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:18 verbose #14313 > > 00:25:18 verbose #14314 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:18 verbose #14315 > > inl unwrap_or_else forall t e u. (fn : e -> u) (source : result' t e) : u = 00:25:18 verbose #14316 > > (!\\(source, $'"true; let _result_unwrap_or_else = $0.unwrap_or_else(|x| { 00:25:18 verbose #14317 > > //"') : bool) |> ignore 00:25:18 verbose #14318 > > (!\\(fn !\($'"x"'), $'"true; $0 })"') : bool) |> ignore 00:25:18 verbose #14319 > > !\($'"_result_unwrap_or_else"') 00:25:18 verbose #14320 > > 00:25:18 verbose #14321 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:18 verbose #14322 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:18 verbose #14323 > > │ ### map_or_else │ 00:25:18 verbose #14324 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:18 verbose #14325 > > 00:25:18 verbose #14326 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:18 verbose #14327 > > inl map_or_else forall t e u v. (fn : e -> v) (fn2 : u -> v) (source : result' t 00:25:18 verbose #14328 > > e) : v = 00:25:18 verbose #14329 > > (!\\(source, $'"true; let _result_map_or_else = $0.map_or_else(|x| { //"') : 00:25:18 verbose #14330 > > bool) |> ignore 00:25:18 verbose #14331 > > (!\\(fn !\($'"x"'), $'"true; $0 }, |x| { //"') : bool) |> ignore 00:25:18 verbose #14332 > > (!\\(fn2 !\($'"x"'), $'"true; $0 })"') : bool) |> ignore 00:25:18 verbose #14333 > > !\($'"_result_map_or_else"') 00:25:18 verbose #14334 > > 00:25:18 verbose #14335 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:18 verbose #14336 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:18 verbose #14337 > > │ ### as_ref │ 00:25:18 verbose #14338 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:18 verbose #14339 > > 00:25:18 verbose #14340 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:18 verbose #14341 > > inl as_ref forall t e. (source : result' t e) : result' (rust.ref t) (rust.ref 00:25:18 verbose #14342 > > e) = 00:25:18 verbose #14343 > > !\($'"!source.as_ref()"') 00:25:19 verbose #14344 > > 00:25:19 verbose #14345 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:19 verbose #14346 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:19 verbose #14347 > > │ ### as_ref' │ 00:25:19 verbose #14348 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:19 verbose #14349 > > 00:25:19 verbose #14350 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:19 verbose #14351 > > inl as_ref' forall t e. (source : rust.ref (result' t e)) : result' (rust.ref t) 00:25:19 verbose #14352 > > (rust.ref e) = 00:25:19 verbose #14353 > > !\($'"!source.as_ref()"') 00:25:19 verbose #14354 > > 00:25:19 verbose #14355 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:19 verbose #14356 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:19 verbose #14357 > > │ ### unwrap_or' │ 00:25:19 verbose #14358 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:19 verbose #14359 > > 00:25:19 verbose #14360 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:19 verbose #14361 > > inl unwrap_or' forall t u. (default : t) (x : result' t u) : t = 00:25:19 verbose #14362 > > !\\((x, default), $'"$0.unwrap_or($1)"') 00:25:20 verbose #14363 > > 00:25:20 verbose #14364 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:20 verbose #14365 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:20 verbose #14366 > > │ ### expect │ 00:25:20 verbose #14367 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:20 verbose #14368 > > 00:25:20 verbose #14369 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:20 verbose #14370 > > inl expect forall t u. (error : rust.ref string) (x : result' t u) : t = 00:25:20 verbose #14371 > > !\($'"!x.expect(&!error)"') 00:25:20 verbose #14372 > > 00:25:20 verbose #14373 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:20 verbose #14374 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:20 verbose #14375 > > │ ### is_err │ 00:25:20 verbose #14376 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:20 verbose #14377 > > 00:25:20 verbose #14378 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:20 verbose #14379 > > inl is_err forall t u. (x : result' t u) : bool = 00:25:20 verbose #14380 > > run_target function 00:25:20 verbose #14381 > > | Rust _ => fun () => !\\(x, $'"$0.is_err()"') 00:25:20 verbose #14382 > > | _ => fun () => true 00:25:21 verbose #14383 > > 00:25:21 verbose #14384 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:21 verbose #14385 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:21 verbose #14386 > > │ ### ok' │ 00:25:21 verbose #14387 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:21 verbose #14388 > > 00:25:21 verbose #14389 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:21 verbose #14390 > > inl ok' forall t. (x : result' t _) : optionm'.option' t = 00:25:21 verbose #14391 > > run_target function 00:25:21 verbose #14392 > > | Rust _ => fun () => !\\(x, $'"$0.ok()"') 00:25:21 verbose #14393 > > | _ => fun () => $'match !x with Ok x -> Some x | Error _ -> None' 00:25:21 verbose #14394 > > 00:25:21 verbose #14395 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:21 verbose #14396 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:21 verbose #14397 > > │ ### err │ 00:25:21 verbose #14398 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:21 verbose #14399 > > 00:25:21 verbose #14400 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:21 verbose #14401 > > inl err forall t u. (x : u) : result' t u = 00:25:21 verbose #14402 > > run_target function 00:25:21 verbose #14403 > > | Rust _ => fun () => !\\(x, $'"Err($0)"') 00:25:21 verbose #14404 > > | _ => fun () => $'!x |> Error' 00:25:22 verbose #14405 > > 00:25:22 verbose #14406 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:22 verbose #14407 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:22 verbose #14408 > > │ ### ok'' │ 00:25:22 verbose #14409 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:22 verbose #14410 > > 00:25:22 verbose #14411 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:22 verbose #14412 > > inl ok'' forall t u. (x : t) : result' t u = 00:25:22 verbose #14413 > > run_target function 00:25:22 verbose #14414 > > | Rust _ => fun () => !\\(x, $'"Ok($0)"') 00:25:22 verbose #14415 > > | _ => fun () => $'!x |> Ok' 00:25:22 verbose #14416 > > 00:25:22 verbose #14417 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:22 verbose #14418 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:22 verbose #14419 > > │ ### transpose │ 00:25:22 verbose #14420 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:22 verbose #14421 > > 00:25:22 verbose #14422 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:22 verbose #14423 > > inl transpose forall t u. (x : optionm'.option' (result' t u)) : result' 00:25:22 verbose #14424 > > (optionm'.option' t) u = 00:25:22 verbose #14425 > > !\\(x, $'"$0.transpose()"') 00:25:22 verbose #14426 > > 00:25:22 verbose #14427 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:22 verbose #14428 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:22 verbose #14429 > > │ ### rc_try_unwrap │ 00:25:22 verbose #14430 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:22 verbose #14431 > > 00:25:22 verbose #14432 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:22 verbose #14433 > > inl rc_try_unwrap forall t. (x : rust.rc t) : result' t (rust.rc t) = 00:25:22 verbose #14434 > > !\\(x, $'"std::rc::Rc::try_unwrap($0)"') 00:25:23 verbose #14435 > > 00:25:23 verbose #14436 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:23 verbose #14437 > > //// test 00:25:23 verbose #14438 > > ///! rust 00:25:23 verbose #14439 > > 00:25:23 verbose #14440 > > rust.new_rc true 00:25:23 verbose #14441 > > |> rc_try_unwrap 00:25:23 verbose #14442 > > |> unbox 00:25:23 verbose #14443 > > |> _assert_eq (Ok true) 00:25:40 verbose #14444 > > 00:25:40 verbose #14445 > > ╭─[ 16.95s - return value ]────────────────────────────────────────────────────╮ 00:25:40 verbose #14446 > > │ __assert_eq / actual: US0_0(true) / expected: US0_0(true) │ 00:25:40 verbose #14447 > > │ │ 00:25:40 verbose #14448 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:40 verbose #14449 > 00:00:40 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 23437 } 00:25:40 verbose #14450 > 00:00:40 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:25:40 verbose #14451 > "nbconvert", 00:25:40 verbose #14452 > "c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb", 00:25:40 verbose #14453 > "--to", 00:25:40 verbose #14454 > "html", 00:25:40 verbose #14455 > "--HTMLExporter.theme=dark", 00:25:40 verbose #14456 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:25:42 verbose #14457 > 00:00:42 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb to html 00:25:42 verbose #14458 > 00:00:42 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:25:42 verbose #14459 > 00:00:42 verbose #7 ! validate(nb) 00:25:44 verbose #14460 > 00:00:44 verbose #8 ! [NbConvertApp] Writing 349879 bytes to c:\home\git\polyglot\lib\spiral\resultm.dib.html 00:25:44 verbose #14461 > 00:00:44 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 645 } 00:25:44 verbose #14462 > 00:00:44 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 645 } 00:25:44 verbose #14463 > 00:00:44 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:25:44 verbose #14464 > "-c", 00:25:44 verbose #14465 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/resultm.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:25:44 verbose #14466 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/resultm.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:25:44 verbose #14467 > 00:00:45 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:25:44 verbose #14468 > 00:00:45 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:25:44 verbose #14469 > 00:00:45 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 24141 } 00:25:44 debug #14470 runtime.execute_with_options_async / { exit_code = 0; output_length = 27766 } 00:25:44 debug #15 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path resultm.dib --retries 3 00:25:44 debug #14471 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path console.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:25:44 verbose #14472 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "console.dib", "--retries", "3"])) } 00:25:44 verbose #14473 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:25:44 verbose #14474 > "repl", 00:25:44 verbose #14475 > "--exit-after-run", 00:25:44 verbose #14476 > "--run", 00:25:44 verbose #14477 > "c:/home/git/polyglot/lib/spiral/console.dib", 00:25:44 verbose #14478 > "--output-path", 00:25:44 verbose #14479 > "c:/home/git/polyglot/lib/spiral/console.dib.ipynb", 00:25:44 verbose #14480 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/console.dib" --output-path "c:/home/git/polyglot/lib/spiral/console.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:25:46 verbose #14481 > > 00:25:46 verbose #14482 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:46 verbose #14483 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:46 verbose #14484 > > │ # console │ 00:25:46 verbose #14485 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:50 verbose #14486 > > 00:25:50 verbose #14487 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:50 verbose #14488 > > //// test 00:25:50 verbose #14489 > > 00:25:50 verbose #14490 > > open testing 00:25:52 verbose #14491 > > 00:25:52 verbose #14492 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:52 verbose #14493 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:52 verbose #14494 > > │ ## fsharp │ 00:25:52 verbose #14495 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:52 verbose #14496 > > 00:25:52 verbose #14497 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:52 verbose #14498 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:52 verbose #14499 > > │ ### console_color │ 00:25:52 verbose #14500 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:52 verbose #14501 > > 00:25:52 verbose #14502 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:52 verbose #14503 > > nominal console_color = $'System.ConsoleColor' 00:25:52 verbose #14504 > > 00:25:52 verbose #14505 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:52 verbose #14506 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:52 verbose #14507 > > │ ### reset_color │ 00:25:52 verbose #14508 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:52 verbose #14509 > > 00:25:52 verbose #14510 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:52 verbose #14511 > > inl reset_color () : () = 00:25:52 verbose #14512 > > run_target function 00:25:52 verbose #14513 > > | Fsharp => fun () => $'System.Console.ResetColor ()' 00:25:52 verbose #14514 > > | _ => fun () => () 00:25:52 verbose #14515 > > 00:25:52 verbose #14516 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:52 verbose #14517 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:52 verbose #14518 > > │ ### set_foreground_color │ 00:25:52 verbose #14519 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:52 verbose #14520 > > 00:25:52 verbose #14521 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:52 verbose #14522 > > inl set_foreground_color (color : console_color) : () = 00:25:52 verbose #14523 > > run_target function 00:25:52 verbose #14524 > > | Fsharp => fun () => $'System.Console.ForegroundColor <- !color ' 00:25:52 verbose #14525 > > | _ => fun () => () 00:25:53 verbose #14526 > > 00:25:53 verbose #14527 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:53 verbose #14528 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:53 verbose #14529 > > │ ## console │ 00:25:53 verbose #14530 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:53 verbose #14531 > > 00:25:53 verbose #14532 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:53 verbose #14533 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:53 verbose #14534 > > │ ### write_line │ 00:25:53 verbose #14535 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:53 verbose #14536 > > 00:25:53 verbose #14537 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:53 verbose #14538 > > inl write_line obj : () = 00:25:53 verbose #14539 > > backend_switch { 00:25:53 verbose #14540 > > Fsharp = fun () => 00:25:53 verbose #14541 > > fun () => obj |> $'System.Console.WriteLine' 00:25:53 verbose #14542 > > |> exec_unit 00:25:53 verbose #14543 > > Python = fun () => $'print(!obj)' : () 00:25:53 verbose #14544 > > } 00:25:53 verbose #14545 > > 00:25:53 verbose #14546 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:53 verbose #14547 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:53 verbose #14548 > > │ ### write │ 00:25:53 verbose #14549 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:53 verbose #14550 > > 00:25:53 verbose #14551 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:53 verbose #14552 > > inl write forall t. (x : t) : () = 00:25:53 verbose #14553 > > inl s = x |> sm'.format 00:25:53 verbose #14554 > > backend_switch { 00:25:53 verbose #14555 > > Python = fun () => $'print(!s, end="")' : () 00:25:53 verbose #14556 > > Fsharp = fun () => $'!s |> System.Console.Write' : () 00:25:53 verbose #14557 > > } 00:25:54 verbose #14558 > > 00:25:54 verbose #14559 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:25:54 verbose #14560 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:25:54 verbose #14561 > > │ ### write_ln │ 00:25:54 verbose #14562 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:25:54 verbose #14563 > > 00:25:54 verbose #14564 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:25:54 verbose #14565 > > inl write_ln l : () = 00:25:54 verbose #14566 > > write l 00:25:54 verbose #14567 > > backend_switch { 00:25:54 verbose #14568 > > Cuda = fun () => $'printf("\\n")' : () 00:25:54 verbose #14569 > > Python = fun () => $"print()" : () 00:25:54 verbose #14570 > > Fsharp = fun () => write_line () : () 00:25:54 verbose #14571 > > } 00:25:54 verbose #14572 > 00:00:09 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 4503 } 00:25:54 verbose #14573 > 00:00:09 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:25:54 verbose #14574 > "nbconvert", 00:25:54 verbose #14575 > "c:/home/git/polyglot/lib/spiral/console.dib.ipynb", 00:25:54 verbose #14576 > "--to", 00:25:54 verbose #14577 > "html", 00:25:54 verbose #14578 > "--HTMLExporter.theme=dark", 00:25:54 verbose #14579 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/console.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:25:56 verbose #14580 > 00:00:11 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/console.dib.ipynb to html 00:25:56 verbose #14581 > 00:00:11 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:25:56 verbose #14582 > 00:00:11 verbose #7 ! validate(nb) 00:25:58 verbose #14583 > 00:00:13 verbose #8 ! [NbConvertApp] Writing 283391 bytes to c:\home\git\polyglot\lib\spiral\console.dib.html 00:25:58 verbose #14584 > 00:00:13 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 645 } 00:25:58 verbose #14585 > 00:00:13 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 645 } 00:25:58 verbose #14586 > 00:00:13 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:25:58 verbose #14587 > "-c", 00:25:58 verbose #14588 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/console.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:25:58 verbose #14589 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/console.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:25:58 verbose #14590 > 00:00:13 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:25:58 verbose #14591 > 00:00:13 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:25:58 verbose #14592 > 00:00:13 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 5207 } 00:25:58 debug #14593 runtime.execute_with_options_async / { exit_code = 0; output_length = 8074 } 00:25:58 debug #16 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path console.dib --retries 3 00:25:58 debug #14594 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path base.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:25:58 verbose #14595 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "base.dib", "--retries", "3"])) } 00:25:58 verbose #14596 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:25:58 verbose #14597 > "repl", 00:25:58 verbose #14598 > "--exit-after-run", 00:25:58 verbose #14599 > "--run", 00:25:58 verbose #14600 > "c:/home/git/polyglot/lib/spiral/base.dib", 00:25:58 verbose #14601 > "--output-path", 00:25:58 verbose #14602 > "c:/home/git/polyglot/lib/spiral/base.dib.ipynb", 00:25:58 verbose #14603 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/base.dib" --output-path "c:/home/git/polyglot/lib/spiral/base.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:26:00 verbose #14604 > > 00:26:00 verbose #14605 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:26:00 verbose #14606 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:26:00 verbose #14607 > > │ # base │ 00:26:00 verbose #14608 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:04 verbose #14609 > > 00:26:04 verbose #14610 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:26:04 verbose #14611 > > //// test 00:26:04 verbose #14612 > > 00:26:04 verbose #14613 > > open testing 00:26:05 verbose #14614 > > 00:26:05 verbose #14615 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:26:05 verbose #14616 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:26:05 verbose #14617 > > │ ## execution │ 00:26:05 verbose #14618 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:05 verbose #14619 > > 00:26:05 verbose #14620 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:26:05 verbose #14621 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:26:05 verbose #14622 > > │ ### emit │ 00:26:05 verbose #14623 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:05 verbose #14624 > > 00:26:05 verbose #14625 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:26:05 verbose #14626 > > inl emit forall t. (x : t) : t = 00:26:05 verbose #14627 > > $'!x ' 00:26:05 verbose #14628 > > 00:26:05 verbose #14629 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:26:05 verbose #14630 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:26:05 verbose #14631 > > │ ### emit_unit │ 00:26:05 verbose #14632 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:05 verbose #14633 > > 00:26:05 verbose #14634 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:26:05 verbose #14635 > > inl emit_unit forall t. (x : t) : () = 00:26:05 verbose #14636 > > $'!x ' 00:26:06 verbose #14637 > > 00:26:06 verbose #14638 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:26:06 verbose #14639 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:26:06 verbose #14640 > > │ ### use │ 00:26:06 verbose #14641 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:06 verbose #14642 > > 00:26:06 verbose #14643 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:26:06 verbose #14644 > > inl use forall t. (x : t) : t = 00:26:06 verbose #14645 > > $'use !x = !x ' : () 00:26:06 verbose #14646 > > $'!x ' 00:26:06 verbose #14647 > > 00:26:06 verbose #14648 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:26:06 verbose #14649 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:26:06 verbose #14650 > > │ ## target │ 00:26:06 verbose #14651 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:06 verbose #14652 > > 00:26:06 verbose #14653 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:26:06 verbose #14654 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:26:06 verbose #14655 > > │ ### backend_switch │ 00:26:06 verbose #14656 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:06 verbose #14657 > > 00:26:06 verbose #14658 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:26:06 verbose #14659 > > inl backend_switch forall t. x : t = 00:26:06 verbose #14660 > > real 00:26:06 verbose #14661 > > inl backend key : t = 00:26:06 verbose #14662 > > inl s = real_core.string_lit_to_symbol key 00:26:06 verbose #14663 > > real_core.record_type_try_find `(`x) s 00:26:06 verbose #14664 > > (forall v'. => (x s) ()) 00:26:06 verbose #14665 > > (fun () => $'' : t) 00:26:06 verbose #14666 > > !!!!BackendSwitch ( 00:26:06 verbose #14667 > > ("Fsharp", backend "Fsharp"), 00:26:06 verbose #14668 > > ("Python", backend "Python"), 00:26:06 verbose #14669 > > ("Cuda", backend "Cuda") 00:26:06 verbose #14670 > > ) 00:26:07 verbose #14671 > > 00:26:07 verbose #14672 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:26:07 verbose #14673 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:26:07 verbose #14674 > > │ ### target_runtime │ 00:26:07 verbose #14675 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:07 verbose #14676 > > 00:26:07 verbose #14677 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:26:07 verbose #14678 > > union target_runtime = 00:26:07 verbose #14679 > > | Native 00:26:07 verbose #14680 > > | Wasm 00:26:07 verbose #14681 > > | Contract 00:26:07 verbose #14682 > > 00:26:07 verbose #14683 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:26:07 verbose #14684 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:26:07 verbose #14685 > > │ ### target │ 00:26:07 verbose #14686 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:07 verbose #14687 > > 00:26:07 verbose #14688 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:26:07 verbose #14689 > > union target = 00:26:07 verbose #14690 > > | Fsharp : target_runtime 00:26:07 verbose #14691 > > | Cuda : target_runtime 00:26:07 verbose #14692 > > | Rust : target_runtime 00:26:07 verbose #14693 > > | TypeScript : target_runtime 00:26:07 verbose #14694 > > | Python : target_runtime 00:26:08 verbose #14695 > > 00:26:08 verbose #14696 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:26:08 verbose #14697 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:26:08 verbose #14698 > > │ ### run_target_args │ 00:26:08 verbose #14699 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:08 verbose #14700 > > 00:26:08 verbose #14701 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:26:08 verbose #14702 > > inl run_target_args forall t u. (args : () -> u) (fn : target -> (u -> t)) : t = 00:26:08 verbose #14703 > > inl args = args () |> dyn 00:26:08 verbose #14704 > > backend_switch { 00:26:08 verbose #14705 > > Fsharp = fun () => 00:26:08 verbose #14706 > > inl result = $'()' : $'unit' 00:26:08 verbose #14707 > > inl emit_result x : () = 00:26:08 verbose #14708 > > $'let _!result = !x ' 00:26:08 verbose #14709 > > $'\n#if FABLE_COMPILER || WASM || CONTRACT' 00:26:08 verbose #14710 > > $'\n#if FABLE_COMPILER_RUST && \!WASM && \!CONTRACT' 00:26:08 verbose #14711 > > inl target = Rust Native 00:26:08 verbose #14712 > > fn target args |> emit_result 00:26:08 verbose #14713 > > $'#endif\n#if FABLE_COMPILER_RUST && WASM' 00:26:08 verbose #14714 > > inl target = Rust Wasm 00:26:08 verbose #14715 > > fn target args |> emit_result 00:26:08 verbose #14716 > > $'#endif\n#if FABLE_COMPILER_RUST && CONTRACT' 00:26:08 verbose #14717 > > inl target = Rust Contract 00:26:08 verbose #14718 > > fn target args |> emit_result 00:26:08 verbose #14719 > > $'#endif\n#if FABLE_COMPILER_TYPESCRIPT' 00:26:08 verbose #14720 > > inl target = TypeScript Native 00:26:08 verbose #14721 > > fn target args |> emit_result 00:26:08 verbose #14722 > > $'#endif\n#if FABLE_COMPILER_PYTHON' 00:26:08 verbose #14723 > > inl target = Python Native 00:26:08 verbose #14724 > > fn target args |> emit_result 00:26:08 verbose #14725 > > $'#endif\n#else' 00:26:08 verbose #14726 > > inl target = Fsharp Native 00:26:08 verbose #14727 > > fn target args |> emit_result 00:26:08 verbose #14728 > > $'#endif' 00:26:08 verbose #14729 > > $'_!result ' : t 00:26:08 verbose #14730 > > Python = fun () => 00:26:08 verbose #14731 > > inl target = Cuda Native 00:26:08 verbose #14732 > > fn target args 00:26:08 verbose #14733 > > } 00:26:08 verbose #14734 > > 00:26:08 verbose #14735 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:26:08 verbose #14736 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:26:08 verbose #14737 > > │ ### run_target │ 00:26:08 verbose #14738 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:08 verbose #14739 > > 00:26:08 verbose #14740 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:26:08 verbose #14741 > > inl run_target forall t. (fn : target -> (() -> t)) : t = 00:26:08 verbose #14742 > > run_target_args id fn 00:26:09 verbose #14743 > > 00:26:09 verbose #14744 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:26:09 verbose #14745 > > //// test 00:26:09 verbose #14746 > > ///! fsharp 00:26:09 verbose #14747 > > ///! cuda 00:26:09 verbose #14748 > > ///! rust 00:26:09 verbose #14749 > > ///! typescript 00:26:09 verbose #14750 > > ///! python 00:26:09 verbose #14751 > > 00:26:09 verbose #14752 > > run_target function 00:26:09 verbose #14753 > > | Fsharp (Native) => fun () => $'1uy' 00:26:09 verbose #14754 > > | Cuda (Native) => fun () => $'1' 00:26:09 verbose #14755 > > | Rust (Native) => fun () => $'1uy' 00:26:09 verbose #14756 > > | TypeScript (Native) => fun () => $'1uy' 00:26:09 verbose #14757 > > | Python (Native) => fun () => $'1uy' 00:26:09 verbose #14758 > > | _ => fun () => $'2uy' 00:26:09 verbose #14759 > > |> _assert_eq 1u8 00:26:27 verbose #14760 > > 00:26:27 verbose #14761 > > ╭─[ 18.25s - return value ]────────────────────────────────────────────────────╮ 00:26:27 verbose #14762 > > │ .py output (Cuda): │ 00:26:27 verbose #14763 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:26:27 verbose #14764 > > │ │ 00:26:27 verbose #14765 > > │ .rs output: │ 00:26:27 verbose #14766 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:26:27 verbose #14767 > > │ │ 00:26:27 verbose #14768 > > │ .ts output: │ 00:26:27 verbose #14769 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:26:27 verbose #14770 > > │ │ 00:26:27 verbose #14771 > > │ .py output: │ 00:26:27 verbose #14772 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:26:27 verbose #14773 > > │ │ 00:26:27 verbose #14774 > > │ │ 00:26:27 verbose #14775 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:27 verbose #14776 > > 00:26:27 verbose #14777 > > ╭─[ 18.25s - stdout ]──────────────────────────────────────────────────────────╮ 00:26:27 verbose #14778 > > │ .fsx output: │ 00:26:27 verbose #14779 > > │ __assert_eq / actual: 1uy / expected: 1uy │ 00:26:27 verbose #14780 > > │ │ 00:26:27 verbose #14781 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:27 verbose #14782 > > 00:26:27 verbose #14783 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:26:27 verbose #14784 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:26:27 verbose #14785 > > │ ## function │ 00:26:27 verbose #14786 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:27 verbose #14787 > > 00:26:27 verbose #14788 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:26:27 verbose #14789 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:26:27 verbose #14790 > > │ ### eval │ 00:26:27 verbose #14791 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:27 verbose #14792 > > 00:26:27 verbose #14793 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:26:27 verbose #14794 > > inl eval fn = 00:26:27 verbose #14795 > > fn () 00:26:27 verbose #14796 > > 00:26:27 verbose #14797 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:26:27 verbose #14798 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:26:27 verbose #14799 > > │ ### exec_unit │ 00:26:27 verbose #14800 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:27 verbose #14801 > > 00:26:27 verbose #14802 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:26:27 verbose #14803 > > inl exec_unit (fn : () -> ()) : () = 00:26:27 verbose #14804 > > backend_switch { 00:26:27 verbose #14805 > > Fsharp = fun () => 00:26:27 verbose #14806 > > inl unit = $'()' : $'unit' 00:26:27 verbose #14807 > > ($'(fun () -> !fn (); !unit) ()' : $'unit') |> ignore 00:26:27 verbose #14808 > > Python = fun () => fn () 00:26:27 verbose #14809 > > } 00:26:28 verbose #14810 > > 00:26:28 verbose #14811 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:26:28 verbose #14812 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:26:28 verbose #14813 > > │ ### lazy │ 00:26:28 verbose #14814 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:28 verbose #14815 > > 00:26:28 verbose #14816 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:26:28 verbose #14817 > > nominal lazy t = $'Lazy<`t>' 00:26:28 verbose #14818 > > 00:26:28 verbose #14819 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:26:28 verbose #14820 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:26:28 verbose #14821 > > │ ### memoize │ 00:26:28 verbose #14822 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:28 verbose #14823 > > 00:26:28 verbose #14824 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:26:28 verbose #14825 > > nominal lazy t = $'Lazy<`t>' 00:26:28 verbose #14826 > > 00:26:28 verbose #14827 > > inl memoize forall t. (fn : () -> t) : () -> t = 00:26:28 verbose #14828 > > inl fn = join fn 00:26:28 verbose #14829 > > backend_switch { 00:26:28 verbose #14830 > > Fsharp = fun () => 00:26:28 verbose #14831 > > inl result : lazy t = $'lazy !fn ()' 00:26:28 verbose #14832 > > fun () => $'!result.Value' : t 00:26:28 verbose #14833 > > Python = fun () => 00:26:28 verbose #14834 > > inl result = mut None 00:26:28 verbose #14835 > > inl computed = mut false 00:26:28 verbose #14836 > > fun () => 00:26:28 verbose #14837 > > if *computed 00:26:28 verbose #14838 > > then *result 00:26:28 verbose #14839 > > else 00:26:28 verbose #14840 > > result <- fn () |> Some 00:26:28 verbose #14841 > > computed <- true 00:26:28 verbose #14842 > > *result 00:26:28 verbose #14843 > > |> optionm.value 00:26:28 verbose #14844 > > } 00:26:29 verbose #14845 > > 00:26:29 verbose #14846 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:26:29 verbose #14847 > > //// test 00:26:29 verbose #14848 > > ///! fsharp 00:26:29 verbose #14849 > > ///! cuda 00:26:29 verbose #14850 > > ///! rust 00:26:29 verbose #14851 > > ///! typescript 00:26:29 verbose #14852 > > ///! python 00:26:29 verbose #14853 > > 00:26:29 verbose #14854 > > inl count = mut 0i32 00:26:29 verbose #14855 > > inl add = 00:26:29 verbose #14856 > > fun () => 00:26:29 verbose #14857 > > count <- *count + 1 00:26:29 verbose #14858 > > count 00:26:29 verbose #14859 > > |> memoize 00:26:29 verbose #14860 > > 00:26:29 verbose #14861 > > add () |> ignore 00:26:29 verbose #14862 > > add () |> ignore 00:26:29 verbose #14863 > > add () |> ignore 00:26:29 verbose #14864 > > 00:26:29 verbose #14865 > > *count 00:26:29 verbose #14866 > > |> _assert_eq 1 00:26:47 verbose #14867 > > 00:26:47 verbose #14868 > > ╭─[ 18.62s - return value ]────────────────────────────────────────────────────╮ 00:26:47 verbose #14869 > > │ .py output (Cuda): │ 00:26:47 verbose #14870 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:26:47 verbose #14871 > > │ │ 00:26:47 verbose #14872 > > │ .rs output: │ 00:26:47 verbose #14873 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:26:47 verbose #14874 > > │ │ 00:26:47 verbose #14875 > > │ .ts output: │ 00:26:47 verbose #14876 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:26:47 verbose #14877 > > │ │ 00:26:47 verbose #14878 > > │ .py output: │ 00:26:47 verbose #14879 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:26:47 verbose #14880 > > │ │ 00:26:47 verbose #14881 > > │ │ 00:26:47 verbose #14882 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:47 verbose #14883 > > 00:26:47 verbose #14884 > > ╭─[ 18.62s - stdout ]──────────────────────────────────────────────────────────╮ 00:26:47 verbose #14885 > > │ .fsx output: │ 00:26:47 verbose #14886 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:26:47 verbose #14887 > > │ │ 00:26:47 verbose #14888 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:47 verbose #14889 > > 00:26:47 verbose #14890 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:26:47 verbose #14891 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:26:47 verbose #14892 > > │ ### capture │ 00:26:47 verbose #14893 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:47 verbose #14894 > > 00:26:47 verbose #14895 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:26:47 verbose #14896 > > inl capture forall t. (fn : () -> t) : t = 00:26:47 verbose #14897 > > inl result = dyn true 00:26:47 verbose #14898 > > $'let mutable _!result : `t option = None ' 00:26:47 verbose #14899 > > $'(' 00:26:47 verbose #14900 > > $'(fun () ->' 00:26:47 verbose #14901 > > $'(fun () ->' 00:26:47 verbose #14902 > > fn () |> emit_unit 00:26:47 verbose #14903 > > $')' 00:26:47 verbose #14904 > > $'|> fun x -> x ()' 00:26:47 verbose #14905 > > $') () )' 00:26:47 verbose #14906 > > $'|> fun x -> _!result <- Some x' 00:26:47 verbose #14907 > > $'match _!result with Some x -> x | None -> failwith "base.capture 00:26:47 verbose #14908 > > _!result=None"' 00:26:48 verbose #14909 > > 00:26:48 verbose #14910 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:26:48 verbose #14911 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:26:48 verbose #14912 > > │ ## arithmetic │ 00:26:48 verbose #14913 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:48 verbose #14914 > > 00:26:48 verbose #14915 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:26:48 verbose #14916 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:26:48 verbose #14917 > > │ ### (+.) │ 00:26:48 verbose #14918 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:26:48 verbose #14919 > > 00:26:48 verbose #14920 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:26:48 verbose #14921 > > inl (+.) forall t. (a : t) (b : t) : t = 00:26:48 verbose #14922 > > $'!a + !b ' 00:26:48 verbose #14923 > > 00:26:48 verbose #14924 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:26:48 verbose #14925 > > //// test 00:26:48 verbose #14926 > > ///! fsharp 00:26:48 verbose #14927 > > ///! cuda 00:26:48 verbose #14928 > > ///! rust 00:26:48 verbose #14929 > > ///! typescript 00:26:48 verbose #14930 > > ///! python 00:26:48 verbose #14931 > > 00:26:48 verbose #14932 > > ($'3' : i32) +. ($'-6' : i32) 00:26:48 verbose #14933 > > |> _assert_eq -3i32 00:27:05 verbose #14934 > > 00:27:05 verbose #14935 > > ╭─[ 17.50s - return value ]────────────────────────────────────────────────────╮ 00:27:05 verbose #14936 > > │ .py output (Cuda): │ 00:27:05 verbose #14937 > > │ __assert_eq / actual: -3 / expected: -3 │ 00:27:05 verbose #14938 > > │ │ 00:27:05 verbose #14939 > > │ .rs output: │ 00:27:05 verbose #14940 > > │ __assert_eq / actual: -3 / expected: -3 │ 00:27:05 verbose #14941 > > │ │ 00:27:05 verbose #14942 > > │ .ts output: │ 00:27:05 verbose #14943 > > │ __assert_eq / actual: -3 / expected: -3 │ 00:27:05 verbose #14944 > > │ │ 00:27:05 verbose #14945 > > │ .py output: │ 00:27:05 verbose #14946 > > │ __assert_eq / actual: -3 / expected: -3 │ 00:27:05 verbose #14947 > > │ │ 00:27:05 verbose #14948 > > │ │ 00:27:05 verbose #14949 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:27:05 verbose #14950 > > 00:27:05 verbose #14951 > > ╭─[ 17.50s - stdout ]──────────────────────────────────────────────────────────╮ 00:27:05 verbose #14952 > > │ .fsx output: │ 00:27:05 verbose #14953 > > │ __assert_eq / actual: -3 / expected: -3 │ 00:27:05 verbose #14954 > > │ │ 00:27:05 verbose #14955 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:27:05 verbose #14956 > > 00:27:05 verbose #14957 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:27:05 verbose #14958 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:27:05 verbose #14959 > > │ ### (-.) │ 00:27:05 verbose #14960 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:27:05 verbose #14961 > > 00:27:05 verbose #14962 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:27:05 verbose #14963 > > inl (-.) forall t. (a : t) (b : t) : t = 00:27:05 verbose #14964 > > $'!a - !b ' 00:27:06 verbose #14965 > > 00:27:06 verbose #14966 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:27:06 verbose #14967 > > //// test 00:27:06 verbose #14968 > > ///! fsharp 00:27:06 verbose #14969 > > ///! cuda 00:27:06 verbose #14970 > > ///! rust 00:27:06 verbose #14971 > > ///! typescript 00:27:06 verbose #14972 > > ///! python 00:27:06 verbose #14973 > > 00:27:06 verbose #14974 > > ($'3' : i32) -. ($'6' : i32) 00:27:06 verbose #14975 > > |> _assert_eq -3i32 00:27:23 verbose #14976 > > 00:27:23 verbose #14977 > > ╭─[ 17.20s - return value ]────────────────────────────────────────────────────╮ 00:27:23 verbose #14978 > > │ .py output (Cuda): │ 00:27:23 verbose #14979 > > │ __assert_eq / actual: -3 / expected: -3 │ 00:27:23 verbose #14980 > > │ │ 00:27:23 verbose #14981 > > │ .rs output: │ 00:27:23 verbose #14982 > > │ __assert_eq / actual: -3 / expected: -3 │ 00:27:23 verbose #14983 > > │ │ 00:27:23 verbose #14984 > > │ .ts output: │ 00:27:23 verbose #14985 > > │ __assert_eq / actual: -3 / expected: -3 │ 00:27:23 verbose #14986 > > │ │ 00:27:23 verbose #14987 > > │ .py output: │ 00:27:23 verbose #14988 > > │ __assert_eq / actual: -3 / expected: -3 │ 00:27:23 verbose #14989 > > │ │ 00:27:23 verbose #14990 > > │ │ 00:27:23 verbose #14991 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:27:23 verbose #14992 > > 00:27:23 verbose #14993 > > ╭─[ 17.20s - stdout ]──────────────────────────────────────────────────────────╮ 00:27:23 verbose #14994 > > │ .fsx output: │ 00:27:23 verbose #14995 > > │ __assert_eq / actual: -3 / expected: -3 │ 00:27:23 verbose #14996 > > │ │ 00:27:23 verbose #14997 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:27:23 verbose #14998 > > 00:27:23 verbose #14999 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:27:23 verbose #15000 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:27:23 verbose #15001 > > │ ### (*.) │ 00:27:23 verbose #15002 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:27:23 verbose #15003 > > 00:27:23 verbose #15004 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:27:23 verbose #15005 > > inl (*.) forall t. (a : t) (b : t) : t = 00:27:23 verbose #15006 > > $'!a * !b ' 00:27:24 verbose #15007 > > 00:27:24 verbose #15008 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:27:24 verbose #15009 > > //// test 00:27:24 verbose #15010 > > ///! fsharp 00:27:24 verbose #15011 > > ///! cuda 00:27:24 verbose #15012 > > ///! rust 00:27:24 verbose #15013 > > ///! typescript 00:27:24 verbose #15014 > > ///! python 00:27:24 verbose #15015 > > 00:27:24 verbose #15016 > > ($'3' : i32) *. ($'-1' : i32) 00:27:24 verbose #15017 > > |> _assert_eq -3i32 00:27:42 verbose #15018 > > 00:27:42 verbose #15019 > > ╭─[ 18.01s - return value ]────────────────────────────────────────────────────╮ 00:27:42 verbose #15020 > > │ .py output (Cuda): │ 00:27:42 verbose #15021 > > │ __assert_eq / actual: -3 / expected: -3 │ 00:27:42 verbose #15022 > > │ │ 00:27:42 verbose #15023 > > │ .rs output: │ 00:27:42 verbose #15024 > > │ __assert_eq / actual: -3 / expected: -3 │ 00:27:42 verbose #15025 > > │ │ 00:27:42 verbose #15026 > > │ .ts output: │ 00:27:42 verbose #15027 > > │ __assert_eq / actual: -3 / expected: -3 │ 00:27:42 verbose #15028 > > │ │ 00:27:42 verbose #15029 > > │ .py output: │ 00:27:42 verbose #15030 > > │ __assert_eq / actual: -3 / expected: -3 │ 00:27:42 verbose #15031 > > │ │ 00:27:42 verbose #15032 > > │ │ 00:27:42 verbose #15033 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:27:42 verbose #15034 > > 00:27:42 verbose #15035 > > ╭─[ 18.01s - stdout ]──────────────────────────────────────────────────────────╮ 00:27:42 verbose #15036 > > │ .fsx output: │ 00:27:42 verbose #15037 > > │ __assert_eq / actual: -3 / expected: -3 │ 00:27:42 verbose #15038 > > │ │ 00:27:42 verbose #15039 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:27:42 verbose #15040 > > 00:27:42 verbose #15041 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:27:42 verbose #15042 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:27:42 verbose #15043 > > │ ### (/.) │ 00:27:42 verbose #15044 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:27:42 verbose #15045 > > 00:27:42 verbose #15046 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:27:42 verbose #15047 > > inl (/.) forall t. (a : t) (b : t) : t = 00:27:42 verbose #15048 > > $'!a / !b ' 00:27:42 verbose #15049 > > 00:27:42 verbose #15050 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:27:42 verbose #15051 > > //// test 00:27:42 verbose #15052 > > ///! fsharp 00:27:42 verbose #15053 > > ///! cuda 00:27:42 verbose #15054 > > ///! rust 00:27:42 verbose #15055 > > ///! typescript 00:27:42 verbose #15056 > > ///! python 00:27:42 verbose #15057 > > 00:27:42 verbose #15058 > > ($'-3' : i32) /. ($'1' : i32) 00:27:42 verbose #15059 > > |> _assert_eq -3i32 00:27:59 verbose #15060 > > 00:27:59 verbose #15061 > > ╭─[ 17.18s - return value ]────────────────────────────────────────────────────╮ 00:27:59 verbose #15062 > > │ .py output (Cuda): │ 00:27:59 verbose #15063 > > │ __assert_eq / actual: -3.0 / expected: -3 │ 00:27:59 verbose #15064 > > │ │ 00:27:59 verbose #15065 > > │ .rs output: │ 00:27:59 verbose #15066 > > │ __assert_eq / actual: -3 / expected: -3 │ 00:27:59 verbose #15067 > > │ │ 00:27:59 verbose #15068 > > │ .ts output: │ 00:27:59 verbose #15069 > > │ __assert_eq / actual: -3 / expected: -3 │ 00:27:59 verbose #15070 > > │ │ 00:27:59 verbose #15071 > > │ .py output: │ 00:27:59 verbose #15072 > > │ __assert_eq / actual: -3 / expected: -3 │ 00:27:59 verbose #15073 > > │ │ 00:27:59 verbose #15074 > > │ │ 00:27:59 verbose #15075 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:27:59 verbose #15076 > > 00:27:59 verbose #15077 > > ╭─[ 17.18s - stdout ]──────────────────────────────────────────────────────────╮ 00:27:59 verbose #15078 > > │ .fsx output: │ 00:27:59 verbose #15079 > > │ __assert_eq / actual: -3 / expected: -3 │ 00:27:59 verbose #15080 > > │ │ 00:27:59 verbose #15081 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:27:59 verbose #15082 > > 00:27:59 verbose #15083 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:27:59 verbose #15084 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:27:59 verbose #15085 > > │ ## comparison │ 00:27:59 verbose #15086 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:27:59 verbose #15087 > > 00:27:59 verbose #15088 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:27:59 verbose #15089 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:27:59 verbose #15090 > > │ ### (=.) │ 00:27:59 verbose #15091 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:27:59 verbose #15092 > > 00:27:59 verbose #15093 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:27:59 verbose #15094 > > inl (=.) forall t. (a : t) (b : t) : bool = 00:27:59 verbose #15095 > > backend_switch { 00:27:59 verbose #15096 > > Fsharp = fun () => $'!a = !b ' : bool 00:27:59 verbose #15097 > > Python = fun () => $'!a == !b ' : bool 00:27:59 verbose #15098 > > } 00:28:00 verbose #15099 > > 00:28:00 verbose #15100 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:28:00 verbose #15101 > > //// test 00:28:00 verbose #15102 > > ///! fsharp 00:28:00 verbose #15103 > > ///! cuda 00:28:00 verbose #15104 > > ///! rust 00:28:00 verbose #15105 > > ///! typescript 00:28:00 verbose #15106 > > ///! python 00:28:00 verbose #15107 > > 00:28:00 verbose #15108 > > ($'-3' : i32) =. ($'-3' : i32) 00:28:00 verbose #15109 > > |> _assert_eq true 00:28:17 verbose #15110 > > 00:28:17 verbose #15111 > > ╭─[ 17.47s - return value ]────────────────────────────────────────────────────╮ 00:28:17 verbose #15112 > > │ .py output (Cuda): │ 00:28:17 verbose #15113 > > │ __assert_eq / actual: True / expected: True │ 00:28:17 verbose #15114 > > │ │ 00:28:17 verbose #15115 > > │ .rs output: │ 00:28:17 verbose #15116 > > │ __assert_eq / actual: true / expected: true │ 00:28:17 verbose #15117 > > │ │ 00:28:17 verbose #15118 > > │ .ts output: │ 00:28:17 verbose #15119 > > │ __assert_eq / actual: true / expected: true │ 00:28:17 verbose #15120 > > │ │ 00:28:17 verbose #15121 > > │ .py output: │ 00:28:17 verbose #15122 > > │ __assert_eq / actual: true / expected: true │ 00:28:17 verbose #15123 > > │ │ 00:28:17 verbose #15124 > > │ │ 00:28:17 verbose #15125 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:17 verbose #15126 > > 00:28:17 verbose #15127 > > ╭─[ 17.47s - stdout ]──────────────────────────────────────────────────────────╮ 00:28:17 verbose #15128 > > │ .fsx output: │ 00:28:17 verbose #15129 > > │ __assert_eq / actual: true / expected: true │ 00:28:17 verbose #15130 > > │ │ 00:28:17 verbose #15131 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:17 verbose #15132 > > 00:28:17 verbose #15133 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:28:17 verbose #15134 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:28:17 verbose #15135 > > │ ### (<>.) │ 00:28:17 verbose #15136 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:17 verbose #15137 > > 00:28:17 verbose #15138 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:28:17 verbose #15139 > > inl (<>.) forall t. (a : t) (b : t) : bool = 00:28:17 verbose #15140 > > backend_switch { 00:28:17 verbose #15141 > > Fsharp = fun () => $'!a <> !b ' : bool 00:28:17 verbose #15142 > > Python = fun () => $'!a \!= !b ' : bool 00:28:17 verbose #15143 > > } 00:28:18 verbose #15144 > > 00:28:18 verbose #15145 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:28:18 verbose #15146 > > //// test 00:28:18 verbose #15147 > > ///! fsharp 00:28:18 verbose #15148 > > ///! cuda 00:28:18 verbose #15149 > > ///! rust 00:28:18 verbose #15150 > > ///! typescript 00:28:18 verbose #15151 > > ///! python 00:28:18 verbose #15152 > > 00:28:18 verbose #15153 > > ($'-3' : i32) <>. ($'3' : i32) 00:28:18 verbose #15154 > > |> _assert_eq true 00:28:35 verbose #15155 > > 00:28:35 verbose #15156 > > ╭─[ 17.25s - return value ]────────────────────────────────────────────────────╮ 00:28:35 verbose #15157 > > │ .py output (Cuda): │ 00:28:35 verbose #15158 > > │ __assert_eq / actual: True / expected: True │ 00:28:35 verbose #15159 > > │ │ 00:28:35 verbose #15160 > > │ .rs output: │ 00:28:35 verbose #15161 > > │ __assert_eq / actual: true / expected: true │ 00:28:35 verbose #15162 > > │ │ 00:28:35 verbose #15163 > > │ .ts output: │ 00:28:35 verbose #15164 > > │ __assert_eq / actual: true / expected: true │ 00:28:35 verbose #15165 > > │ │ 00:28:35 verbose #15166 > > │ .py output: │ 00:28:35 verbose #15167 > > │ __assert_eq / actual: true / expected: true │ 00:28:35 verbose #15168 > > │ │ 00:28:35 verbose #15169 > > │ │ 00:28:35 verbose #15170 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:35 verbose #15171 > > 00:28:35 verbose #15172 > > ╭─[ 17.26s - stdout ]──────────────────────────────────────────────────────────╮ 00:28:35 verbose #15173 > > │ .fsx output: │ 00:28:35 verbose #15174 > > │ __assert_eq / actual: true / expected: true │ 00:28:35 verbose #15175 > > │ │ 00:28:35 verbose #15176 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:35 verbose #15177 > > 00:28:35 verbose #15178 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:28:35 verbose #15179 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:28:35 verbose #15180 > > │ ## (<>..) │ 00:28:35 verbose #15181 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:35 verbose #15182 > > 00:28:35 verbose #15183 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:28:35 verbose #15184 > > inl (<>..) a b = 00:28:35 verbose #15185 > > fun () => a = b 00:28:35 verbose #15186 > > |> dyn 00:28:35 verbose #15187 > > |> eval 00:28:35 verbose #15188 > > |> not 00:28:35 verbose #15189 > > 00:28:35 verbose #15190 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:28:35 verbose #15191 > > //// test 00:28:35 verbose #15192 > > ///! fsharp 00:28:35 verbose #15193 > > ///! cuda 00:28:35 verbose #15194 > > ///! rust 00:28:35 verbose #15195 > > ///! typescript 00:28:35 verbose #15196 > > ///! python 00:28:35 verbose #15197 > > 00:28:35 verbose #15198 > > ($'-3' : i32) <>.. ($'3' : i32) 00:28:35 verbose #15199 > > |> _assert_eq true 00:28:53 verbose #15200 > > 00:28:53 verbose #15201 > > ╭─[ 17.48s - return value ]────────────────────────────────────────────────────╮ 00:28:53 verbose #15202 > > │ .py output (Cuda): │ 00:28:53 verbose #15203 > > │ __assert_eq / actual: True / expected: True │ 00:28:53 verbose #15204 > > │ │ 00:28:53 verbose #15205 > > │ .rs output: │ 00:28:53 verbose #15206 > > │ __assert_eq / actual: true / expected: true │ 00:28:53 verbose #15207 > > │ │ 00:28:53 verbose #15208 > > │ .ts output: │ 00:28:53 verbose #15209 > > │ __assert_eq / actual: true / expected: true │ 00:28:53 verbose #15210 > > │ │ 00:28:53 verbose #15211 > > │ .py output: │ 00:28:53 verbose #15212 > > │ __assert_eq / actual: true / expected: true │ 00:28:53 verbose #15213 > > │ │ 00:28:53 verbose #15214 > > │ │ 00:28:53 verbose #15215 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:53 verbose #15216 > > 00:28:53 verbose #15217 > > ╭─[ 17.48s - stdout ]──────────────────────────────────────────────────────────╮ 00:28:53 verbose #15218 > > │ .fsx output: │ 00:28:53 verbose #15219 > > │ __assert_eq / actual: true / expected: true │ 00:28:53 verbose #15220 > > │ │ 00:28:53 verbose #15221 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:53 verbose #15222 > > 00:28:53 verbose #15223 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:28:53 verbose #15224 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:28:53 verbose #15225 > > │ ## composition │ 00:28:53 verbose #15226 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:53 verbose #15227 > > 00:28:53 verbose #15228 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:28:53 verbose #15229 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:28:53 verbose #15230 > > │ ### append │ 00:28:53 verbose #15231 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:53 verbose #15232 > > 00:28:53 verbose #15233 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:28:53 verbose #15234 > > prototype append t : t -> t -> t 00:28:53 verbose #15235 > > 00:28:53 verbose #15236 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:28:53 verbose #15237 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:28:53 verbose #15238 > > │ ### (++) │ 00:28:53 verbose #15239 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:53 verbose #15240 > > 00:28:53 verbose #15241 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:28:53 verbose #15242 > > inl (++) a b = 00:28:53 verbose #15243 > > b |> append a 00:28:54 verbose #15244 > > 00:28:54 verbose #15245 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:28:54 verbose #15246 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:28:54 verbose #15247 > > │ ## application │ 00:28:54 verbose #15248 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:54 verbose #15249 > > 00:28:54 verbose #15250 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:28:54 verbose #15251 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:28:54 verbose #15252 > > │ ### (||>) │ 00:28:54 verbose #15253 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:54 verbose #15254 > > 00:28:54 verbose #15255 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:28:54 verbose #15256 > > inl (||>) (arg1, arg2) fn = 00:28:54 verbose #15257 > > arg2 |> fn arg1 00:28:54 verbose #15258 > > 00:28:54 verbose #15259 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:28:54 verbose #15260 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:28:54 verbose #15261 > > │ ### fix_condition │ 00:28:54 verbose #15262 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:54 verbose #15263 > > 00:28:54 verbose #15264 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:28:54 verbose #15265 > > inl fix_condition x a b = 00:28:54 verbose #15266 > > if x () 00:28:54 verbose #15267 > > then a () |> fun x => $'(*' : () 00:28:54 verbose #15268 > > else 00:28:54 verbose #15269 > > $'*) else' : () 00:28:54 verbose #15270 > > b () |> fun x => $'(*' : () 00:28:54 verbose #15271 > > |> fun x => $'*)' : () 00:28:54 verbose #15272 > > 00:28:54 verbose #15273 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:28:54 verbose #15274 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:28:54 verbose #15275 > > │ ## type │ 00:28:54 verbose #15276 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:54 verbose #15277 > > 00:28:54 verbose #15278 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:28:54 verbose #15279 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:28:54 verbose #15280 > > │ ### infer │ 00:28:54 verbose #15281 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:54 verbose #15282 > > 00:28:54 verbose #15283 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:28:54 verbose #15284 > > nominal infer = $'_' 00:28:55 verbose #15285 > > 00:28:55 verbose #15286 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:28:55 verbose #15287 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:28:55 verbose #15288 > > │ ### infer' │ 00:28:55 verbose #15289 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:55 verbose #15290 > > 00:28:55 verbose #15291 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:28:55 verbose #15292 > > nominal infer' t = $'_' 00:28:55 verbose #15293 > > 00:28:55 verbose #15294 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:28:55 verbose #15295 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:28:55 verbose #15296 > > │ ### any │ 00:28:55 verbose #15297 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:55 verbose #15298 > > 00:28:55 verbose #15299 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:28:55 verbose #15300 > > nominal any = $'obj' 00:28:56 verbose #15301 > > 00:28:56 verbose #15302 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:28:56 verbose #15303 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:28:56 verbose #15304 > > │ ### unit │ 00:28:56 verbose #15305 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:56 verbose #15306 > > 00:28:56 verbose #15307 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:28:56 verbose #15308 > > nominal unit = $'unit' 00:28:56 verbose #15309 > > 00:28:56 verbose #15310 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:28:56 verbose #15311 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:28:56 verbose #15312 > > │ ### null │ 00:28:56 verbose #15313 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:56 verbose #15314 > > 00:28:56 verbose #15315 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:28:56 verbose #15316 > > inl null forall t. () : t = 00:28:56 verbose #15317 > > backend_switch { 00:28:56 verbose #15318 > > Fsharp = fun () => $'null |> unbox<`t>' : t 00:28:56 verbose #15319 > > Python = fun () => $'None' : t 00:28:56 verbose #15320 > > } 00:28:57 verbose #15321 > > 00:28:57 verbose #15322 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:28:57 verbose #15323 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:28:57 verbose #15324 > > │ ### defaultof │ 00:28:57 verbose #15325 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:57 verbose #15326 > > 00:28:57 verbose #15327 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:28:57 verbose #15328 > > inl defaultof forall t. () : t = 00:28:57 verbose #15329 > > $'Unchecked.defaultof<`t>' 00:28:57 verbose #15330 > > 00:28:57 verbose #15331 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:28:57 verbose #15332 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:28:57 verbose #15333 > > │ ### choice2' │ 00:28:57 verbose #15334 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:57 verbose #15335 > > 00:28:57 verbose #15336 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:28:57 verbose #15337 > > nominal choice2' a b = $'Choice<`a, `b>' 00:28:57 verbose #15338 > > 00:28:57 verbose #15339 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:28:57 verbose #15340 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:28:57 verbose #15341 > > │ ### choice2_unbox │ 00:28:57 verbose #15342 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:57 verbose #15343 > > 00:28:57 verbose #15344 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:28:57 verbose #15345 > > inl choice2_unbox forall t1 t2. (choice : choice2' t1 t2) : choice2 t1 t2 = 00:28:57 verbose #15346 > > run_target function 00:28:57 verbose #15347 > > | Fsharp (Native) => fun () => 00:28:57 verbose #15348 > > inl c1of2 (x : t1) : _ _ t2 = C1of2 x 00:28:57 verbose #15349 > > inl c2of2 (x : t2) : _ t1 _ = C2of2 x 00:28:57 verbose #15350 > > $'match !choice with Choice1Of2 x -> !c1of2 x | Choice2Of2 x -> 00:28:57 verbose #15351 > > !c2of2 x' 00:28:57 verbose #15352 > > | _ => fun () => null () 00:28:58 verbose #15353 > > 00:28:58 verbose #15354 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:28:58 verbose #15355 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:28:58 verbose #15356 > > │ ## pair │ 00:28:58 verbose #15357 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:58 verbose #15358 > > 00:28:58 verbose #15359 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:28:58 verbose #15360 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:28:58 verbose #15361 > > │ ### pair │ 00:28:58 verbose #15362 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:28:58 verbose #15363 > > 00:28:58 verbose #15364 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:28:58 verbose #15365 > > nominal pair a b = $'(`a * `b)' 00:28:58 verbose #15366 > > 00:28:58 verbose #15367 > > inl pair x y = 00:28:58 verbose #15368 > > x, y 00:28:58 verbose #15369 > > 00:28:58 verbose #15370 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:28:58 verbose #15371 > > //// test 00:28:58 verbose #15372 > > ///! fsharp 00:28:58 verbose #15373 > > ///! cuda 00:28:58 verbose #15374 > > ///! rust 00:28:58 verbose #15375 > > ///! typescript 00:28:58 verbose #15376 > > ///! python 00:28:58 verbose #15377 > > 00:28:58 verbose #15378 > > pair 1i32 2i32 00:28:58 verbose #15379 > > |> _assert_eq (1, 2) 00:29:15 verbose #15380 > > 00:29:15 verbose #15381 > > ╭─[ 17.07s - return value ]────────────────────────────────────────────────────╮ 00:29:15 verbose #15382 > > │ .py output (Cuda): │ 00:29:15 verbose #15383 > > │ __assert_eq / actual: (1, 2) / expected: (1, 2) │ 00:29:15 verbose #15384 > > │ │ 00:29:15 verbose #15385 > > │ .rs output: │ 00:29:15 verbose #15386 > > │ __assert_eq / actual: (1, 2) / expected: (1, 2) │ 00:29:15 verbose #15387 > > │ │ 00:29:15 verbose #15388 > > │ .ts output: │ 00:29:15 verbose #15389 > > │ __assert_eq / actual: 1,2 / expected: 1,2 │ 00:29:15 verbose #15390 > > │ │ 00:29:15 verbose #15391 > > │ .py output: │ 00:29:15 verbose #15392 > > │ __assert_eq / actual: (1, 2) / expected: (1, 2) │ 00:29:15 verbose #15393 > > │ │ 00:29:15 verbose #15394 > > │ │ 00:29:15 verbose #15395 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:15 verbose #15396 > > 00:29:15 verbose #15397 > > ╭─[ 17.07s - stdout ]──────────────────────────────────────────────────────────╮ 00:29:15 verbose #15398 > > │ .fsx output: │ 00:29:15 verbose #15399 > > │ __assert_eq / actual: struct (1, 2) / expected: struct (1, 2) │ 00:29:15 verbose #15400 > > │ │ 00:29:15 verbose #15401 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:15 verbose #15402 > > 00:29:15 verbose #15403 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:15 verbose #15404 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:15 verbose #15405 > > │ ### new_pair │ 00:29:15 verbose #15406 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:15 verbose #15407 > > 00:29:15 verbose #15408 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:15 verbose #15409 > > inl new_pair forall a b. (a : a) (b : b) : pair a b = 00:29:15 verbose #15410 > > $'!a, !b ' 00:29:16 verbose #15411 > > 00:29:16 verbose #15412 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:16 verbose #15413 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:16 verbose #15414 > > │ ### from_pair │ 00:29:16 verbose #15415 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:16 verbose #15416 > > 00:29:16 verbose #15417 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:16 verbose #15418 > > inl from_pair forall a b. (pair : pair a b) : a * b = 00:29:16 verbose #15419 > > backend_switch { 00:29:16 verbose #15420 > > Fsharp = fun () => 00:29:16 verbose #15421 > > $'let (a, b) = !pair ' 00:29:16 verbose #15422 > > ($'a' : a), ($'b' : b) 00:29:16 verbose #15423 > > Python = fun () => 00:29:16 verbose #15424 > > $'a, b = !pair ' 00:29:16 verbose #15425 > > ($'a' : a), ($'b' : b) 00:29:16 verbose #15426 > > } 00:29:16 verbose #15427 > > 00:29:16 verbose #15428 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:16 verbose #15429 > > //// test 00:29:16 verbose #15430 > > ///! fsharp 00:29:16 verbose #15431 > > ///! cuda 00:29:16 verbose #15432 > > ///! rust 00:29:16 verbose #15433 > > ///! typescript 00:29:16 verbose #15434 > > ///! python 00:29:16 verbose #15435 > > 00:29:16 verbose #15436 > > new_pair "a" (new_pair 1i32 "b") 00:29:16 verbose #15437 > > |> from_pair 00:29:16 verbose #15438 > > |> _assert_eq' ("a", (new_pair 1i32 "b")) 00:29:33 verbose #15439 > > 00:29:33 verbose #15440 > > ╭─[ 17.07s - return value ]────────────────────────────────────────────────────╮ 00:29:33 verbose #15441 > > │ .py output (Cuda): │ 00:29:33 verbose #15442 > > │ __assert_eq' / actual: ('a', (1, 'b')) / expected: ('a', (1, 'b')) │ 00:29:33 verbose #15443 > > │ │ 00:29:33 verbose #15444 > > │ .rs output: │ 00:29:33 verbose #15445 > > │ __assert_eq' / actual: ("a", (1, "b")) / expected: ("a", (1, "b")) │ 00:29:33 verbose #15446 > > │ │ 00:29:33 verbose #15447 > > │ .ts output: │ 00:29:33 verbose #15448 > > │ __assert_eq' / actual: a,1,b / expected: a,1,b │ 00:29:33 verbose #15449 > > │ │ 00:29:33 verbose #15450 > > │ .py output: │ 00:29:33 verbose #15451 > > │ __assert_eq' / actual: ('a', (1, 'b')) / expected: ('a', (1, 'b')) │ 00:29:33 verbose #15452 > > │ │ 00:29:33 verbose #15453 > > │ │ 00:29:33 verbose #15454 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:33 verbose #15455 > > 00:29:33 verbose #15456 > > ╭─[ 17.07s - stdout ]──────────────────────────────────────────────────────────╮ 00:29:33 verbose #15457 > > │ .fsx output: │ 00:29:33 verbose #15458 > > │ __assert_eq' / actual: struct ("a", (1, "b")) / expected: struct ("a", (1, │ 00:29:33 verbose #15459 > > │ "b")) │ 00:29:33 verbose #15460 > > │ │ 00:29:33 verbose #15461 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:33 verbose #15462 > > 00:29:33 verbose #15463 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:33 verbose #15464 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:33 verbose #15465 > > │ ## ref │ 00:29:33 verbose #15466 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:33 verbose #15467 > > 00:29:33 verbose #15468 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:33 verbose #15469 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:33 verbose #15470 > > │ ### ref │ 00:29:33 verbose #15471 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:33 verbose #15472 > > 00:29:33 verbose #15473 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:33 verbose #15474 > > nominal ref t = $'`t ref' 00:29:34 verbose #15475 > > 00:29:34 verbose #15476 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:34 verbose #15477 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:34 verbose #15478 > > │ ### new_ref │ 00:29:34 verbose #15479 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:34 verbose #15480 > > 00:29:34 verbose #15481 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:34 verbose #15482 > > inl new_ref forall t. (x : t) : ref t = 00:29:34 verbose #15483 > > $'ref !x ' 00:29:34 verbose #15484 > > 00:29:34 verbose #15485 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:34 verbose #15486 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:34 verbose #15487 > > │ ### ref_value │ 00:29:34 verbose #15488 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:34 verbose #15489 > > 00:29:34 verbose #15490 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:34 verbose #15491 > > inl ref_value forall t. (x : ref t) : t = 00:29:34 verbose #15492 > > $'!x.Value' 00:29:34 verbose #15493 > > 00:29:34 verbose #15494 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:34 verbose #15495 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:34 verbose #15496 > > │ ### ref_set_value │ 00:29:34 verbose #15497 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:34 verbose #15498 > > 00:29:34 verbose #15499 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:34 verbose #15500 > > inl ref_set_value forall t. (value : t) (ref : ref t) : ref t = 00:29:34 verbose #15501 > > $'!ref.Value <- !value ' 00:29:34 verbose #15502 > > ref 00:29:35 verbose #15503 > > 00:29:35 verbose #15504 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:35 verbose #15505 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:35 verbose #15506 > > │ ## convert │ 00:29:35 verbose #15507 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:35 verbose #15508 > > 00:29:35 verbose #15509 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:35 verbose #15510 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:35 verbose #15511 > > │ ### to │ 00:29:35 verbose #15512 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:35 verbose #15513 > > 00:29:35 verbose #15514 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:35 verbose #15515 > > inl to forall t u. (x : t) : u = 00:29:35 verbose #15516 > > $'!x ' : u 00:29:35 verbose #15517 > > 00:29:35 verbose #15518 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:35 verbose #15519 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:35 verbose #15520 > > │ ### convert │ 00:29:35 verbose #15521 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:35 verbose #15522 > > 00:29:35 verbose #15523 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:35 verbose #15524 > > inl convert forall t u. (x : t) : u = 00:29:35 verbose #15525 > > backend_switch { 00:29:35 verbose #15526 > > Fsharp = fun () => $'!x |> `u ' : u 00:29:35 verbose #15527 > > Python = fun () => x |> to : u 00:29:35 verbose #15528 > > } 00:29:36 verbose #15529 > > 00:29:36 verbose #15530 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:36 verbose #15531 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:36 verbose #15532 > > │ ### unbox │ 00:29:36 verbose #15533 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:36 verbose #15534 > > 00:29:36 verbose #15535 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:36 verbose #15536 > > inl unbox forall t u. (x : t) : u = 00:29:36 verbose #15537 > > backend_switch { 00:29:36 verbose #15538 > > Fsharp = fun () => $'!x |> unbox<`u>' : u 00:29:36 verbose #15539 > > Python = fun () => x |> to : u 00:29:36 verbose #15540 > > } 00:29:36 verbose #15541 > > 00:29:36 verbose #15542 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:36 verbose #15543 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:36 verbose #15544 > > │ ### u8 │ 00:29:36 verbose #15545 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:36 verbose #15546 > > 00:29:36 verbose #15547 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:36 verbose #15548 > > inl u8 forall t. (x : t) : u8 = 00:29:36 verbose #15549 > > x |> $'uint8' 00:29:37 verbose #15550 > > 00:29:37 verbose #15551 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:37 verbose #15552 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:37 verbose #15553 > > │ ### u16 │ 00:29:37 verbose #15554 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:37 verbose #15555 > > 00:29:37 verbose #15556 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:37 verbose #15557 > > inl u16 forall t. (x : t) : u16 = 00:29:37 verbose #15558 > > x |> $'uint16' 00:29:37 verbose #15559 > > 00:29:37 verbose #15560 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:37 verbose #15561 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:37 verbose #15562 > > │ ### u64 │ 00:29:37 verbose #15563 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:37 verbose #15564 > > 00:29:37 verbose #15565 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:37 verbose #15566 > > inl u64 forall t. (x : t) : u64 = 00:29:37 verbose #15567 > > x |> $'uint64' 00:29:37 verbose #15568 > > 00:29:37 verbose #15569 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:37 verbose #15570 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:37 verbose #15571 > > │ ### i32 │ 00:29:37 verbose #15572 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:37 verbose #15573 > > 00:29:37 verbose #15574 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:37 verbose #15575 > > inl i32 forall t. (x : t) : i32 = 00:29:37 verbose #15576 > > x |> $'int32' 00:29:38 verbose #15577 > > 00:29:38 verbose #15578 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:38 verbose #15579 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:38 verbose #15580 > > │ ### i64 │ 00:29:38 verbose #15581 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:38 verbose #15582 > > 00:29:38 verbose #15583 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:38 verbose #15584 > > inl i64 forall t. (x : t) : i64 = 00:29:38 verbose #15585 > > x |> $'int64' 00:29:38 verbose #15586 > > 00:29:38 verbose #15587 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:38 verbose #15588 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:38 verbose #15589 > > │ ### f32 │ 00:29:38 verbose #15590 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:38 verbose #15591 > > 00:29:38 verbose #15592 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:38 verbose #15593 > > inl f32 forall t. (x : t) : f32 = 00:29:38 verbose #15594 > > x |> $'float32' 00:29:39 verbose #15595 > > 00:29:39 verbose #15596 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:39 verbose #15597 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:39 verbose #15598 > > │ ### f64 │ 00:29:39 verbose #15599 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:39 verbose #15600 > > 00:29:39 verbose #15601 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:39 verbose #15602 > > inl f64 forall t. (x : t) : f64 = 00:29:39 verbose #15603 > > x |> $'float' 00:29:39 verbose #15604 > > 00:29:39 verbose #15605 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:39 verbose #15606 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:39 verbose #15607 > > │ ### unativeint │ 00:29:39 verbose #15608 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:39 verbose #15609 > > 00:29:39 verbose #15610 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:39 verbose #15611 > > nominal unativeint = $'unativeint' 00:29:40 verbose #15612 > > 00:29:40 verbose #15613 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:40 verbose #15614 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:40 verbose #15615 > > │ ### convert_i32 │ 00:29:40 verbose #15616 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:40 verbose #15617 > > 00:29:40 verbose #15618 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:40 verbose #15619 > > inl convert_i32 forall t. (x : t) : i32 = 00:29:40 verbose #15620 > > x |> $'System.Convert.ToInt32' 00:29:40 verbose #15621 > > 00:29:40 verbose #15622 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:40 verbose #15623 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:40 verbose #15624 > > │ ### convert_i32_base │ 00:29:40 verbose #15625 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:40 verbose #15626 > > 00:29:40 verbose #15627 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:40 verbose #15628 > > inl convert_i32_base forall t. (base : i32) (x : t) : i32 = 00:29:40 verbose #15629 > > $'System.Convert.ToInt32 (!x, !base)' 00:29:40 verbose #15630 > > 00:29:40 verbose #15631 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:40 verbose #15632 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:40 verbose #15633 > > │ ## error │ 00:29:40 verbose #15634 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:40 verbose #15635 > > 00:29:40 verbose #15636 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:40 verbose #15637 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:40 verbose #15638 > > │ ### exn │ 00:29:40 verbose #15639 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:40 verbose #15640 > > 00:29:40 verbose #15641 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:40 verbose #15642 > > nominal exn = $"backend_switch `({ Fsharp : $'exn'; Python : $'BaseException' 00:29:40 verbose #15643 > > })" 00:29:40 verbose #15644 > > 00:29:40 verbose #15645 > > inl exn x = 00:29:40 verbose #15646 > > x |> $'`exn ' 00:29:41 verbose #15647 > > 00:29:41 verbose #15648 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:41 verbose #15649 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:41 verbose #15650 > > │ ### try │ 00:29:41 verbose #15651 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:41 verbose #15652 > > 00:29:41 verbose #15653 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:41 verbose #15654 > > inl try forall t. (fn : () -> t) (ex_fn : exn -> option t) : option t = 00:29:41 verbose #15655 > > backend_switch { 00:29:41 verbose #15656 > > Fsharp = fun () => 00:29:41 verbose #15657 > > inl some x : option t = Some x 00:29:41 verbose #15658 > > inl some = dyn some 00:29:41 verbose #15659 > > inl fn = dyn fn 00:29:41 verbose #15660 > > inl ex_fn = dyn ex_fn 00:29:41 verbose #15661 > > $'let result = ref !(None : option t)' 00:29:41 verbose #15662 > > $'try' 00:29:41 verbose #15663 > > $' result.Value <- !fn () |> !some ' 00:29:41 verbose #15664 > > $'with ex ->' 00:29:41 verbose #15665 > > $' result.Value <- !ex_fn ex ' 00:29:41 verbose #15666 > > $'result.Value' : option t 00:29:41 verbose #15667 > > Python = fun () => 00:29:41 verbose #15668 > > $'result = !(None : option t)' 00:29:41 verbose #15669 > > inl fn = dyn fn 00:29:41 verbose #15670 > > inl ex_fn = dyn ex_fn 00:29:41 verbose #15671 > > $'try:' 00:29:41 verbose #15672 > > $' result = !fn()\n \'\'\'' 00:29:41 verbose #15673 > > $'\'\'\'' 00:29:41 verbose #15674 > > $'except Exception as e:' 00:29:41 verbose #15675 > > $' result = !ex_fn(e)' 00:29:41 verbose #15676 > > $'result' : option t 00:29:41 verbose #15677 > > } 00:29:41 verbose #15678 > > 00:29:41 verbose #15679 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:41 verbose #15680 > > //// test 00:29:41 verbose #15681 > > ///! fsharp 00:29:41 verbose #15682 > > ////! cuda // cudaErrorInsufficientDriver: CUDA driver version is insufficient 00:29:41 verbose #15683 > > for CUDA runtime version 00:29:41 verbose #15684 > > ///! rust 00:29:41 verbose #15685 > > ///! typescript 00:29:41 verbose #15686 > > ///! python 00:29:41 verbose #15687 > > 00:29:41 verbose #15688 > > try 00:29:41 verbose #15689 > > fun () => a ;[[ 0i32 ]] |> am'.index 1i32 |> sm'.format 00:29:41 verbose #15690 > > (fun ex => $'!ex ' |> sm'.format_exception |> Some) 00:29:41 verbose #15691 > > |> optionm.value 00:29:41 verbose #15692 > > |> _assert_eq (run_target function 00:29:41 verbose #15693 > > | Fsharp => fun () => "System.IndexOutOfRangeException: Index was outside 00:29:41 verbose #15694 > > the bounds of the array." 00:29:41 verbose #15695 > > | Cuda => fun () => "array index out of range" 00:29:41 verbose #15696 > > | Rust => fun () => "Exception { message: \"index out of bounds: the len is 00:29:41 verbose #15697 > > 1 but the index is 1\" }" 00:29:41 verbose #15698 > > | TypeScript => fun () => "Error: Index was outside the bounds of the 00:29:41 verbose #15699 > > array.\\nParameter name: index" 00:29:41 verbose #15700 > > | Python => fun () => "array index out of range" 00:29:41 verbose #15701 > > ) 00:29:59 verbose #15702 > > 00:29:59 verbose #15703 > > ╭─[ 17.37s - return value ]────────────────────────────────────────────────────╮ 00:29:59 verbose #15704 > > │ .rs output: │ 00:29:59 verbose #15705 > > │ __assert_eq / actual: "Exception { message: "index out of bounds: the len is │ 00:29:59 verbose #15706 > > │ 1 but the index is 1" }" / expected: "Exception { message: "index out of │ 00:29:59 verbose #15707 > > │ bounds: the len is 1 but the index is 1" }" │ 00:29:59 verbose #15708 > > │ │ 00:29:59 verbose #15709 > > │ .ts output: │ 00:29:59 verbose #15710 > > │ __assert_eq / actual: Error: Index was outside the bounds of the │ 00:29:59 verbose #15711 > > │ array.\nParameter name: index / expected: Error: Index was outside the │ 00:29:59 verbose #15712 > > │ bounds of the array.\nParameter name: index │ 00:29:59 verbose #15713 > > │ │ 00:29:59 verbose #15714 > > │ .py output: │ 00:29:59 verbose #15715 > > │ __assert_eq / actual: array index out of range / expected: array index out │ 00:29:59 verbose #15716 > > │ of range │ 00:29:59 verbose #15717 > > │ │ 00:29:59 verbose #15718 > > │ │ 00:29:59 verbose #15719 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:59 verbose #15720 > > 00:29:59 verbose #15721 > > ╭─[ 17.37s - stdout ]──────────────────────────────────────────────────────────╮ 00:29:59 verbose #15722 > > │ .fsx output: │ 00:29:59 verbose #15723 > > │ __assert_eq / actual: "System.IndexOutOfRangeException: Index was outside │ 00:29:59 verbose #15724 > > │ the bounds of the array." / expected: "System.IndexOutOfRangeException: │ 00:29:59 verbose #15725 > > │ Index was outside the bounds of the array." │ 00:29:59 verbose #15726 > > │ │ 00:29:59 verbose #15727 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:59 verbose #15728 > > 00:29:59 verbose #15729 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:59 verbose #15730 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:59 verbose #15731 > > │ ### try_unit │ 00:29:59 verbose #15732 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:59 verbose #15733 > > 00:29:59 verbose #15734 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:59 verbose #15735 > > inl try_unit forall t. (fn : () -> ()) (ex_fn : exn -> ()) : t = 00:29:59 verbose #15736 > > $'try' 00:29:59 verbose #15737 > > fn () 00:29:59 verbose #15738 > > |> ignore 00:29:59 verbose #15739 > > $'with ex ->' 00:29:59 verbose #15740 > > ex_fn $'ex' 00:29:59 verbose #15741 > > |> ignore 00:29:59 verbose #15742 > > $'(*' 00:29:59 verbose #15743 > > $'*)' 00:29:59 verbose #15744 > > 00:29:59 verbose #15745 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:29:59 verbose #15746 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:29:59 verbose #15747 > > │ ### try_finally │ 00:29:59 verbose #15748 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:29:59 verbose #15749 > > 00:29:59 verbose #15750 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:29:59 verbose #15751 > > inl try_finally forall t. (fn : () -> ()) (finally : () -> ()) : t = 00:29:59 verbose #15752 > > $'try' 00:29:59 verbose #15753 > > fn () 00:29:59 verbose #15754 > > |> ignore 00:29:59 verbose #15755 > > $'finally' 00:29:59 verbose #15756 > > finally () 00:29:59 verbose #15757 > > |> ignore 00:29:59 verbose #15758 > > $'(*' 00:29:59 verbose #15759 > > $'*)' 00:30:00 verbose #15760 > 00:04:01 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 58294 } 00:30:00 verbose #15761 > 00:04:01 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:30:00 verbose #15762 > "nbconvert", 00:30:00 verbose #15763 > "c:/home/git/polyglot/lib/spiral/base.dib.ipynb", 00:30:00 verbose #15764 > "--to", 00:30:00 verbose #15765 > "html", 00:30:00 verbose #15766 > "--HTMLExporter.theme=dark", 00:30:00 verbose #15767 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/base.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:30:02 verbose #15768 > 00:04:03 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/base.dib.ipynb to html 00:30:02 verbose #15769 > 00:04:03 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:30:02 verbose #15770 > 00:04:03 verbose #7 ! validate(nb) 00:30:04 verbose #15771 > 00:04:05 verbose #8 ! [NbConvertApp] Writing 410487 bytes to c:\home\git\polyglot\lib\spiral\base.dib.html 00:30:04 verbose #15772 > 00:04:05 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 639 } 00:30:04 verbose #15773 > 00:04:05 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 639 } 00:30:04 verbose #15774 > 00:04:05 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:30:04 verbose #15775 > "-c", 00:30:04 verbose #15776 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/base.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:30:04 verbose #15777 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/base.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:30:04 verbose #15778 > 00:04:06 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:30:04 verbose #15779 > 00:04:06 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:30:04 verbose #15780 > 00:04:06 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 58992 } 00:30:04 debug #15781 runtime.execute_with_options_async / { exit_code = 0; output_length = 63964 } 00:30:04 debug #17 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path base.dib --retries 3 00:30:04 debug #15782 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path date_time.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:30:04 verbose #15783 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "date_time.dib", "--retries", "3"])) } 00:30:04 verbose #15784 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:30:04 verbose #15785 > "repl", 00:30:04 verbose #15786 > "--exit-after-run", 00:30:04 verbose #15787 > "--run", 00:30:04 verbose #15788 > "c:/home/git/polyglot/lib/spiral/date_time.dib", 00:30:04 verbose #15789 > "--output-path", 00:30:04 verbose #15790 > "c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb", 00:30:04 verbose #15791 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/date_time.dib" --output-path "c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:30:07 verbose #15792 > > 00:30:07 verbose #15793 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:07 verbose #15794 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:07 verbose #15795 > > │ # date_time │ 00:30:07 verbose #15796 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:10 verbose #15797 > > 00:30:10 verbose #15798 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:10 verbose #15799 > > open rust.rust_operators 00:30:10 verbose #15800 > > open sm'_operators 00:30:12 verbose #15801 > > 00:30:12 verbose #15802 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:12 verbose #15803 > > //// test 00:30:12 verbose #15804 > > 00:30:12 verbose #15805 > > open testing 00:30:12 verbose #15806 > > 00:30:12 verbose #15807 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:12 verbose #15808 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:12 verbose #15809 > > │ ## date_time │ 00:30:12 verbose #15810 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:12 verbose #15811 > > 00:30:12 verbose #15812 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:12 verbose #15813 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:12 verbose #15814 > > │ ### timestamp │ 00:30:12 verbose #15815 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:12 verbose #15816 > > 00:30:12 verbose #15817 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:12 verbose #15818 > > nominal timestamp = i64 00:30:13 verbose #15819 > > 00:30:13 verbose #15820 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:13 verbose #15821 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:13 verbose #15822 > > │ ### timestamp_guid │ 00:30:13 verbose #15823 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:13 verbose #15824 > > 00:30:13 verbose #15825 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:13 verbose #15826 > > type timestamp_guid = guid.guid 00:30:13 verbose #15827 > > 00:30:13 verbose #15828 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:13 verbose #15829 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:13 verbose #15830 > > │ ### date_time_guid │ 00:30:13 verbose #15831 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:13 verbose #15832 > > 00:30:13 verbose #15833 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:13 verbose #15834 > > type date_time_guid = guid.guid 00:30:13 verbose #15835 > > 00:30:13 verbose #15836 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:13 verbose #15837 > > //// test 00:30:13 verbose #15838 > > 00:30:13 verbose #15839 > > inl test_guid () = 00:30:13 verbose #15840 > > guid.new_guid "FEDCBA98-7654-3210-FEDC-BA9876543210" 00:30:14 verbose #15841 > > 00:30:14 verbose #15842 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:14 verbose #15843 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:14 verbose #15844 > > │ ## fsharp │ 00:30:14 verbose #15845 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:14 verbose #15846 > > 00:30:14 verbose #15847 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:14 verbose #15848 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:14 verbose #15849 > > │ ### date_time │ 00:30:14 verbose #15850 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:14 verbose #15851 > > 00:30:14 verbose #15852 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:14 verbose #15853 > > nominal date_time_python = 00:30:14 verbose #15854 > > `( 00:30:14 verbose #15855 > > backend_switch { 00:30:14 verbose #15856 > > Python = fun () => 00:30:14 verbose #15857 > > global "import datetime" 00:30:14 verbose #15858 > > } 00:30:14 verbose #15859 > > $'' : $'datetime.datetime' 00:30:14 verbose #15860 > > ) 00:30:14 verbose #15861 > > type date_time_switch = 00:30:14 verbose #15862 > > { 00:30:14 verbose #15863 > > Fsharp : $'System.DateTime' 00:30:14 verbose #15864 > > Python : date_time_python 00:30:14 verbose #15865 > > } 00:30:14 verbose #15866 > > nominal date_time = $'backend_switch `(date_time_switch)' 00:30:14 verbose #15867 > > 00:30:14 verbose #15868 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:14 verbose #15869 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:14 verbose #15870 > > │ ### date_time_milliseconds │ 00:30:14 verbose #15871 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:14 verbose #15872 > > 00:30:14 verbose #15873 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:14 verbose #15874 > > inl date_time_milliseconds 00:30:14 verbose #15875 > > (year : int) (month : int) (day : int) (hour : int) (minute : int) (second : 00:30:14 verbose #15876 > > int) (millisecond : int) 00:30:14 verbose #15877 > > : date_time 00:30:14 verbose #15878 > > = 00:30:14 verbose #15879 > > backend_switch { 00:30:14 verbose #15880 > > Fsharp = fun () => 00:30:14 verbose #15881 > > $'System.DateTime (!year, !month, !day, !hour, !minute, !second, 00:30:14 verbose #15882 > > !millisecond)' : date_time 00:30:14 verbose #15883 > > Python = fun () => 00:30:14 verbose #15884 > > $'datetime.datetime(!year, !month, !day, !hour, !minute, !second, 00:30:14 verbose #15885 > > !millisecond)' : date_time 00:30:14 verbose #15886 > > } 00:30:15 verbose #15887 > > 00:30:15 verbose #15888 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:15 verbose #15889 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:15 verbose #15890 > > │ ### date_time_utc │ 00:30:15 verbose #15891 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:15 verbose #15892 > > 00:30:15 verbose #15893 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:15 verbose #15894 > > inl date_time_utc 00:30:15 verbose #15895 > > (year : int) (month : int) (day : int) (hour : int) (minute : int) (second : 00:30:15 verbose #15896 > > int) 00:30:15 verbose #15897 > > : date_time 00:30:15 verbose #15898 > > = 00:30:15 verbose #15899 > > backend_switch { 00:30:15 verbose #15900 > > Fsharp = fun () => 00:30:15 verbose #15901 > > $'System.DateTime (!year, !month, !day, !hour, !minute, !second, 00:30:15 verbose #15902 > > System.DateTimeKind.Utc)' : date_time 00:30:15 verbose #15903 > > Python = fun () => 00:30:15 verbose #15904 > > $'datetime.datetime(!year, !month, !day, !hour, !minute, !second, 00:30:15 verbose #15905 > > tzinfo=datetime.timezone.utc)' : date_time 00:30:15 verbose #15906 > > } 00:30:15 verbose #15907 > > 00:30:15 verbose #15908 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:15 verbose #15909 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:15 verbose #15910 > > │ ### ticks │ 00:30:15 verbose #15911 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:15 verbose #15912 > > 00:30:15 verbose #15913 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:15 verbose #15914 > > inl ticks (date_time : date_time) : timestamp = 00:30:15 verbose #15915 > > backend_switch { 00:30:15 verbose #15916 > > Fsharp = fun () => date_time |> $'_.Ticks' : timestamp 00:30:15 verbose #15917 > > Python = fun () => $'!date_time.timestamp()' : timestamp 00:30:15 verbose #15918 > > } 00:30:15 verbose #15919 > > 00:30:15 verbose #15920 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:15 verbose #15921 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:15 verbose #15922 > > │ ### format │ 00:30:15 verbose #15923 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:15 verbose #15924 > > 00:30:15 verbose #15925 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:15 verbose #15926 > > inl format (format : string) (date_time : date_time) : string = 00:30:15 verbose #15927 > > backend_switch { 00:30:15 verbose #15928 > > Fsharp = fun () => $'!date_time.ToString' format : string 00:30:15 verbose #15929 > > Python = fun () => $'!date_time.strftime(!format)' : string 00:30:15 verbose #15930 > > } 00:30:16 verbose #15931 > > 00:30:16 verbose #15932 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:16 verbose #15933 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:16 verbose #15934 > > │ ### format_iso8601 │ 00:30:16 verbose #15935 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:16 verbose #15936 > > 00:30:16 verbose #15937 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:16 verbose #15938 > > inl format_iso8601 (date_time : date_time) : string = 00:30:16 verbose #15939 > > backend_switch { 00:30:16 verbose #15940 > > Fsharp = fun () => date_time |> format "yyyy-MM-ddTHH-mm-ss.fff" : 00:30:16 verbose #15941 > > string 00:30:16 verbose #15942 > > Python = fun () => date_time |> format "%Y-%m-%dT%H-%M-%S.%f" : string 00:30:16 verbose #15943 > > } 00:30:16 verbose #15944 > > 00:30:16 verbose #15945 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:16 verbose #15946 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:16 verbose #15947 > > │ ### min_value │ 00:30:16 verbose #15948 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:16 verbose #15949 > > 00:30:16 verbose #15950 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:16 verbose #15951 > > inl min_value () : date_time = 00:30:16 verbose #15952 > > backend_switch { 00:30:16 verbose #15953 > > Fsharp = fun () => $'System.DateTime.MinValue' : date_time 00:30:16 verbose #15954 > > Python = fun () => $'datetime.datetime.min' : date_time 00:30:16 verbose #15955 > > } 00:30:17 verbose #15956 > > 00:30:17 verbose #15957 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:17 verbose #15958 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:17 verbose #15959 > > │ ### max_value │ 00:30:17 verbose #15960 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:17 verbose #15961 > > 00:30:17 verbose #15962 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:17 verbose #15963 > > inl max_value () : date_time = 00:30:17 verbose #15964 > > backend_switch { 00:30:17 verbose #15965 > > Fsharp = fun () => $'System.DateTime.MaxValue' : date_time 00:30:17 verbose #15966 > > Python = fun () => $'datetime.datetime.max' : date_time 00:30:17 verbose #15967 > > } 00:30:17 verbose #15968 > > 00:30:17 verbose #15969 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:17 verbose #15970 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:17 verbose #15971 > > │ ### unix_epoch │ 00:30:17 verbose #15972 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:17 verbose #15973 > > 00:30:17 verbose #15974 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:17 verbose #15975 > > inl unix_epoch () : date_time = 00:30:17 verbose #15976 > > backend_switch { 00:30:17 verbose #15977 > > Fsharp = fun () => $'System.DateTime.UnixEpoch' : date_time 00:30:17 verbose #15978 > > Python = fun () => $'datetime.datetime(1970, 1, 1)' : date_time 00:30:17 verbose #15979 > > } 00:30:18 verbose #15980 > > 00:30:18 verbose #15981 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:18 verbose #15982 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:18 verbose #15983 > > │ ### to_universal_time │ 00:30:18 verbose #15984 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:18 verbose #15985 > > 00:30:18 verbose #15986 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:18 verbose #15987 > > inl to_universal_time (date_time : date_time) : date_time = 00:30:18 verbose #15988 > > backend_switch { 00:30:18 verbose #15989 > > Fsharp = fun () => date_time |> $'_.ToUniversalTime()' : date_time 00:30:18 verbose #15990 > > Python = fun () => $'!date_time.astimezone(datetime.timezone.utc)' : 00:30:18 verbose #15991 > > date_time 00:30:18 verbose #15992 > > } 00:30:18 verbose #15993 > > 00:30:18 verbose #15994 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:18 verbose #15995 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:18 verbose #15996 > > │ ### date_time_kind │ 00:30:18 verbose #15997 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:18 verbose #15998 > > 00:30:18 verbose #15999 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:18 verbose #16000 > > union date_time_kind = 00:30:18 verbose #16001 > > | Unspecified 00:30:18 verbose #16002 > > | Utc 00:30:18 verbose #16003 > > | Local 00:30:19 verbose #16004 > > 00:30:19 verbose #16005 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:19 verbose #16006 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:19 verbose #16007 > > │ ### specify_date_kind │ 00:30:19 verbose #16008 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:19 verbose #16009 > > 00:30:19 verbose #16010 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:19 verbose #16011 > > inl specify_date_kind (kind : date_time_kind) (date_time : date_time) : 00:30:19 verbose #16012 > > date_time = 00:30:19 verbose #16013 > > inl kind : $'System.DateTimeKind' = 00:30:19 verbose #16014 > > match kind with 00:30:19 verbose #16015 > > | Unspecified => $'System.DateTimeKind.Unspecified' 00:30:19 verbose #16016 > > | Utc => $'System.DateTimeKind.Utc' 00:30:19 verbose #16017 > > | Local => $'System.DateTimeKind.Local' 00:30:19 verbose #16018 > > $'System.DateTime.SpecifyKind (!date_time, !kind)' 00:30:19 verbose #16019 > > 00:30:19 verbose #16020 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:19 verbose #16021 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:19 verbose #16022 > > │ ### time_span │ 00:30:19 verbose #16023 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:19 verbose #16024 > > 00:30:19 verbose #16025 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:19 verbose #16026 > > nominal time_span = $"backend_switch `({ Fsharp : $"System.TimeSpan"; Python : 00:30:19 verbose #16027 > > $"datetime.timedelta" })" 00:30:19 verbose #16028 > > 00:30:19 verbose #16029 > > inl time_span x : time_span = 00:30:19 verbose #16030 > > backend_switch { 00:30:19 verbose #16031 > > Fsharp = fun () => x |> $'`time_span ' : time_span 00:30:19 verbose #16032 > > Python = fun () => $'datetime.timedelta(!x)' : time_span 00:30:19 verbose #16033 > > } 00:30:19 verbose #16034 > > 00:30:19 verbose #16035 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:19 verbose #16036 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:19 verbose #16037 > > │ ### new_time_span │ 00:30:19 verbose #16038 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:19 verbose #16039 > > 00:30:19 verbose #16040 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:19 verbose #16041 > > inl new_time_span (a : date_time) (b : date_time) : time_span = 00:30:19 verbose #16042 > > $'!b - !a ' 00:30:20 verbose #16043 > > 00:30:20 verbose #16044 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:20 verbose #16045 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:20 verbose #16046 > > │ ### time_span_format │ 00:30:20 verbose #16047 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:20 verbose #16048 > > 00:30:20 verbose #16049 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:20 verbose #16050 > > inl time_span_format (format : string) (time_span : time_span) : string = 00:30:20 verbose #16051 > > run_target function 00:30:20 verbose #16052 > > | (TypeScript _ | Python _) => fun () => 00:30:20 verbose #16053 > > $'!time_span.ToString ("c", 00:30:20 verbose #16054 > > System.Globalization.CultureInfo.InvariantCulture)' 00:30:20 verbose #16055 > > | _ => fun () => 00:30:20 verbose #16056 > > $'!time_span.ToString !format ' 00:30:20 verbose #16057 > > 00:30:20 verbose #16058 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:20 verbose #16059 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:20 verbose #16060 > > │ ### hours │ 00:30:20 verbose #16061 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:20 verbose #16062 > > 00:30:20 verbose #16063 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:20 verbose #16064 > > inl hours (time_span : time_span) : i32 = 00:30:20 verbose #16065 > > backend_switch { 00:30:20 verbose #16066 > > Fsharp = fun () => time_span |> $'_.Hours' : i32 00:30:20 verbose #16067 > > Python = fun () => $'!time_span.days * 24 + !time_span.seconds // 3600' 00:30:20 verbose #16068 > > : i32 00:30:20 verbose #16069 > > } 00:30:21 verbose #16070 > > 00:30:21 verbose #16071 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:21 verbose #16072 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:21 verbose #16073 > > │ ### milliseconds │ 00:30:21 verbose #16074 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:21 verbose #16075 > > 00:30:21 verbose #16076 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:21 verbose #16077 > > inl milliseconds (time_span : time_span) : i32 = 00:30:21 verbose #16078 > > backend_switch { 00:30:21 verbose #16079 > > Fsharp = fun () => time_span |> $'_.Milliseconds' : i32 00:30:21 verbose #16080 > > Python = fun () => $'!time_span.microseconds // 1000' : i32 00:30:21 verbose #16081 > > } 00:30:21 verbose #16082 > > 00:30:21 verbose #16083 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:21 verbose #16084 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:21 verbose #16085 > > │ ### minutes │ 00:30:21 verbose #16086 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:21 verbose #16087 > > 00:30:21 verbose #16088 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:21 verbose #16089 > > inl minutes (time_span : time_span) : i32 = 00:30:21 verbose #16090 > > backend_switch { 00:30:21 verbose #16091 > > Fsharp = fun () => time_span |> $'_.Minutes' : i32 00:30:21 verbose #16092 > > Python = fun () => $'!time_span.seconds // 60' : i32 00:30:21 verbose #16093 > > } 00:30:22 verbose #16094 > > 00:30:22 verbose #16095 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:22 verbose #16096 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:22 verbose #16097 > > │ ### seconds │ 00:30:22 verbose #16098 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:22 verbose #16099 > > 00:30:22 verbose #16100 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:22 verbose #16101 > > inl seconds (time_span : time_span) : i32 = 00:30:22 verbose #16102 > > backend_switch { 00:30:22 verbose #16103 > > Fsharp = fun () => time_span |> $'_.Seconds' : i32 00:30:22 verbose #16104 > > Python = fun () => $'!time_span.seconds % 60' : i32 00:30:22 verbose #16105 > > } 00:30:22 verbose #16106 > > 00:30:22 verbose #16107 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:22 verbose #16108 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:22 verbose #16109 > > │ ### total_seconds │ 00:30:22 verbose #16110 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:22 verbose #16111 > > 00:30:22 verbose #16112 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:22 verbose #16113 > > inl total_seconds (time_span : time_span) : f64 = 00:30:22 verbose #16114 > > backend_switch { 00:30:22 verbose #16115 > > Fsharp = fun () => time_span |> $'_.TotalSeconds' : f64 00:30:22 verbose #16116 > > Python = fun () => $'!time_span.total_seconds()' : f64 00:30:22 verbose #16117 > > } 00:30:22 verbose #16118 > > 00:30:22 verbose #16119 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:22 verbose #16120 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:22 verbose #16121 > > │ ### time_zone_info │ 00:30:22 verbose #16122 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:22 verbose #16123 > > 00:30:22 verbose #16124 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:22 verbose #16125 > > nominal time_zone_info = $'System.TimeZoneInfo' 00:30:23 verbose #16126 > > 00:30:23 verbose #16127 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:23 verbose #16128 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:23 verbose #16129 > > │ ### add_days │ 00:30:23 verbose #16130 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:23 verbose #16131 > > 00:30:23 verbose #16132 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:23 verbose #16133 > > inl add_days (days : i32) (date_time : date_time) : date_time = 00:30:23 verbose #16134 > > $'!date_time.AddDays' days 00:30:23 verbose #16135 > > 00:30:23 verbose #16136 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:23 verbose #16137 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:23 verbose #16138 > > │ ### now │ 00:30:23 verbose #16139 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:23 verbose #16140 > > 00:30:23 verbose #16141 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:23 verbose #16142 > > inl now () : date_time = 00:30:23 verbose #16143 > > backend_switch { 00:30:23 verbose #16144 > > Fsharp = fun () => $'System.DateTime.Now' : date_time 00:30:23 verbose #16145 > > Python = fun () => 00:30:23 verbose #16146 > > backend_switch { 00:30:23 verbose #16147 > > Python = fun () => 00:30:23 verbose #16148 > > global "import datetime" 00:30:23 verbose #16149 > > } 00:30:23 verbose #16150 > > $'datetime.datetime.now()' : date_time 00:30:23 verbose #16151 > > } 00:30:24 verbose #16152 > > 00:30:24 verbose #16153 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:24 verbose #16154 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:24 verbose #16155 > > │ ### utc_now │ 00:30:24 verbose #16156 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:24 verbose #16157 > > 00:30:24 verbose #16158 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:24 verbose #16159 > > inl utc_now () : date_time = 00:30:24 verbose #16160 > > backend_switch { 00:30:24 verbose #16161 > > Fsharp = fun () => $'System.DateTime.UtcNow' : date_time 00:30:24 verbose #16162 > > Python = fun () => 00:30:24 verbose #16163 > > backend_switch { 00:30:24 verbose #16164 > > Python = fun () => 00:30:24 verbose #16165 > > global "import datetime" 00:30:24 verbose #16166 > > } 00:30:24 verbose #16167 > > $'datetime.datetime.utcnow()' : date_time 00:30:24 verbose #16168 > > } 00:30:24 verbose #16169 > > 00:30:24 verbose #16170 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:24 verbose #16171 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:24 verbose #16172 > > │ ### stopwatch │ 00:30:24 verbose #16173 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:24 verbose #16174 > > 00:30:24 verbose #16175 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:24 verbose #16176 > > nominal stopwatch_python = 00:30:24 verbose #16177 > > `( 00:30:24 verbose #16178 > > global "import timeit" 00:30:24 verbose #16179 > > $'' : $'timeit.default_timer' 00:30:24 verbose #16180 > > ) 00:30:24 verbose #16181 > > type stopwatch_switch = 00:30:24 verbose #16182 > > { 00:30:24 verbose #16183 > > Fsharp : $'System.Diagnostics.Stopwatch' 00:30:24 verbose #16184 > > Python : stopwatch_python 00:30:24 verbose #16185 > > } 00:30:24 verbose #16186 > > nominal stopwatch = $'backend_switch `(stopwatch_switch)' 00:30:24 verbose #16187 > > 00:30:24 verbose #16188 > > inl stopwatch () : stopwatch = 00:30:24 verbose #16189 > > backend_switch { 00:30:24 verbose #16190 > > Fsharp = fun () => $'`stopwatch ' () : stopwatch 00:30:24 verbose #16191 > > Python = fun () => $'`stopwatch ' : stopwatch 00:30:24 verbose #16192 > > } 00:30:25 verbose #16193 > > 00:30:25 verbose #16194 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:25 verbose #16195 > > inl stopwatch_elapsed_milliseconds (stopwatch : stopwatch) : i64 = 00:30:25 verbose #16196 > > $'!stopwatch.ElapsedMilliseconds' 00:30:25 verbose #16197 > > 00:30:25 verbose #16198 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:25 verbose #16199 > > inl stopwatch_start (stopwatch : stopwatch) : () = 00:30:25 verbose #16200 > > $'!stopwatch.Start' () 00:30:25 verbose #16201 > > 00:30:25 verbose #16202 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:25 verbose #16203 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:25 verbose #16204 > > │ ## rust │ 00:30:25 verbose #16205 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:25 verbose #16206 > > 00:30:25 verbose #16207 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:25 verbose #16208 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:25 verbose #16209 > > │ ### duration │ 00:30:25 verbose #16210 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:25 verbose #16211 > > 00:30:25 verbose #16212 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:25 verbose #16213 > > nominal duration = 00:30:25 verbose #16214 > > `( 00:30:25 verbose #16215 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:30:25 verbose #16216 > > Fable.Core.Emit(\"std::time::Duration\")>]]\n#endif\ntype std_time_Duration = 00:30:25 verbose #16217 > > class end" 00:30:25 verbose #16218 > > $'' : $'std_time_Duration' 00:30:25 verbose #16219 > > ) 00:30:26 verbose #16220 > > 00:30:26 verbose #16221 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:26 verbose #16222 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:26 verbose #16223 > > │ ### date_time' │ 00:30:26 verbose #16224 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:26 verbose #16225 > > 00:30:26 verbose #16226 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:26 verbose #16227 > > nominal date_time' t = 00:30:26 verbose #16228 > > `( 00:30:26 verbose #16229 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:30:26 verbose #16230 > > Fable.Core.Emit(\"chrono::DateTime<$0>\")>]]\n#endif\ntype chrono_DateTime<'T> = 00:30:26 verbose #16231 > > class end" 00:30:26 verbose #16232 > > $'' : $'chrono_DateTime<`t>' 00:30:26 verbose #16233 > > ) 00:30:26 verbose #16234 > > 00:30:26 verbose #16235 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:26 verbose #16236 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:26 verbose #16237 > > │ ### local │ 00:30:26 verbose #16238 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:26 verbose #16239 > > 00:30:26 verbose #16240 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:26 verbose #16241 > > nominal local = 00:30:26 verbose #16242 > > `( 00:30:26 verbose #16243 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:30:26 verbose #16244 > > Fable.Core.Emit(\"chrono::Local\")>]]\n#endif\ntype chrono_Local = class end" 00:30:26 verbose #16245 > > $'' : $'chrono_Local' 00:30:26 verbose #16246 > > ) 00:30:27 verbose #16247 > > 00:30:27 verbose #16248 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:27 verbose #16249 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:27 verbose #16250 > > │ ### naive_date_time │ 00:30:27 verbose #16251 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:27 verbose #16252 > > 00:30:27 verbose #16253 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:27 verbose #16254 > > nominal naive_date_time = 00:30:27 verbose #16255 > > `( 00:30:27 verbose #16256 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:30:27 verbose #16257 > > Fable.Core.Emit(\"chrono::NaiveDateTime\")>]]\n#endif\ntype chrono_NaiveDateTime 00:30:27 verbose #16258 > > = class end" 00:30:27 verbose #16259 > > $'' : $'chrono_NaiveDateTime' 00:30:27 verbose #16260 > > ) 00:30:27 verbose #16261 > > 00:30:27 verbose #16262 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:27 verbose #16263 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:27 verbose #16264 > > │ ## utc │ 00:30:27 verbose #16265 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:27 verbose #16266 > > 00:30:27 verbose #16267 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:27 verbose #16268 > > nominal utc = 00:30:27 verbose #16269 > > `( 00:30:27 verbose #16270 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:30:27 verbose #16271 > > Fable.Core.Emit(\"chrono::Utc\")>]]\n#endif\ntype chrono_Utc = class end" 00:30:27 verbose #16272 > > $'' : $'chrono_Utc' 00:30:27 verbose #16273 > > ) 00:30:28 verbose #16274 > > 00:30:28 verbose #16275 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:28 verbose #16276 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:28 verbose #16277 > > │ ### naive_utc │ 00:30:28 verbose #16278 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:28 verbose #16279 > > 00:30:28 verbose #16280 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:28 verbose #16281 > > inl naive_utc (date_time : date_time' utc) : naive_date_time = 00:30:28 verbose #16282 > > !\\(date_time, $'"$0.naive_utc()"') 00:30:28 verbose #16283 > > 00:30:28 verbose #16284 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:28 verbose #16285 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:28 verbose #16286 > > │ ### to_local │ 00:30:28 verbose #16287 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:28 verbose #16288 > > 00:30:28 verbose #16289 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:28 verbose #16290 > > inl to_local (date_time : date_time' utc) : date_time' local = 00:30:28 verbose #16291 > > inl naive_date_time = date_time |> naive_utc 00:30:28 verbose #16292 > > !\\(naive_date_time, 00:30:28 verbose #16293 > > $'"chrono::offset::TimeZone::from_utc_datetime(&chrono::Local, &$0)"') 00:30:29 verbose #16294 > > 00:30:29 verbose #16295 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:29 verbose #16296 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:29 verbose #16297 > > │ ### from_timestamp_micros │ 00:30:29 verbose #16298 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:29 verbose #16299 > > 00:30:29 verbose #16300 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:29 verbose #16301 > > inl from_timestamp_micros forall t {number; int}. (timestamp : t) : option 00:30:29 verbose #16302 > > (date_time' utc) = 00:30:29 verbose #16303 > > inl result : optionm'.option' (date_time' utc) = 00:30:29 verbose #16304 > > !\\(timestamp, $'"chrono::DateTime::from_timestamp_micros($0)"') 00:30:29 verbose #16305 > > result |> optionm'.unbox 00:30:29 verbose #16306 > > 00:30:29 verbose #16307 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:29 verbose #16308 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:29 verbose #16309 > > │ ### format' │ 00:30:29 verbose #16310 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:29 verbose #16311 > > 00:30:29 verbose #16312 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:29 verbose #16313 > > inl format' (format : string) (date_time : date_time' utc) : sm'.std_string = 00:30:29 verbose #16314 > > !\\((date_time, #format), $'"$0.format($1).to_string()"') 00:30:29 verbose #16315 > > 00:30:29 verbose #16316 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:29 verbose #16317 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:29 verbose #16318 > > │ ### format'' │ 00:30:29 verbose #16319 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:29 verbose #16320 > > 00:30:29 verbose #16321 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:29 verbose #16322 > > inl format'' (format : string) (date_time : date_time' _) : sm'.std_string = 00:30:29 verbose #16323 > > !\\((date_time, #format), $'"$0.format($1).to_string()"') 00:30:30 verbose #16324 > > 00:30:30 verbose #16325 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:30 verbose #16326 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:30 verbose #16327 > > │ ### format_timestamp │ 00:30:30 verbose #16328 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:30 verbose #16329 > > 00:30:30 verbose #16330 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:30 verbose #16331 > > inl format_timestamp forall t {number; int}. (timestamp : t) = 00:30:30 verbose #16332 > > inl timestamp = join timestamp 00:30:30 verbose #16333 > > (timestamp / 1000) 00:30:30 verbose #16334 > > |> from_timestamp_micros 00:30:30 verbose #16335 > > |> optionm.map fun x => 00:30:30 verbose #16336 > > x 00:30:30 verbose #16337 > > |> to_local 00:30:30 verbose #16338 > > |> format'' "%Y-%m-%d %H:%M:%S" 00:30:30 verbose #16339 > > |> sm'.from_std_string 00:30:30 verbose #16340 > > |> resultm.from_option 00:30:30 verbose #16341 > > 00:30:30 verbose #16342 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:30 verbose #16343 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:30 verbose #16344 > > │ ### duration_from_millis │ 00:30:30 verbose #16345 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:30 verbose #16346 > > 00:30:30 verbose #16347 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:30 verbose #16348 > > inl duration_from_millis (ms : u64) : duration = 00:30:30 verbose #16349 > > inl ms = join ms 00:30:30 verbose #16350 > > !\($'"std::time::Duration::from_millis(!ms)"') 00:30:31 verbose #16351 > > 00:30:31 verbose #16352 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:31 verbose #16353 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:31 verbose #16354 > > │ ## date_time │ 00:30:31 verbose #16355 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:31 verbose #16356 > > 00:30:31 verbose #16357 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:31 verbose #16358 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:31 verbose #16359 > > │ ### time_zone_local │ 00:30:31 verbose #16360 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:31 verbose #16361 > > 00:30:31 verbose #16362 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:31 verbose #16363 > > inl time_zone_local () : time_zone_info = 00:30:31 verbose #16364 > > run_target function 00:30:31 verbose #16365 > > | Rust (Native) => fun () => 00:30:31 verbose #16366 > > open rust.rust_operators 00:30:31 verbose #16367 > > !\($'"0i64.into()"') 00:30:31 verbose #16368 > > | Fsharp _ => fun () => 00:30:31 verbose #16369 > > $'System.TimeZoneInfo.Local' 00:30:31 verbose #16370 > > | _ => fun () => null () 00:30:31 verbose #16371 > > 00:30:31 verbose #16372 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:31 verbose #16373 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:31 verbose #16374 > > │ ### get_utc_offset │ 00:30:31 verbose #16375 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:31 verbose #16376 > > 00:30:31 verbose #16377 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:31 verbose #16378 > > inl get_utc_offset (time_zone_info : time_zone_info) (date_time : date_time) : 00:30:31 verbose #16379 > > time_span = 00:30:31 verbose #16380 > > run_target function 00:30:31 verbose #16381 > > | Rust _ => fun () => time_span () 00:30:31 verbose #16382 > > | Fsharp _ => fun () => date_time |> $'_.GetUtcOffset' (time_zone_local 00:30:31 verbose #16383 > > ()) 00:30:31 verbose #16384 > > | target => fun () => failwith $'$"date_time.get_utc_offset / target: 00:30:31 verbose #16385 > > {!target}"' 00:30:32 verbose #16386 > > 00:30:32 verbose #16387 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:30:32 verbose #16388 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:30:32 verbose #16389 > > │ ### date_time_guid_from_date_time │ 00:30:32 verbose #16390 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:32 verbose #16391 > > 00:30:32 verbose #16392 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:32 verbose #16393 > > let date_time_guid_from_date_time (guid : guid.guid) (date_time : date_time) = 00:30:32 verbose #16394 > > inl create prefix time_zone : date_time_guid = 00:30:32 verbose #16395 > > inl guid = guid |> sm'.obj_to_string 00:30:32 verbose #16396 > > $'`date_time_guid $"{!prefix}{!time_zone}{!guid.[[!prefix.Length + 00:30:32 verbose #16397 > > !time_zone.Length..]]}"' 00:30:32 verbose #16398 > > run_target function 00:30:32 verbose #16399 > > | Rust (Contract) => fun () => null () 00:30:32 verbose #16400 > > | Rust (Native | Wasm) => fun () => 00:30:32 verbose #16401 > > inl epoch = 00:30:32 verbose #16402 > > date_time_utc 1970 1 1 0 0 0 00:30:32 verbose #16403 > > |> to_universal_time 00:30:32 verbose #16404 > > inl date_time = 00:30:32 verbose #16405 > > date_time 00:30:32 verbose #16406 > > |> specify_date_kind Local 00:30:32 verbose #16407 > > |> to_universal_time 00:30:32 verbose #16408 > > inl unixticks = 00:30:32 verbose #16409 > > match date_time |> ticks, epoch |> ticks with 00:30:32 verbose #16410 > > | timestamp date_time, timestamp epoch => date_time - epoch 00:30:32 verbose #16411 > > inl prefix = 00:30:32 verbose #16412 > > unixticks / 10 00:30:32 verbose #16413 > > |> from_timestamp_micros 00:30:32 verbose #16414 > > |> optionm.map ( 00:30:32 verbose #16415 > > to_local 00:30:32 verbose #16416 > > >> format'' "%Y%m%d-%H%M-%S%f" 00:30:32 verbose #16417 > > >> sm'.from_std_string 00:30:32 verbose #16418 > > >> fun s => $'$"{!s.[[0..17]]}-{!s.[[18..21]]}-{!s.[[22]]}"' 00:30:32 verbose #16419 > > ) 00:30:32 verbose #16420 > > |> optionm'.default_value "" 00:30:32 verbose #16421 > > inl time_zone = date_time |> get_utc_offset (time_zone_local ()) 00:30:32 verbose #16422 > > inl time_zone_signal = if hours time_zone > 0 then 1u8 else 0 00:30:32 verbose #16423 > > inl time_zone_value = time_zone |> time_span_format (join "hh:mm") 00:30:32 verbose #16424 > > inl time_zone = 00:30:32 verbose #16425 > > $'$"{!time_zone_signal}{!time_zone_value.[[0..1]]}{!time_zone_value.[[3..4]]}"' 00:30:32 verbose #16426 > > : string 00:30:32 verbose #16427 > > create prefix time_zone 00:30:32 verbose #16428 > > | target => fun () => 00:30:32 verbose #16429 > > inl prefix = date_time |> format (join "yyyyMMdd-HHmm-ssff-ffff-f") 00:30:32 verbose #16430 > > inl time_zone = date_time |> get_utc_offset (time_zone_local ()) 00:30:32 verbose #16431 > > inl time_zone_signal = if hours time_zone > 0 then 1u8 else 0 00:30:32 verbose #16432 > > inl time_zone_value = time_zone |> time_span_format (join "hhmm") 00:30:32 verbose #16433 > > inl time_zone = $'$"{!time_zone_signal}{!time_zone_value}"' : string 00:30:32 verbose #16434 > > create prefix time_zone 00:30:32 verbose #16435 > > 00:30:32 verbose #16436 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:32 verbose #16437 > > //// test 00:30:32 verbose #16438 > > 00:30:32 verbose #16439 > > now () |> to_universal_time |> date_time_guid_from_date_time (test_guid ()) |> 00:30:32 verbose #16440 > > sm'.obj_to_string 00:30:32 verbose #16441 > > |> console.write_line 00:30:34 verbose #16442 > > 00:30:34 verbose #16443 > > ╭─[ 1.87s - stdout ]───────────────────────────────────────────────────────────╮ 00:30:34 verbose #16444 > > │ 20240929-0648-1653-5398-500400543210 │ 00:30:34 verbose #16445 > > │ │ 00:30:34 verbose #16446 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:34 verbose #16447 > > 00:30:34 verbose #16448 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:34 verbose #16449 > > //// test 00:30:34 verbose #16450 > > ///! rust -d chrono 00:30:34 verbose #16451 > > 00:30:34 verbose #16452 > > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x 00:30:34 verbose #16453 > > - 6i32) (am'.End id) 00:30:34 verbose #16454 > > now () 00:30:34 verbose #16455 > > |> to_universal_time 00:30:34 verbose #16456 > > |> date_time_guid_from_date_time (test_guid ()) 00:30:34 verbose #16457 > > |> sm'.obj_to_string 00:30:34 verbose #16458 > > |> fun s => s |> _assert_eq' $'$"{!s.[[0..29]]}{!suffix}"' 00:30:51 verbose #16459 > > 00:30:51 verbose #16460 > > ╭─[ 17.03s - return value ]────────────────────────────────────────────────────╮ 00:30:51 verbose #16461 > > │ __assert_eq' / actual: "20240929-0648-3346-6977-000000543210" / expected: │ 00:30:51 verbose #16462 > > │ "20240929-0648-3346-6977-000000543210" │ 00:30:51 verbose #16463 > > │ │ 00:30:51 verbose #16464 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:30:51 verbose #16465 > > 00:30:51 verbose #16466 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:30:51 verbose #16467 > > //// test 00:30:51 verbose #16468 > > ///! fsharp 00:30:51 verbose #16469 > > ///! rust -d chrono 00:30:51 verbose #16470 > > 00:30:51 verbose #16471 > > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x 00:30:51 verbose #16472 > > - 6i32) (am'.End id) 00:30:51 verbose #16473 > > min_value () 00:30:51 verbose #16474 > > |> specify_date_kind Local 00:30:51 verbose #16475 > > |> date_time_guid_from_date_time (test_guid ()) 00:30:51 verbose #16476 > > |> sm'.obj_to_string 00:30:51 verbose #16477 > > |> fun s => s |> _assert_eq' 00:30:51 verbose #16478 > > $'$"00010101-0000-0000-0000-0{!s.[[25..29]]}{!suffix}"' 00:31:08 verbose #16479 > > 00:31:08 verbose #16480 > > ╭─[ 17.01s - return value ]────────────────────────────────────────────────────╮ 00:31:08 verbose #16481 > > │ .rs output (rust -d chrono): │ 00:31:08 verbose #16482 > > │ __assert_eq' / actual: "00010101-0000-0000-0000-000000543210" / expected: │ 00:31:08 verbose #16483 > > │ "00010101-0000-0000-0000-000000543210" │ 00:31:08 verbose #16484 > > │ │ 00:31:08 verbose #16485 > > │ │ 00:31:08 verbose #16486 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:31:08 verbose #16487 > > 00:31:08 verbose #16488 > > ╭─[ 17.01s - stdout ]──────────────────────────────────────────────────────────╮ 00:31:08 verbose #16489 > > │ .fsx output: │ 00:31:08 verbose #16490 > > │ __assert_eq' / actual: "00010101-0000-0000-0000-000400543210" / expected: │ 00:31:08 verbose #16491 > > │ "00010101-0000-0000-0000-000400543210" │ 00:31:08 verbose #16492 > > │ │ 00:31:08 verbose #16493 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:31:08 verbose #16494 > > 00:31:08 verbose #16495 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:31:08 verbose #16496 > > //// test 00:31:08 verbose #16497 > > ///! fsharp 00:31:08 verbose #16498 > > 00:31:08 verbose #16499 > > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x 00:31:08 verbose #16500 > > - 6i32) (am'.End id) 00:31:08 verbose #16501 > > max_value () 00:31:08 verbose #16502 > > |> specify_date_kind Utc 00:31:08 verbose #16503 > > |> add_days -1 00:31:08 verbose #16504 > > |> date_time_guid_from_date_time (test_guid ()) 00:31:08 verbose #16505 > > |> sm'.obj_to_string 00:31:08 verbose #16506 > > |> fun s => s |> _assert_eq 00:31:08 verbose #16507 > > $'$"99991230-2359-5999-9999-9{!s.[[25..29]]}{!suffix}"' 00:31:09 verbose #16508 > > 00:31:09 verbose #16509 > > ╭─[ 596.62ms - stdout ]────────────────────────────────────────────────────────╮ 00:31:09 verbose #16510 > > │ __assert_eq / actual: "99991230-2359-5999-9999-900400543210" / expected: │ 00:31:09 verbose #16511 > > │ "99991230-2359-5999-9999-900400543210" │ 00:31:09 verbose #16512 > > │ │ 00:31:09 verbose #16513 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:31:09 verbose #16514 > > 00:31:09 verbose #16515 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:31:09 verbose #16516 > > //// test 00:31:09 verbose #16517 > > ///! rust -d chrono 00:31:09 verbose #16518 > > 00:31:09 verbose #16519 > > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x 00:31:09 verbose #16520 > > - 6i32) (am'.End id) 00:31:09 verbose #16521 > > max_value () 00:31:09 verbose #16522 > > |> specify_date_kind Utc 00:31:09 verbose #16523 > > |> add_days -1 00:31:09 verbose #16524 > > |> date_time_guid_from_date_time (test_guid ()) 00:31:09 verbose #16525 > > |> sm'.obj_to_string 00:31:09 verbose #16526 > > |> fun s => s |> _assert_eq 00:31:09 verbose #16527 > > $'$"99991230-2359-5999-9999-0{!s.[[25..29]]}{!suffix}"' 00:31:26 verbose #16528 > > 00:31:26 verbose #16529 > > ╭─[ 16.85s - return value ]────────────────────────────────────────────────────╮ 00:31:26 verbose #16530 > > │ __assert_eq / actual: "99991230-2359-5999-9999-000000543210" / expected: │ 00:31:26 verbose #16531 > > │ "99991230-2359-5999-9999-000000543210" │ 00:31:26 verbose #16532 > > │ │ 00:31:26 verbose #16533 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:31:26 verbose #16534 > > 00:31:26 verbose #16535 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:31:26 verbose #16536 > > //// test 00:31:26 verbose #16537 > > 00:31:26 verbose #16538 > > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x 00:31:26 verbose #16539 > > - 6i32) (am'.End id) 00:31:26 verbose #16540 > > unix_epoch () 00:31:26 verbose #16541 > > |> specify_date_kind Utc 00:31:26 verbose #16542 > > |> add_days 1 00:31:26 verbose #16543 > > |> date_time_guid_from_date_time (test_guid ()) 00:31:26 verbose #16544 > > |> sm'.obj_to_string 00:31:26 verbose #16545 > > |> fun s => s |> _assert_eq 00:31:26 verbose #16546 > > $'$"19700102-0000-0000-0000-0{!s.[[25..29]]}{!suffix}"' 00:31:26 verbose #16547 > > 00:31:26 verbose #16548 > > ╭─[ 633.72ms - stdout ]────────────────────────────────────────────────────────╮ 00:31:26 verbose #16549 > > │ __assert_eq / actual: "19700102-0000-0000-0000-000400543210" / expected: │ 00:31:26 verbose #16550 > > │ "19700102-0000-0000-0000-000400543210" │ 00:31:26 verbose #16551 > > │ │ 00:31:26 verbose #16552 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:31:26 verbose #16553 > > 00:31:26 verbose #16554 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:31:26 verbose #16555 > > //// test 00:31:26 verbose #16556 > > ///! rust -d chrono 00:31:26 verbose #16557 > > 00:31:26 verbose #16558 > > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x 00:31:26 verbose #16559 > > - 6i32) (am'.End id) 00:31:26 verbose #16560 > > unix_epoch () 00:31:26 verbose #16561 > > |> specify_date_kind Utc 00:31:26 verbose #16562 > > |> add_days 1 00:31:26 verbose #16563 > > |> date_time_guid_from_date_time (test_guid ()) 00:31:26 verbose #16564 > > |> sm'.obj_to_string 00:31:26 verbose #16565 > > |> fun s => s |> _assert_eq 00:31:26 verbose #16566 > > $'$"19700102-0000-0000-0000-0{!s.[[25..29]]}{!suffix}"' 00:31:43 verbose #16567 > > 00:31:43 verbose #16568 > > ╭─[ 17.14s - return value ]────────────────────────────────────────────────────╮ 00:31:43 verbose #16569 > > │ __assert_eq / actual: "19700102-0000-0000-0000-000000543210" / expected: │ 00:31:43 verbose #16570 > > │ "19700102-0000-0000-0000-000000543210" │ 00:31:43 verbose #16571 > > │ │ 00:31:43 verbose #16572 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:31:43 verbose #16573 > > 00:31:43 verbose #16574 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:31:43 verbose #16575 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:31:43 verbose #16576 > > │ ### date_time_from_guid │ 00:31:43 verbose #16577 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:31:43 verbose #16578 > > 00:31:43 verbose #16579 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:31:43 verbose #16580 > > inl date_time_from_guid (date_time_guid : date_time_guid) = 00:31:43 verbose #16581 > > inl date_time_guid = date_time_guid |> sm'.obj_to_string 00:31:43 verbose #16582 > > inl sm_replace = sm'.replace "-" "" 00:31:43 verbose #16583 > > run_target_args (fun () => sm_replace) function 00:31:43 verbose #16584 > > | (Rust _ | TypeScript _) => fun sm_replace => 00:31:43 verbose #16585 > > $'System.DateTime.Parse (!date_time_guid.[[..24]] |> !sm_replace)' : 00:31:43 verbose #16586 > > date_time 00:31:43 verbose #16587 > > | _ => fun sm_replace => $'System.DateTime.ParseExact 00:31:43 verbose #16588 > > (!date_time_guid.[[..24]] |> !sm_replace, "yyyyMMddHHmmssfffffff", null)' : 00:31:43 verbose #16589 > > date_time 00:31:44 verbose #16590 > > 00:31:44 verbose #16591 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:31:44 verbose #16592 > > //// test 00:31:44 verbose #16593 > > 00:31:44 verbose #16594 > > date_time_from_guid (guid.new_guid "00010101-0000-0000-0000-0a9876543210") 00:31:44 verbose #16595 > > |> _assert_eq' (min_value ()) 00:31:44 verbose #16596 > > 00:31:44 verbose #16597 > > ╭─[ 480.07ms - stdout ]────────────────────────────────────────────────────────╮ 00:31:44 verbose #16598 > > │ __assert_eq' / actual: 0001-01-01 12:00:00 AM / expected: 0001-01-01 │ 00:31:44 verbose #16599 > > │ 12:00:00 AM │ 00:31:44 verbose #16600 > > │ │ 00:31:44 verbose #16601 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:31:44 verbose #16602 > > 00:31:44 verbose #16603 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:31:44 verbose #16604 > > //// test 00:31:44 verbose #16605 > > 00:31:44 verbose #16606 > > date_time_from_guid (guid.new_guid $'$"99991231-2359-5999-9999-9{(!test_guid () 00:31:44 verbose #16607 > > |> string).[[^10..]]}"') 00:31:44 verbose #16608 > > |> _assert_eq' (max_value ()) 00:31:45 verbose #16609 > > 00:31:45 verbose #16610 > > ╭─[ 461.37ms - stdout ]────────────────────────────────────────────────────────╮ 00:31:45 verbose #16611 > > │ __assert_eq' / actual: 9999-12-31 11:59:59 PM / expected: 9999-12-31 │ 00:31:45 verbose #16612 > > │ 11:59:59 PM │ 00:31:45 verbose #16613 > > │ │ 00:31:45 verbose #16614 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:31:45 verbose #16615 > > 00:31:45 verbose #16616 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:31:45 verbose #16617 > > //// test 00:31:45 verbose #16618 > > 00:31:45 verbose #16619 > > date_time_from_guid (guid.new_guid $'$"19700101-0000-0000-0000-0{(!test_guid () 00:31:45 verbose #16620 > > |> string).[[^10..]]}"') 00:31:45 verbose #16621 > > |> _assert_eq' $'System.DateTime.UnixEpoch' 00:31:45 verbose #16622 > > 00:31:45 verbose #16623 > > ╭─[ 533.63ms - stdout ]────────────────────────────────────────────────────────╮ 00:31:45 verbose #16624 > > │ __assert_eq' / actual: 1970-01-01 12:00:00 AM / expected: 1970-01-01 │ 00:31:45 verbose #16625 > > │ 12:00:00 AM │ 00:31:45 verbose #16626 > > │ │ 00:31:45 verbose #16627 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:31:45 verbose #16628 > > 00:31:45 verbose #16629 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:31:45 verbose #16630 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:31:45 verbose #16631 > > │ ### timestamp_guid_from_timestamp │ 00:31:45 verbose #16632 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:31:45 verbose #16633 > > 00:31:45 verbose #16634 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:31:45 verbose #16635 > > inl timestamp_guid_from_timestamp (guid : guid.guid) (timestamp : timestamp) : 00:31:45 verbose #16636 > > timestamp_guid = 00:31:45 verbose #16637 > > inl guid = guid |> sm'.obj_to_string 00:31:45 verbose #16638 > > inl timestamp = timestamp |> sm'.obj_to_string |> sm'.pad_left 18i32 '0' 00:31:45 verbose #16639 > > $'`timestamp_guid 00:31:45 verbose #16640 > > $"{!timestamp.[[0..7]]}-{!timestamp.[[8..11]]}-{!timestamp.[[12..15]]}-{!timesta 00:31:45 verbose #16641 > > mp.[[16..17]]}{!guid.[[21..]]}"' 00:31:46 verbose #16642 > > 00:31:46 verbose #16643 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:31:46 verbose #16644 > > //// test 00:31:46 verbose #16645 > > 00:31:46 verbose #16646 > > timestamp_guid_from_timestamp (test_guid ()) (timestamp 0i64) 00:31:46 verbose #16647 > > |> _assert_eq' (guid.new_guid "00000000-0000-0000-00dc-ba9876543210") 00:31:46 verbose #16648 > > 00:31:46 verbose #16649 > > ╭─[ 486.14ms - stdout ]────────────────────────────────────────────────────────╮ 00:31:46 verbose #16650 > > │ __assert_eq' / actual: 00000000-0000-0000-00dc-ba9876543210 / expected: │ 00:31:46 verbose #16651 > > │ 00000000-0000-0000-00dc-ba9876543210 │ 00:31:46 verbose #16652 > > │ │ 00:31:46 verbose #16653 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:31:46 verbose #16654 > > 00:31:46 verbose #16655 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:31:46 verbose #16656 > > //// test 00:31:46 verbose #16657 > > 00:31:46 verbose #16658 > > timestamp_guid_from_timestamp (test_guid ()) (timestamp 999999999999999999i64) 00:31:46 verbose #16659 > > |> _assert_eq' (guid.new_guid $'$"99999999-9999-9999-99dc-b{(!test_guid () |> 00:31:46 verbose #16660 > > string).[[^10..]]}"') 00:31:47 verbose #16661 > > 00:31:47 verbose #16662 > > ╭─[ 445.29ms - stdout ]────────────────────────────────────────────────────────╮ 00:31:47 verbose #16663 > > │ __assert_eq' / actual: 99999999-9999-9999-99dc-ba9876543210 / expected: │ 00:31:47 verbose #16664 > > │ 99999999-9999-9999-99dc-ba9876543210 │ 00:31:47 verbose #16665 > > │ │ 00:31:47 verbose #16666 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:31:47 verbose #16667 > > 00:31:47 verbose #16668 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:31:47 verbose #16669 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:31:47 verbose #16670 > > │ ### timestamp_from_guid │ 00:31:47 verbose #16671 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:31:47 verbose #16672 > > 00:31:47 verbose #16673 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:31:47 verbose #16674 > > inl timestamp_from_guid (guid : date_time_guid) : timestamp = 00:31:47 verbose #16675 > > inl guid = guid |> sm'.obj_to_string 00:31:47 verbose #16676 > > $'`i64 00:31:47 verbose #16677 > > $"{!guid.[[0..7]]}{!guid.[[9..12]]}{!guid.[[14..17]]}{!guid.[[19..20]]}"' 00:31:47 verbose #16678 > > 00:31:47 verbose #16679 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:31:47 verbose #16680 > > //// test 00:31:47 verbose #16681 > > 00:31:47 verbose #16682 > > timestamp_from_guid (guid.new_guid "00000000-0000-0000-00dc-ba9876543210") 00:31:47 verbose #16683 > > |> _assert_eq (timestamp 0) 00:31:47 verbose #16684 > > 00:31:47 verbose #16685 > > ╭─[ 424.93ms - stdout ]────────────────────────────────────────────────────────╮ 00:31:47 verbose #16686 > > │ __assert_eq / actual: 0L / expected: 0L │ 00:31:47 verbose #16687 > > │ │ 00:31:47 verbose #16688 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:31:47 verbose #16689 > > 00:31:47 verbose #16690 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:31:47 verbose #16691 > > //// test 00:31:47 verbose #16692 > > 00:31:47 verbose #16693 > > timestamp_from_guid (guid.new_guid $'$"99999999-9999-9999-99{(!test_guid () |> 00:31:47 verbose #16694 > > string).[[^14..]]}"') 00:31:47 verbose #16695 > > |> _assert_eq (timestamp 999999999999999999) 00:31:48 verbose #16696 > > 00:31:48 verbose #16697 > > ╭─[ 474.95ms - stdout ]────────────────────────────────────────────────────────╮ 00:31:48 verbose #16698 > > │ __assert_eq / actual: 999999999999999999L / expected: 999999999999999999L │ 00:31:48 verbose #16699 > > │ │ 00:31:48 verbose #16700 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:31:48 verbose #16701 > > 00:31:48 verbose #16702 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:31:48 verbose #16703 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:31:48 verbose #16704 > > │ ### new_guid_from_date_time │ 00:31:48 verbose #16705 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:31:48 verbose #16706 > > 00:31:48 verbose #16707 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:31:48 verbose #16708 > > inl new_guid_from_date_time (date_time : date_time) = 00:31:48 verbose #16709 > > inl guid = guid.new_raw_guid () 00:31:48 verbose #16710 > > date_time_guid_from_date_time guid date_time 00:31:48 verbose #16711 > > 00:31:48 verbose #16712 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:31:48 verbose #16713 > > //// test 00:31:48 verbose #16714 > > 00:31:48 verbose #16715 > > utc_now () 00:31:48 verbose #16716 > > |> new_guid_from_date_time 00:31:48 verbose #16717 > > |> date_time_from_guid 00:31:48 verbose #16718 > > |> fun date_time => new_time_span date_time (utc_now ()) |> total_seconds |> i32 00:31:48 verbose #16719 > > |> _assert_eq 0 00:31:49 verbose #16720 > > 00:31:49 verbose #16721 > > ╭─[ 586.59ms - stdout ]────────────────────────────────────────────────────────╮ 00:31:49 verbose #16722 > > │ __assert_eq / actual: 0 / expected: 0 │ 00:31:49 verbose #16723 > > │ │ 00:31:49 verbose #16724 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:31:49 verbose #16725 > > 00:31:49 verbose #16726 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:31:49 verbose #16727 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:31:49 verbose #16728 > > │ ### new_guid_from_timestamp │ 00:31:49 verbose #16729 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:31:49 verbose #16730 > > 00:31:49 verbose #16731 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:31:49 verbose #16732 > > inl new_guid_from_timestamp (timestamp : timestamp) = 00:31:49 verbose #16733 > > inl guid = guid.new_raw_guid () 00:31:49 verbose #16734 > > timestamp_guid_from_timestamp guid timestamp 00:31:49 verbose #16735 > > 00:31:49 verbose #16736 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:31:49 verbose #16737 > > //// test 00:31:49 verbose #16738 > > 00:31:49 verbose #16739 > > utc_now () 00:31:49 verbose #16740 > > |> ticks 00:31:49 verbose #16741 > > |> new_guid_from_timestamp 00:31:49 verbose #16742 > > |> timestamp_from_guid 00:31:49 verbose #16743 > > |> fun (timestamp timestamp) => (timestamp - (utc_now () |> ticks |> fun 00:31:49 verbose #16744 > > (timestamp x) => x)) / 100000i64 00:31:49 verbose #16745 > > |> _assert_eq 0i64 00:31:50 verbose #16746 > > 00:31:50 verbose #16747 > > ╭─[ 529.18ms - stdout ]────────────────────────────────────────────────────────╮ 00:31:50 verbose #16748 > > │ __assert_eq / actual: 0L / expected: 0L │ 00:31:50 verbose #16749 > > │ │ 00:31:50 verbose #16750 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:31:50 verbose #16751 > > 00:31:50 verbose #16752 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:31:50 verbose #16753 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:31:50 verbose #16754 > > │ ## main │ 00:31:50 verbose #16755 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:31:50 verbose #16756 > > 00:31:50 verbose #16757 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:31:50 verbose #16758 > > inl main () = 00:31:50 verbose #16759 > > $'let date_time_guid_from_date_time x = !date_time_guid_from_date_time x' : 00:31:50 verbose #16760 > > () 00:31:50 verbose #16761 > > $'let date_time_from_guid x = !date_time_from_guid x' : () 00:31:50 verbose #16762 > > $'let timestamp_guid_from_timestamp x = !timestamp_guid_from_timestamp x' : 00:31:50 verbose #16763 > > () 00:31:50 verbose #16764 > > $'let timestamp_from_guid x = !timestamp_from_guid x' : () 00:31:50 verbose #16765 > > $'let new_guid_from_date_time x = !new_guid_from_date_time x' : () 00:31:50 verbose #16766 > > $'let new_guid_from_timestamp x = !new_guid_from_timestamp x' : () 00:31:50 verbose #16767 > > $'let format x = !format x' : () 00:31:50 verbose #16768 > > $'let format_iso8601 x = !format_iso8601 x' : () 00:31:51 verbose #16769 > 00:01:46 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 46864 } 00:31:51 verbose #16770 > 00:01:46 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:31:51 verbose #16771 > "nbconvert", 00:31:51 verbose #16772 > "c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb", 00:31:51 verbose #16773 > "--to", 00:31:51 verbose #16774 > "html", 00:31:51 verbose #16775 > "--HTMLExporter.theme=dark", 00:31:51 verbose #16776 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:31:53 verbose #16777 > 00:01:48 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb to html 00:31:53 verbose #16778 > 00:01:48 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:31:53 verbose #16779 > 00:01:48 verbose #7 ! validate(nb) 00:31:55 verbose #16780 > 00:01:50 verbose #8 ! [NbConvertApp] Writing 411611 bytes to c:\home\git\polyglot\lib\spiral\date_time.dib.html 00:31:55 verbose #16781 > 00:01:50 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 649 } 00:31:55 verbose #16782 > 00:01:50 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 649 } 00:31:55 verbose #16783 > 00:01:50 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:31:55 verbose #16784 > "-c", 00:31:55 verbose #16785 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/date_time.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:31:55 verbose #16786 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/date_time.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:31:56 verbose #16787 > 00:01:51 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:31:56 verbose #16788 > 00:01:51 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:31:56 verbose #16789 > 00:01:51 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 47572 } 00:31:56 debug #16790 runtime.execute_with_options_async / { exit_code = 0; output_length = 52231 } 00:31:56 debug #18 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path date_time.dib --retries 3 00:31:56 debug #16791 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path math.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:31:56 verbose #16792 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "math.dib", "--retries", "3"])) } 00:31:56 verbose #16793 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:31:56 verbose #16794 > "repl", 00:31:56 verbose #16795 > "--exit-after-run", 00:31:56 verbose #16796 > "--run", 00:31:56 verbose #16797 > "c:/home/git/polyglot/lib/spiral/math.dib", 00:31:56 verbose #16798 > "--output-path", 00:31:56 verbose #16799 > "c:/home/git/polyglot/lib/spiral/math.dib.ipynb", 00:31:56 verbose #16800 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/math.dib" --output-path "c:/home/git/polyglot/lib/spiral/math.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:31:58 verbose #16801 > > 00:31:58 verbose #16802 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:31:58 verbose #16803 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:31:58 verbose #16804 > > │ # math │ 00:31:58 verbose #16805 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:01 verbose #16806 > > 00:32:01 verbose #16807 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:01 verbose #16808 > > //// test 00:32:01 verbose #16809 > > 00:32:01 verbose #16810 > > open testing 00:32:03 verbose #16811 > > 00:32:03 verbose #16812 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:03 verbose #16813 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:03 verbose #16814 > > │ ## math │ 00:32:03 verbose #16815 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:03 verbose #16816 > > 00:32:03 verbose #16817 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:03 verbose #16818 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:03 verbose #16819 > > │ ### e │ 00:32:03 verbose #16820 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:03 verbose #16821 > > 00:32:03 verbose #16822 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:03 verbose #16823 > > inl e () = 00:32:03 verbose #16824 > > exp 1f64 00:32:03 verbose #16825 > > 00:32:03 verbose #16826 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:03 verbose #16827 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:03 verbose #16828 > > │ ## square │ 00:32:03 verbose #16829 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:03 verbose #16830 > > 00:32:03 verbose #16831 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:03 verbose #16832 > > inl square x = 00:32:03 verbose #16833 > > x ** 2 00:32:04 verbose #16834 > > 00:32:04 verbose #16835 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:04 verbose #16836 > > //// test 00:32:04 verbose #16837 > > 00:32:04 verbose #16838 > > 5f64 00:32:04 verbose #16839 > > |> sqrt 00:32:04 verbose #16840 > > |> square 00:32:04 verbose #16841 > > |> _assert_approx_eq None 5 00:32:05 verbose #16842 > > 00:32:05 verbose #16843 > > ╭─[ 983.71ms - stdout ]────────────────────────────────────────────────────────╮ 00:32:05 verbose #16844 > > │ __assert_approx_eq / actual: 5.0 / expected: 5.0 │ 00:32:05 verbose #16845 > > │ │ 00:32:05 verbose #16846 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:05 verbose #16847 > > 00:32:05 verbose #16848 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:05 verbose #16849 > > //// test 00:32:05 verbose #16850 > > 00:32:05 verbose #16851 > > e () |> square 00:32:05 verbose #16852 > > |> _assert_approx_eq None 7.3890560989306495 00:32:05 verbose #16853 > > 00:32:05 verbose #16854 > > ╭─[ 443.62ms - stdout ]────────────────────────────────────────────────────────╮ 00:32:05 verbose #16855 > > │ __assert_approx_eq / actual: 7.389056099 / expected: 7.389056099 │ 00:32:05 verbose #16856 > > │ │ 00:32:05 verbose #16857 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:05 verbose #16858 > > 00:32:05 verbose #16859 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:05 verbose #16860 > > //// test 00:32:05 verbose #16861 > > 00:32:05 verbose #16862 > > 2 * 2 / 0.4f64 |> sqrt 00:32:05 verbose #16863 > > |> _assert_approx_eq None 3.1622776601683795 00:32:05 verbose #16864 > > 00:32:05 verbose #16865 > > ╭─[ 489.33ms - stdout ]────────────────────────────────────────────────────────╮ 00:32:05 verbose #16866 > > │ __assert_approx_eq / actual: 3.16227766 / expected: 3.16227766 │ 00:32:05 verbose #16867 > > │ │ 00:32:05 verbose #16868 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:05 verbose #16869 > > 00:32:05 verbose #16870 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:05 verbose #16871 > > //// test 00:32:05 verbose #16872 > > 00:32:05 verbose #16873 > > 2f64 / 3 00:32:05 verbose #16874 > > |> _assert_approx_eq None 0.6666666666666666 00:32:06 verbose #16875 > > 00:32:06 verbose #16876 > > ╭─[ 466.96ms - stdout ]────────────────────────────────────────────────────────╮ 00:32:06 verbose #16877 > > │ __assert_approx_eq / actual: 0.6666666667 / expected: 0.6666666667 │ 00:32:06 verbose #16878 > > │ │ 00:32:06 verbose #16879 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:06 verbose #16880 > > 00:32:06 verbose #16881 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:06 verbose #16882 > > //// test 00:32:06 verbose #16883 > > 00:32:06 verbose #16884 > > 2f64 |> log 00:32:06 verbose #16885 > > |> _assert_approx_eq None 0.6931471805599453 00:32:06 verbose #16886 > > 00:32:06 verbose #16887 > > ╭─[ 477.68ms - stdout ]────────────────────────────────────────────────────────╮ 00:32:06 verbose #16888 > > │ __assert_approx_eq / actual: 0.6931471806 / expected: 0.6931471806 │ 00:32:06 verbose #16889 > > │ │ 00:32:06 verbose #16890 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:06 verbose #16891 > > 00:32:06 verbose #16892 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:06 verbose #16893 > > //// test 00:32:06 verbose #16894 > > 00:32:06 verbose #16895 > > pi 00:32:06 verbose #16896 > > |> _assert_approx_eq None 3.141592653589793f64 00:32:07 verbose #16897 > > 00:32:07 verbose #16898 > > ╭─[ 416.17ms - stdout ]────────────────────────────────────────────────────────╮ 00:32:07 verbose #16899 > > │ __assert_approx_eq / actual: 3.141592654 / expected: 3.141592654 │ 00:32:07 verbose #16900 > > │ │ 00:32:07 verbose #16901 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:07 verbose #16902 > > 00:32:07 verbose #16903 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:07 verbose #16904 > > //// test 00:32:07 verbose #16905 > > 00:32:07 verbose #16906 > > pi |> cos 00:32:07 verbose #16907 > > |> _assert_eq -1f64 00:32:07 verbose #16908 > > 00:32:07 verbose #16909 > > ╭─[ 422.76ms - stdout ]────────────────────────────────────────────────────────╮ 00:32:07 verbose #16910 > > │ __assert_eq / actual: -1.0 / expected: -1.0 │ 00:32:07 verbose #16911 > > │ │ 00:32:07 verbose #16912 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:07 verbose #16913 > > 00:32:07 verbose #16914 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:07 verbose #16915 > > //// test 00:32:07 verbose #16916 > > 00:32:07 verbose #16917 > > pi 00:32:07 verbose #16918 > > |> cos 00:32:07 verbose #16919 > > |> fun n => n / 2f64 00:32:07 verbose #16920 > > |> _assert_approx_eq None -0.5 00:32:08 verbose #16921 > > 00:32:08 verbose #16922 > > ╭─[ 608.84ms - stdout ]────────────────────────────────────────────────────────╮ 00:32:08 verbose #16923 > > │ __assert_approx_eq / actual: -0.5 / expected: -0.5 │ 00:32:08 verbose #16924 > > │ │ 00:32:08 verbose #16925 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:08 verbose #16926 > > 00:32:08 verbose #16927 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:08 verbose #16928 > > //// test 00:32:08 verbose #16929 > > 00:32:08 verbose #16930 > > pi / 2 |> cos 00:32:08 verbose #16931 > > |> _assert_approx_eq None 0.00000000000000006123233995736766f64 00:32:08 verbose #16932 > > 00:32:08 verbose #16933 > > ╭─[ 416.63ms - stdout ]────────────────────────────────────────────────────────╮ 00:32:08 verbose #16934 > > │ __assert_approx_eq / actual: 6.123233996e-17 / expected: 6.123233996e-17 │ 00:32:08 verbose #16935 > > │ │ 00:32:08 verbose #16936 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:08 verbose #16937 > > 00:32:08 verbose #16938 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:08 verbose #16939 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:08 verbose #16940 > > │ ## fsharp │ 00:32:08 verbose #16941 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:08 verbose #16942 > > 00:32:08 verbose #16943 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:08 verbose #16944 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:08 verbose #16945 > > │ ### atan2 │ 00:32:08 verbose #16946 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:08 verbose #16947 > > 00:32:08 verbose #16948 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:08 verbose #16949 > > inl atan2 (y : f64) (x : f64) : f64 = 00:32:08 verbose #16950 > > $'System.Math.Atan2 (!y, !x)' 00:32:09 verbose #16951 > > 00:32:09 verbose #16952 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:09 verbose #16953 > > //// test 00:32:09 verbose #16954 > > 00:32:09 verbose #16955 > > 0 |> atan2 1 00:32:09 verbose #16956 > > |> _assert_eq 1.5707963267948966 00:32:09 verbose #16957 > > 00:32:09 verbose #16958 > > ╭─[ 521.92ms - stdout ]────────────────────────────────────────────────────────╮ 00:32:09 verbose #16959 > > │ __assert_eq / actual: 1.570796327 / expected: 1.570796327 │ 00:32:09 verbose #16960 > > │ │ 00:32:09 verbose #16961 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:09 verbose #16962 > > 00:32:09 verbose #16963 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:09 verbose #16964 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:09 verbose #16965 > > │ ## floor │ 00:32:09 verbose #16966 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:09 verbose #16967 > > 00:32:09 verbose #16968 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:09 verbose #16969 > > inl floor forall t {float}. (n : t) : t = 00:32:09 verbose #16970 > > n |> $'floor' 00:32:10 verbose #16971 > > 00:32:10 verbose #16972 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:10 verbose #16973 > > //// test 00:32:10 verbose #16974 > > 00:32:10 verbose #16975 > > 0.6 |> floor 00:32:10 verbose #16976 > > |> _assert_eq 0f64 00:32:10 verbose #16977 > > 00:32:10 verbose #16978 > > ╭─[ 414.24ms - stdout ]────────────────────────────────────────────────────────╮ 00:32:10 verbose #16979 > > │ __assert_eq / actual: 0.0 / expected: 0.0 │ 00:32:10 verbose #16980 > > │ │ 00:32:10 verbose #16981 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:10 verbose #16982 > > 00:32:10 verbose #16983 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:10 verbose #16984 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:10 verbose #16985 > > │ ## ceil │ 00:32:10 verbose #16986 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:10 verbose #16987 > > 00:32:10 verbose #16988 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:10 verbose #16989 > > inl ceil forall t {float}. (n : t) : t = 00:32:10 verbose #16990 > > n |> $'ceil' 00:32:10 verbose #16991 > > 00:32:10 verbose #16992 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:10 verbose #16993 > > //// test 00:32:10 verbose #16994 > > 00:32:10 verbose #16995 > > 0.6 |> ceil 00:32:10 verbose #16996 > > |> _assert_eq 1f64 00:32:11 verbose #16997 > > 00:32:11 verbose #16998 > > ╭─[ 437.68ms - stdout ]────────────────────────────────────────────────────────╮ 00:32:11 verbose #16999 > > │ __assert_eq / actual: 1.0 / expected: 1.0 │ 00:32:11 verbose #17000 > > │ │ 00:32:11 verbose #17001 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:11 verbose #17002 > > 00:32:11 verbose #17003 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:11 verbose #17004 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:11 verbose #17005 > > │ ## round │ 00:32:11 verbose #17006 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:11 verbose #17007 > > 00:32:11 verbose #17008 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:11 verbose #17009 > > inl round forall t {float}. (n : t) : t = 00:32:11 verbose #17010 > > n |> $'round' 00:32:11 verbose #17011 > > 00:32:11 verbose #17012 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:11 verbose #17013 > > //// test 00:32:11 verbose #17014 > > 00:32:11 verbose #17015 > > 0.5 |> round 00:32:11 verbose #17016 > > |> _assert_eq 0f64 00:32:11 verbose #17017 > > 00:32:11 verbose #17018 > > 1.5 |> round 00:32:11 verbose #17019 > > |> _assert_eq 2f64 00:32:11 verbose #17020 > > 00:32:11 verbose #17021 > > 2.5 |> round 00:32:11 verbose #17022 > > |> _assert_eq 2f64 00:32:11 verbose #17023 > > 00:32:11 verbose #17024 > > 3.5 |> round 00:32:11 verbose #17025 > > |> _assert_eq 4f64 00:32:12 verbose #17026 > > 00:32:12 verbose #17027 > > ╭─[ 440.89ms - stdout ]────────────────────────────────────────────────────────╮ 00:32:12 verbose #17028 > > │ __assert_eq / actual: 0.0 / expected: 0.0 │ 00:32:12 verbose #17029 > > │ __assert_eq / actual: 2.0 / expected: 2.0 │ 00:32:12 verbose #17030 > > │ __assert_eq / actual: 2.0 / expected: 2.0 │ 00:32:12 verbose #17031 > > │ __assert_eq / actual: 4.0 / expected: 4.0 │ 00:32:12 verbose #17032 > > │ │ 00:32:12 verbose #17033 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:12 verbose #17034 > > 00:32:12 verbose #17035 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:12 verbose #17036 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:12 verbose #17037 > > │ ## log_base │ 00:32:12 verbose #17038 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:12 verbose #17039 > > 00:32:12 verbose #17040 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:12 verbose #17041 > > inl log_base (new_base : f64) (a : f64) : f64 = 00:32:12 verbose #17042 > > $'System.Math.Log (!a, !new_base)' 00:32:12 verbose #17043 > > 00:32:12 verbose #17044 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:12 verbose #17045 > > //// test 00:32:12 verbose #17046 > > 00:32:12 verbose #17047 > > 100 |> log_base 10 00:32:12 verbose #17048 > > |> _assert_eq 2 00:32:13 verbose #17049 > > 00:32:13 verbose #17050 > > ╭─[ 414.91ms - stdout ]────────────────────────────────────────────────────────╮ 00:32:13 verbose #17051 > > │ __assert_eq / actual: 2.0 / expected: 2.0 │ 00:32:13 verbose #17052 > > │ │ 00:32:13 verbose #17053 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:13 verbose #17054 > > 00:32:13 verbose #17055 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:13 verbose #17056 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:13 verbose #17057 > > │ ## round │ 00:32:13 verbose #17058 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:13 verbose #17059 > > 00:32:13 verbose #17060 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:13 verbose #17061 > > inl round forall t {float}. (x : t) : t = 00:32:13 verbose #17062 > > x |> $'round' 00:32:13 verbose #17063 > > 00:32:13 verbose #17064 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:13 verbose #17065 > > //// test 00:32:13 verbose #17066 > > 00:32:13 verbose #17067 > > 0.5 |> round 00:32:13 verbose #17068 > > |> _assert_eq 0f64 00:32:13 verbose #17069 > > 00:32:13 verbose #17070 > > ╭─[ 430.92ms - stdout ]────────────────────────────────────────────────────────╮ 00:32:13 verbose #17071 > > │ __assert_eq / actual: 0.0 / expected: 0.0 │ 00:32:13 verbose #17072 > > │ │ 00:32:13 verbose #17073 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:13 verbose #17074 > > 00:32:13 verbose #17075 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:13 verbose #17076 > > //// test 00:32:13 verbose #17077 > > 00:32:13 verbose #17078 > > 0.6 |> round 00:32:13 verbose #17079 > > |> _assert_eq 1f64 00:32:14 verbose #17080 > > 00:32:14 verbose #17081 > > ╭─[ 421.38ms - stdout ]────────────────────────────────────────────────────────╮ 00:32:14 verbose #17082 > > │ __assert_eq / actual: 1.0 / expected: 1.0 │ 00:32:14 verbose #17083 > > │ │ 00:32:14 verbose #17084 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:14 verbose #17085 > 00:00:18 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 12563 } 00:32:14 verbose #17086 > 00:00:18 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:32:14 verbose #17087 > "nbconvert", 00:32:14 verbose #17088 > "c:/home/git/polyglot/lib/spiral/math.dib.ipynb", 00:32:14 verbose #17089 > "--to", 00:32:14 verbose #17090 > "html", 00:32:14 verbose #17091 > "--HTMLExporter.theme=dark", 00:32:14 verbose #17092 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/math.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:32:16 verbose #17093 > 00:00:20 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/math.dib.ipynb to html 00:32:16 verbose #17094 > 00:00:20 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:32:16 verbose #17095 > 00:00:20 verbose #7 ! validate(nb) 00:32:18 verbose #17096 > 00:00:21 verbose #8 ! [NbConvertApp] Writing 304842 bytes to c:\home\git\polyglot\lib\spiral\math.dib.html 00:32:18 verbose #17097 > 00:00:21 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 639 } 00:32:18 verbose #17098 > 00:00:21 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 639 } 00:32:18 verbose #17099 > 00:00:21 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:32:18 verbose #17100 > "-c", 00:32:18 verbose #17101 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/math.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:32:18 verbose #17102 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/math.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:32:18 verbose #17103 > 00:00:22 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:32:18 verbose #17104 > 00:00:22 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:32:18 verbose #17105 > 00:00:22 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 13261 } 00:32:18 debug #17106 runtime.execute_with_options_async / { exit_code = 0; output_length = 16489 } 00:32:18 debug #19 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path math.dib --retries 3 00:32:18 debug #17107 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path mapm.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:32:18 verbose #17108 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "mapm.dib", "--retries", "3"])) } 00:32:18 verbose #17109 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:32:18 verbose #17110 > "repl", 00:32:18 verbose #17111 > "--exit-after-run", 00:32:18 verbose #17112 > "--run", 00:32:18 verbose #17113 > "c:/home/git/polyglot/lib/spiral/mapm.dib", 00:32:18 verbose #17114 > "--output-path", 00:32:18 verbose #17115 > "c:/home/git/polyglot/lib/spiral/mapm.dib.ipynb", 00:32:18 verbose #17116 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/mapm.dib" --output-path "c:/home/git/polyglot/lib/spiral/mapm.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:32:20 verbose #17117 > > 00:32:20 verbose #17118 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:20 verbose #17119 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:20 verbose #17120 > > │ # mapm │ 00:32:20 verbose #17121 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:24 verbose #17122 > > 00:32:24 verbose #17123 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:24 verbose #17124 > > open rust.rust_operators 00:32:25 verbose #17125 > > 00:32:25 verbose #17126 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:25 verbose #17127 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:25 verbose #17128 > > │ ## rust │ 00:32:25 verbose #17129 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:25 verbose #17130 > > 00:32:25 verbose #17131 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:25 verbose #17132 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:25 verbose #17133 > > │ ### hash_map │ 00:32:25 verbose #17134 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:25 verbose #17135 > > 00:32:25 verbose #17136 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:25 verbose #17137 > > nominal hash_map k v = 00:32:25 verbose #17138 > > `( 00:32:25 verbose #17139 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:32:25 verbose #17140 > > Fable.Core.Emit(\"std::collections::HashMap<$0, $1>\")>]]\n#endif\ntype 00:32:25 verbose #17141 > > std_collections_HashMap<'K, 'V> = class end" 00:32:25 verbose #17142 > > $'' : $'std_collections_HashMap<`k, `v>' 00:32:25 verbose #17143 > > ) 00:32:25 verbose #17144 > > 00:32:25 verbose #17145 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:25 verbose #17146 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:25 verbose #17147 > > │ ### b_tree_map │ 00:32:25 verbose #17148 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:25 verbose #17149 > > 00:32:25 verbose #17150 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:25 verbose #17151 > > nominal b_tree_map k v = 00:32:25 verbose #17152 > > `( 00:32:25 verbose #17153 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:32:25 verbose #17154 > > Fable.Core.Emit(\"std::collections::BTreeMap<$0, $1>\")>]]\n#endif\ntype 00:32:25 verbose #17155 > > std_collections_BTreeMap<'K, 'V> = class end" 00:32:25 verbose #17156 > > $'' : $'std_collections_BTreeMap<`k, `v>' 00:32:25 verbose #17157 > > ) 00:32:26 verbose #17158 > > 00:32:26 verbose #17159 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:26 verbose #17160 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:26 verbose #17161 > > │ ### new_hash_map │ 00:32:26 verbose #17162 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:26 verbose #17163 > > 00:32:26 verbose #17164 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:26 verbose #17165 > > inl new_hash_map () : hash_map _ _ = 00:32:26 verbose #17166 > > !\($'"std::collections::HashMap::new()"') 00:32:26 verbose #17167 > > 00:32:26 verbose #17168 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:26 verbose #17169 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:26 verbose #17170 > > │ ### new_b_tree_map │ 00:32:26 verbose #17171 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:26 verbose #17172 > > 00:32:26 verbose #17173 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:26 verbose #17174 > > inl new_b_tree_map () : b_tree_map _ _ = 00:32:26 verbose #17175 > > !\($'"std::collections::BTreeMap::new()"') 00:32:27 verbose #17176 > > 00:32:27 verbose #17177 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:27 verbose #17178 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:27 verbose #17179 > > │ ### get │ 00:32:27 verbose #17180 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:27 verbose #17181 > > 00:32:27 verbose #17182 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:27 verbose #17183 > > inl get forall k v. (key : k) (map : hash_map k v) : optionm'.option' v = 00:32:27 verbose #17184 > > inl key = join key 00:32:27 verbose #17185 > > !\\(map, $'"std::collections::HashMap::get(&$0, &!key).map(|x| 00:32:27 verbose #17186 > > x).cloned()"') 00:32:27 verbose #17187 > > 00:32:27 verbose #17188 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:27 verbose #17189 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:27 verbose #17190 > > │ ### insert │ 00:32:27 verbose #17191 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:27 verbose #17192 > > 00:32:27 verbose #17193 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:27 verbose #17194 > > inl insert forall k v. (key : k) (value : v) (map : hash_map k v) : 00:32:27 verbose #17195 > > optionm'.option' v = 00:32:27 verbose #17196 > > inl key = join key 00:32:27 verbose #17197 > > !\($'"let mut !map = !map"') 00:32:27 verbose #17198 > > !\($'"std::collections::HashMap::insert(&mut !map, !key, !value)"') 00:32:27 verbose #17199 > > 00:32:27 verbose #17200 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:27 verbose #17201 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:27 verbose #17202 > > │ ### map' │ 00:32:27 verbose #17203 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:27 verbose #17204 > > 00:32:27 verbose #17205 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:27 verbose #17206 > > inl map' forall k v w. (fn : v -> w) (map : hash_map k v) : hash_map k w = 00:32:27 verbose #17207 > > !\\((map, fn), $'"$0.into_iter().map(|(k, v)| (k, $1(v))).collect()"') 00:32:28 verbose #17208 > > 00:32:28 verbose #17209 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:28 verbose #17210 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:28 verbose #17211 > > │ ### hash_map_count │ 00:32:28 verbose #17212 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:28 verbose #17213 > > 00:32:28 verbose #17214 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:28 verbose #17215 > > inl hash_map_count forall k v. (map : hash_map k v) : i32 = 00:32:28 verbose #17216 > > !\\(map, $'"$0.count()"') 00:32:28 verbose #17217 > > 00:32:28 verbose #17218 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:28 verbose #17219 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:28 verbose #17220 > > │ ### from_vec │ 00:32:28 verbose #17221 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:28 verbose #17222 > > 00:32:28 verbose #17223 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:28 verbose #17224 > > inl from_vec forall k v. (vec : am'.vec (k * v)) : hash_map k v = 00:32:28 verbose #17225 > > !\($'"std::collections::HashMap::from_iter(!vec)"') 00:32:29 verbose #17226 > > 00:32:29 verbose #17227 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:29 verbose #17228 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:29 verbose #17229 > > │ ### from_vec_pairs │ 00:32:29 verbose #17230 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:29 verbose #17231 > > 00:32:29 verbose #17232 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:29 verbose #17233 > > inl from_vec_pairs forall k v. (vec : am'.vec (pair k v)) : hash_map k v = 00:32:29 verbose #17234 > > !\($'"std::collections::HashMap::from_iter(!vec.iter().map(|x| 00:32:29 verbose #17235 > > x.as_ref()).map(|&(ref k, ref v)| (k.clone(), v.clone())))"') 00:32:29 verbose #17236 > > 00:32:29 verbose #17237 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:29 verbose #17238 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:29 verbose #17239 > > │ ### b_tree_map_from_vec_pairs │ 00:32:29 verbose #17240 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:29 verbose #17241 > > 00:32:29 verbose #17242 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:29 verbose #17243 > > inl b_tree_map_from_vec_pairs forall k v. (vec : am'.vec (pair k v)) : 00:32:29 verbose #17244 > > b_tree_map k v = 00:32:29 verbose #17245 > > !\($'"std::collections::BTreeMap::from_iter(!vec.iter().map(|x| 00:32:29 verbose #17246 > > x.as_ref()).map(|&(ref k, ref v)| (k.clone(), v.clone())))"') 00:32:30 verbose #17247 > > 00:32:30 verbose #17248 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:30 verbose #17249 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:30 verbose #17250 > > │ ### from_array │ 00:32:30 verbose #17251 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:30 verbose #17252 > > 00:32:30 verbose #17253 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:30 verbose #17254 > > inl from_array forall k v. (array : array_base (k * v)) : hash_map k v = 00:32:30 verbose #17255 > > array |> am'.to_vec |> from_vec 00:32:30 verbose #17256 > > 00:32:30 verbose #17257 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:30 verbose #17258 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:30 verbose #17259 > > │ ### from_list │ 00:32:30 verbose #17260 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:30 verbose #17261 > > 00:32:30 verbose #17262 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:30 verbose #17263 > > inl from_list forall k v. (list : list (k * v)) : hash_map k v = 00:32:30 verbose #17264 > > inl (a list) : _ i32 _ = list |> listm.toArray 00:32:30 verbose #17265 > > list |> am'.to_vec |> from_vec 00:32:30 verbose #17266 > > 00:32:30 verbose #17267 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:30 verbose #17268 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:30 verbose #17269 > > │ ### to_vec │ 00:32:30 verbose #17270 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:30 verbose #17271 > > 00:32:30 verbose #17272 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:30 verbose #17273 > > inl to_vec forall k v. (map : hash_map k v) : am'.vec (k * v) = 00:32:30 verbose #17274 > > !\\(map, $'"$0.into_iter().map(|(k, v)| (k, v)).collect::<Vec<_>>()"') 00:32:31 verbose #17275 > > 00:32:31 verbose #17276 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:31 verbose #17277 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:31 verbose #17278 > > │ ## fsharp │ 00:32:31 verbose #17279 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:31 verbose #17280 > > 00:32:31 verbose #17281 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:31 verbose #17282 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:31 verbose #17283 > > │ ### map │ 00:32:31 verbose #17284 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:31 verbose #17285 > > 00:32:31 verbose #17286 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:31 verbose #17287 > > nominal map k v = $'Map<`k, `v>' 00:32:31 verbose #17288 > > 00:32:31 verbose #17289 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:31 verbose #17290 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:31 verbose #17291 > > │ ### item │ 00:32:31 verbose #17292 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:31 verbose #17293 > > 00:32:31 verbose #17294 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:31 verbose #17295 > > inl item forall k v. (k : k) (map : map k v) : v = 00:32:31 verbose #17296 > > $'!map.[[!k]]' 00:32:32 verbose #17297 > > 00:32:32 verbose #17298 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:32 verbose #17299 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:32 verbose #17300 > > │ ### of_array │ 00:32:32 verbose #17301 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:32 verbose #17302 > > 00:32:32 verbose #17303 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:32 verbose #17304 > > inl of_array forall k v. (array : a _ (k * v)) : map k v = 00:32:32 verbose #17305 > > $'!array |> Array.map (fun (struct (a, b)) -> a, b) |> Map.ofArray' 00:32:32 verbose #17306 > 00:00:14 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 10516 } 00:32:32 verbose #17307 > 00:00:14 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:32:32 verbose #17308 > "nbconvert", 00:32:32 verbose #17309 > "c:/home/git/polyglot/lib/spiral/mapm.dib.ipynb", 00:32:32 verbose #17310 > "--to", 00:32:32 verbose #17311 > "html", 00:32:32 verbose #17312 > "--HTMLExporter.theme=dark", 00:32:32 verbose #17313 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/mapm.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:32:34 verbose #17314 > 00:00:16 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/mapm.dib.ipynb to html 00:32:34 verbose #17315 > 00:00:16 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:32:34 verbose #17316 > 00:00:16 verbose #7 ! validate(nb) 00:32:36 verbose #17317 > 00:00:17 verbose #8 ! [NbConvertApp] Writing 301082 bytes to c:\home\git\polyglot\lib\spiral\mapm.dib.html 00:32:36 verbose #17318 > 00:00:17 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 639 } 00:32:36 verbose #17319 > 00:00:17 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 639 } 00:32:36 verbose #17320 > 00:00:17 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:32:36 verbose #17321 > "-c", 00:32:36 verbose #17322 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/mapm.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:32:36 verbose #17323 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/mapm.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:32:36 verbose #17324 > 00:00:18 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:32:36 verbose #17325 > 00:00:18 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:32:36 verbose #17326 > 00:00:18 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 11214 } 00:32:36 debug #17327 runtime.execute_with_options_async / { exit_code = 0; output_length = 14252 } 00:32:36 debug #20 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path mapm.dib --retries 3 00:32:36 debug #17328 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path optionm'.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:32:36 verbose #17329 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "optionm'.dib", "--retries", "3"])) } 00:32:36 verbose #17330 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:32:36 verbose #17331 > "repl", 00:32:36 verbose #17332 > "--exit-after-run", 00:32:36 verbose #17333 > "--run", 00:32:36 verbose #17334 > "c:/home/git/polyglot/lib/spiral/optionm'.dib", 00:32:36 verbose #17335 > "--output-path", 00:32:36 verbose #17336 > "c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb", 00:32:36 verbose #17337 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/optionm'.dib" --output-path "c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:32:38 verbose #17338 > > 00:32:38 verbose #17339 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:38 verbose #17340 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:38 verbose #17341 > > │ # optionm' │ 00:32:38 verbose #17342 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:42 verbose #17343 > > 00:32:42 verbose #17344 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:42 verbose #17345 > > open rust 00:32:42 verbose #17346 > > open rust_operators 00:32:43 verbose #17347 > > 00:32:43 verbose #17348 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:43 verbose #17349 > > //// test 00:32:43 verbose #17350 > > 00:32:43 verbose #17351 > > open testing 00:32:44 verbose #17352 > > 00:32:44 verbose #17353 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:44 verbose #17354 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:44 verbose #17355 > > │ ## optionm' │ 00:32:44 verbose #17356 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:44 verbose #17357 > > 00:32:44 verbose #17358 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:44 verbose #17359 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:44 verbose #17360 > > │ ### default_value │ 00:32:44 verbose #17361 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:44 verbose #17362 > > 00:32:44 verbose #17363 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:44 verbose #17364 > > inl default_value d = 00:32:44 verbose #17365 > > optionm.defaultWith d 00:32:44 verbose #17366 > > 00:32:44 verbose #17367 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:44 verbose #17368 > > //// test 00:32:44 verbose #17369 > > 00:32:44 verbose #17370 > > None 00:32:44 verbose #17371 > > |> default_value 3i32 00:32:44 verbose #17372 > > |> _assert_eq 3i32 00:32:45 verbose #17373 > > 00:32:45 verbose #17374 > > ╭─[ 974.38ms - stdout ]────────────────────────────────────────────────────────╮ 00:32:45 verbose #17375 > > │ __assert_eq / actual: 3 / expected: 3 │ 00:32:45 verbose #17376 > > │ │ 00:32:45 verbose #17377 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:45 verbose #17378 > > 00:32:45 verbose #17379 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:45 verbose #17380 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:45 verbose #17381 > > │ ### (/??) │ 00:32:45 verbose #17382 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:45 verbose #17383 > > 00:32:45 verbose #17384 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:45 verbose #17385 > > inl (/??) a b = 00:32:45 verbose #17386 > > a |> default_value b 00:32:46 verbose #17387 > > 00:32:46 verbose #17388 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:46 verbose #17389 > > //// test 00:32:46 verbose #17390 > > 00:32:46 verbose #17391 > > None /?? 3i32 00:32:46 verbose #17392 > > |> _assert_eq 3i32 00:32:46 verbose #17393 > > 00:32:46 verbose #17394 > > ╭─[ 430.28ms - stdout ]────────────────────────────────────────────────────────╮ 00:32:46 verbose #17395 > > │ __assert_eq / actual: 3 / expected: 3 │ 00:32:46 verbose #17396 > > │ │ 00:32:46 verbose #17397 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:46 verbose #17398 > > 00:32:46 verbose #17399 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:46 verbose #17400 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:46 verbose #17401 > > │ ### default_with │ 00:32:46 verbose #17402 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:46 verbose #17403 > > 00:32:46 verbose #17404 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:46 verbose #17405 > > inl default_with fn = function 00:32:46 verbose #17406 > > | Some x => x 00:32:46 verbose #17407 > > | None => fn () 00:32:47 verbose #17408 > > 00:32:47 verbose #17409 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:47 verbose #17410 > > //// test 00:32:47 verbose #17411 > > 00:32:47 verbose #17412 > > None 00:32:47 verbose #17413 > > |> default_with fun () => 3i32 00:32:47 verbose #17414 > > |> _assert_eq 3i32 00:32:47 verbose #17415 > > 00:32:47 verbose #17416 > > ╭─[ 409.49ms - stdout ]────────────────────────────────────────────────────────╮ 00:32:47 verbose #17417 > > │ __assert_eq / actual: 3 / expected: 3 │ 00:32:47 verbose #17418 > > │ │ 00:32:47 verbose #17419 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:47 verbose #17420 > > 00:32:47 verbose #17421 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:47 verbose #17422 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:47 verbose #17423 > > │ ### choose │ 00:32:47 verbose #17424 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:47 verbose #17425 > > 00:32:47 verbose #17426 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:47 verbose #17427 > > inl choose fn a b = 00:32:47 verbose #17428 > > match a, b with 00:32:47 verbose #17429 > > | Some x, Some y => fn x y |> Some 00:32:47 verbose #17430 > > | _ => None 00:32:47 verbose #17431 > > 00:32:47 verbose #17432 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:47 verbose #17433 > > //// test 00:32:47 verbose #17434 > > 00:32:47 verbose #17435 > > (Some 2i32, Some 3) 00:32:47 verbose #17436 > > ||> choose (+) 00:32:47 verbose #17437 > > |> _assert_eq (Some 5) 00:32:48 verbose #17438 > > 00:32:48 verbose #17439 > > ╭─[ 903.93ms - stdout ]────────────────────────────────────────────────────────╮ 00:32:48 verbose #17440 > > │ __assert_eq / actual: US0_0 5 / expected: US0_0 5 │ 00:32:48 verbose #17441 > > │ │ 00:32:48 verbose #17442 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:48 verbose #17443 > > 00:32:48 verbose #17444 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:48 verbose #17445 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:48 verbose #17446 > > │ ### iter │ 00:32:48 verbose #17447 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:48 verbose #17448 > > 00:32:48 verbose #17449 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:48 verbose #17450 > > inl iter fn = function 00:32:48 verbose #17451 > > | Some x => fn x 00:32:48 verbose #17452 > > | None => () 00:32:49 verbose #17453 > > 00:32:49 verbose #17454 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:49 verbose #17455 > > //// test 00:32:49 verbose #17456 > > 00:32:49 verbose #17457 > > inl n = mut 1i32 00:32:49 verbose #17458 > > inl fn = 00:32:49 verbose #17459 > > fun n' => 00:32:49 verbose #17460 > > n <- *n + n' 00:32:49 verbose #17461 > > Some 1i32 |> iter fn 00:32:49 verbose #17462 > > None |> iter fn 00:32:49 verbose #17463 > > *n 00:32:49 verbose #17464 > > |> _assert_eq 2i32 00:32:49 verbose #17465 > > 00:32:49 verbose #17466 > > ╭─[ 629.07ms - stdout ]────────────────────────────────────────────────────────╮ 00:32:49 verbose #17467 > > │ __assert_eq / actual: 2 / expected: 2 │ 00:32:49 verbose #17468 > > │ │ 00:32:49 verbose #17469 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:49 verbose #17470 > > 00:32:49 verbose #17471 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:49 verbose #17472 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:49 verbose #17473 > > │ ### flatten │ 00:32:49 verbose #17474 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:49 verbose #17475 > > 00:32:49 verbose #17476 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:49 verbose #17477 > > inl flatten x = 00:32:49 verbose #17478 > > match x with 00:32:49 verbose #17479 > > | Some (Some x) => Some x 00:32:49 verbose #17480 > > | _ => None 00:32:50 verbose #17481 > > 00:32:50 verbose #17482 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:50 verbose #17483 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:50 verbose #17484 > > │ ## fsharp │ 00:32:50 verbose #17485 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:50 verbose #17486 > > 00:32:50 verbose #17487 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:50 verbose #17488 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:50 verbose #17489 > > │ ### option' │ 00:32:50 verbose #17490 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:50 verbose #17491 > > 00:32:50 verbose #17492 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:50 verbose #17493 > > nominal option' t = $"backend_switch `({ Fsharp : $"`t option"; Python : t })" 00:32:50 verbose #17494 > > 00:32:50 verbose #17495 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:50 verbose #17496 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:50 verbose #17497 > > │ ### none' │ 00:32:50 verbose #17498 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:50 verbose #17499 > > 00:32:50 verbose #17500 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:50 verbose #17501 > > inl none' forall t. () : option' t = 00:32:50 verbose #17502 > > $'None' 00:32:51 verbose #17503 > > 00:32:51 verbose #17504 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:51 verbose #17505 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:51 verbose #17506 > > │ ### some' │ 00:32:51 verbose #17507 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:51 verbose #17508 > > 00:32:51 verbose #17509 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:51 verbose #17510 > > inl some' forall t. (x : t) : option' t = 00:32:51 verbose #17511 > > backend_switch { 00:32:51 verbose #17512 > > Fsharp = fun () => $'Some !x ' : option' t 00:32:51 verbose #17513 > > Python = fun () => $'!x # some\' ' : option' t 00:32:51 verbose #17514 > > } 00:32:51 verbose #17515 > > 00:32:51 verbose #17516 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:51 verbose #17517 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:51 verbose #17518 > > │ ### default_value' │ 00:32:51 verbose #17519 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:51 verbose #17520 > > 00:32:51 verbose #17521 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:51 verbose #17522 > > inl default_value' forall t. (value : t) (x : option' t) : t = 00:32:51 verbose #17523 > > backend_switch { 00:32:51 verbose #17524 > > Fsharp = fun () => $'!x |> Option.defaultValue !value ' : t 00:32:51 verbose #17525 > > Python = fun () => $'!x or !value ' : t 00:32:51 verbose #17526 > > } 00:32:51 verbose #17527 > > 00:32:51 verbose #17528 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:51 verbose #17529 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:51 verbose #17530 > > │ ### value' │ 00:32:51 verbose #17531 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:51 verbose #17532 > > 00:32:51 verbose #17533 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:51 verbose #17534 > > inl value' forall t. (x : option' t) : t = 00:32:51 verbose #17535 > > backend_switch { 00:32:51 verbose #17536 > > Fsharp = fun () => $'!x |> Option.value' : t 00:32:51 verbose #17537 > > Python = fun () => $'!x ' : t 00:32:51 verbose #17538 > > } 00:32:52 verbose #17539 > > 00:32:52 verbose #17540 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:52 verbose #17541 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:52 verbose #17542 > > │ ### box │ 00:32:52 verbose #17543 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:52 verbose #17544 > > 00:32:52 verbose #17545 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:52 verbose #17546 > > inl box forall t. (x : option t) : option' t = 00:32:52 verbose #17547 > > // x 00:32:52 verbose #17548 > > // |> optionm.map some' 00:32:52 verbose #17549 > > // |> default_with none' 00:32:52 verbose #17550 > > match x with 00:32:52 verbose #17551 > > | Some x => some' x 00:32:52 verbose #17552 > > | None => none' () 00:32:52 verbose #17553 > > 00:32:52 verbose #17554 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:52 verbose #17555 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:52 verbose #17556 > > │ ### map │ 00:32:52 verbose #17557 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:52 verbose #17558 > > 00:32:52 verbose #17559 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:52 verbose #17560 > > inl map forall t u. (fn : t -> u) (x : option' t) : option' u = 00:32:52 verbose #17561 > > inl x_ () = 00:32:52 verbose #17562 > > backend_switch { 00:32:52 verbose #17563 > > Fsharp = fun () => 00:32:52 verbose #17564 > > inl result : mut (option' u) = none' () |> mut 00:32:52 verbose #17565 > > inl set_result x = 00:32:52 verbose #17566 > > result <- x 00:32:52 verbose #17567 > > inl get_result () = 00:32:52 verbose #17568 > > *result 00:32:52 verbose #17569 > > $'let _!result = !result ' 00:32:52 verbose #17570 > > $'match !x with' 00:32:52 verbose #17571 > > $'| Some x -> (' 00:32:52 verbose #17572 > > $'(fun () ->' 00:32:52 verbose #17573 > > $'(fun () ->' 00:32:52 verbose #17574 > > inl x = dyn $'x' 00:32:52 verbose #17575 > > x |> fn |> emit_unit 00:32:52 verbose #17576 > > $')' 00:32:52 verbose #17577 > > $'|> fun x -> x () |> Some' 00:32:52 verbose #17578 > > $') () ) | None -> None' 00:32:52 verbose #17579 > > $'|> fun x -> !set_result x' 00:32:52 verbose #17580 > > $'!get_result ()' : option' u 00:32:52 verbose #17581 > > Python = fun () => 00:32:52 verbose #17582 > > if x =. none' () 00:32:52 verbose #17583 > > then none' () 00:32:52 verbose #17584 > > else fn $'!x ' |> fun x => $'!x ' : option' u 00:32:52 verbose #17585 > > } 00:32:52 verbose #17586 > > 00:32:52 verbose #17587 > > backend_switch { 00:32:52 verbose #17588 > > Fsharp = fun () => 00:32:52 verbose #17589 > > inl fn = join fn 00:32:52 verbose #17590 > > $'!x |> Option.map !fn ' : option' u 00:32:52 verbose #17591 > > Python = fun () => 00:32:52 verbose #17592 > > if x =. none' () 00:32:52 verbose #17593 > > then none' () 00:32:52 verbose #17594 > > else fn $'!x ' |> fun x => $'!x ' : option' u 00:32:52 verbose #17595 > > } 00:32:53 verbose #17596 > > 00:32:53 verbose #17597 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:53 verbose #17598 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:53 verbose #17599 > > │ ### map'' │ 00:32:53 verbose #17600 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:53 verbose #17601 > > 00:32:53 verbose #17602 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:53 verbose #17603 > > inl map'' forall t u. (fn : t -> u) (x : option' t) : option' u = 00:32:53 verbose #17604 > > x |> map fn 00:32:53 verbose #17605 > > 00:32:53 verbose #17606 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:32:53 verbose #17607 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:32:53 verbose #17608 > > │ ### unbox │ 00:32:53 verbose #17609 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:32:53 verbose #17610 > > 00:32:53 verbose #17611 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:53 verbose #17612 > > inl unbox forall t. (x : option' t) : option t = 00:32:53 verbose #17613 > > x |> map'' Some |> default_value' None 00:32:53 verbose #17614 > > // inl some x : option t = Some x 00:32:53 verbose #17615 > > // inl some = join some 00:32:53 verbose #17616 > > // inl none : option t = None 00:32:53 verbose #17617 > > // $'!x |> Option.map !some |> Option.defaultValue !none ' 00:32:54 verbose #17618 > > 00:32:54 verbose #17619 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:32:54 verbose #17620 > > //// test 00:32:54 verbose #17621 > > ///! fsharp 00:32:54 verbose #17622 > > ///! cuda 00:32:54 verbose #17623 > > ///! rust 00:32:54 verbose #17624 > > ///! typescript 00:32:54 verbose #17625 > > ///! python 00:32:54 verbose #17626 > > 00:32:54 verbose #17627 > > inl x = Some 3i32 00:32:54 verbose #17628 > > inl y : option i32 = None 00:32:54 verbose #17629 > > inl x' = x |> box |> unbox 00:32:54 verbose #17630 > > inl y' = y |> box |> map id |> unbox 00:32:54 verbose #17631 > > (x', y') |> _assert_eq' (x, y) 00:33:12 verbose #17632 > > 00:33:12 verbose #17633 > > ╭─[ 18.23s - return value ]────────────────────────────────────────────────────╮ 00:33:12 verbose #17634 > > │ .py output (Cuda): │ 00:33:12 verbose #17635 > > │ __assert_eq' / actual: (US0_0(v0=3), US0_1()) / expected: (US0_0(v0=3), │ 00:33:12 verbose #17636 > > │ US0_1()) │ 00:33:12 verbose #17637 > > │ │ 00:33:12 verbose #17638 > > │ .rs output: │ 00:33:12 verbose #17639 > > │ __assert_eq' / actual: (US0_0(3), US0_1) / expected: (US0_0(3), US0_1) │ 00:33:12 verbose #17640 > > │ │ 00:33:12 verbose #17641 > > │ .ts output: │ 00:33:12 verbose #17642 > > │ __assert_eq' / actual: US0_0 3,US0_1 / expected: US0_0 3,US0_1 │ 00:33:12 verbose #17643 > > │ │ 00:33:12 verbose #17644 > > │ .py output: │ 00:33:12 verbose #17645 > > │ __assert_eq' / actual: (US0_0 3, US0_1) / expected: (US0_0 3, US0_1) │ 00:33:12 verbose #17646 > > │ │ 00:33:12 verbose #17647 > > │ │ 00:33:12 verbose #17648 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:12 verbose #17649 > > 00:33:12 verbose #17650 > > ╭─[ 18.23s - stdout ]──────────────────────────────────────────────────────────╮ 00:33:12 verbose #17651 > > │ .fsx output: │ 00:33:12 verbose #17652 > > │ __assert_eq' / actual: struct (US0_0 3, US0_1) / expected: struct (US0_0 3, │ 00:33:12 verbose #17653 > > │ US0_1) │ 00:33:12 verbose #17654 > > │ │ 00:33:12 verbose #17655 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:12 verbose #17656 > > 00:33:12 verbose #17657 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:33:12 verbose #17658 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:33:12 verbose #17659 > > │ ### of_obj │ 00:33:12 verbose #17660 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:12 verbose #17661 > > 00:33:12 verbose #17662 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:33:12 verbose #17663 > > inl of_obj forall t. (x : t) : option' t = 00:33:12 verbose #17664 > > backend_switch { 00:33:12 verbose #17665 > > Fsharp = fun () => 00:33:12 verbose #17666 > > $'let mutable _!x = None' 00:33:12 verbose #17667 > > $'#if \!FABLE_COMPILER && \!WASM && \!CONTRACT' 00:33:12 verbose #17668 > > ((x |> $'Option.ofObj') : option' t) |> emit_unit 00:33:12 verbose #17669 > > $'#else' 00:33:12 verbose #17670 > > $'Some !x ' 00:33:12 verbose #17671 > > $'#endif' 00:33:12 verbose #17672 > > $'|> fun x -> _!x <- Some x' 00:33:12 verbose #17673 > > $'match _!x with Some x -> x | None -> failwith "optionm\'.of_obj 00:33:12 verbose #17674 > > _!x=None"' : option' t 00:33:12 verbose #17675 > > Python = fun () => 00:33:12 verbose #17676 > > $'!x ' : option' t 00:33:12 verbose #17677 > > } 00:33:12 verbose #17678 > > 00:33:12 verbose #17679 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:33:12 verbose #17680 > > //// test 00:33:12 verbose #17681 > > ///! fsharp 00:33:12 verbose #17682 > > ///! cuda 00:33:12 verbose #17683 > > ////! rust // attempted to zero-initialize type `alloc::sync::Arc<dyn 00:33:12 verbose #17684 > > core::any::Any>`, which is invalid 00:33:12 verbose #17685 > > ///! typescript 00:33:12 verbose #17686 > > ///! python 00:33:12 verbose #17687 > > 00:33:12 verbose #17688 > > null () 00:33:12 verbose #17689 > > |> of_obj 00:33:12 verbose #17690 > > |> unbox 00:33:12 verbose #17691 > > |> _assert_eq (None : option string) 00:33:15 verbose #17692 > > 00:33:15 verbose #17693 > > ╭─[ 2.79s - return value ]─────────────────────────────────────────────────────╮ 00:33:15 verbose #17694 > > │ .py output (Cuda): │ 00:33:15 verbose #17695 > > │ __assert_eq / actual: US0_1() / expected: US0_1() │ 00:33:15 verbose #17696 > > │ │ 00:33:15 verbose #17697 > > │ .ts output: │ 00:33:15 verbose #17698 > > │ __assert_eq / actual: US0_1 / expected: US0_1 │ 00:33:15 verbose #17699 > > │ │ 00:33:15 verbose #17700 > > │ .py output: │ 00:33:15 verbose #17701 > > │ __assert_eq / actual: US0_1 / expected: US0_1 │ 00:33:15 verbose #17702 > > │ │ 00:33:15 verbose #17703 > > │ │ 00:33:15 verbose #17704 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:15 verbose #17705 > > 00:33:15 verbose #17706 > > ╭─[ 2.79s - stdout ]───────────────────────────────────────────────────────────╮ 00:33:15 verbose #17707 > > │ .fsx output: │ 00:33:15 verbose #17708 > > │ __assert_eq / actual: US0_1 / expected: US0_1 │ 00:33:15 verbose #17709 > > │ │ 00:33:15 verbose #17710 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:15 verbose #17711 > > 00:33:15 verbose #17712 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:33:15 verbose #17713 > > //// test 00:33:15 verbose #17714 > > ///! fsharp 00:33:15 verbose #17715 > > ///! cuda 00:33:15 verbose #17716 > > ///! rust 00:33:15 verbose #17717 > > ///! typescript 00:33:15 verbose #17718 > > ///! python 00:33:15 verbose #17719 > > 00:33:15 verbose #17720 > > "" 00:33:15 verbose #17721 > > |> of_obj 00:33:15 verbose #17722 > > |> unbox 00:33:15 verbose #17723 > > |> _assert_eq' (Some "") 00:33:33 verbose #17724 > > 00:33:33 verbose #17725 > > ╭─[ 17.42s - return value ]────────────────────────────────────────────────────╮ 00:33:33 verbose #17726 > > │ .py output (Cuda): │ 00:33:33 verbose #17727 > > │ __assert_eq' / actual: US0_0(v0='') / expected: US0_0(v0='') │ 00:33:33 verbose #17728 > > │ │ 00:33:33 verbose #17729 > > │ .rs output: │ 00:33:33 verbose #17730 > > │ __assert_eq' / actual: US0_0("") / expected: US0_0("") │ 00:33:33 verbose #17731 > > │ │ 00:33:33 verbose #17732 > > │ .ts output: │ 00:33:33 verbose #17733 > > │ __assert_eq' / actual: US0_0 / expected: US0_0 │ 00:33:33 verbose #17734 > > │ │ 00:33:33 verbose #17735 > > │ .py output: │ 00:33:33 verbose #17736 > > │ __assert_eq' / actual: US0_0 "" / expected: US0_0 "" │ 00:33:33 verbose #17737 > > │ │ 00:33:33 verbose #17738 > > │ │ 00:33:33 verbose #17739 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:33 verbose #17740 > > 00:33:33 verbose #17741 > > ╭─[ 17.42s - stdout ]──────────────────────────────────────────────────────────╮ 00:33:33 verbose #17742 > > │ .fsx output: │ 00:33:33 verbose #17743 > > │ __assert_eq' / actual: US0_0 "" / expected: US0_0 "" │ 00:33:33 verbose #17744 > > │ │ 00:33:33 verbose #17745 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:33 verbose #17746 > > 00:33:33 verbose #17747 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:33:33 verbose #17748 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:33:33 verbose #17749 > > │ ### flatten' │ 00:33:33 verbose #17750 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:33 verbose #17751 > > 00:33:33 verbose #17752 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:33:33 verbose #17753 > > inl flatten' x = 00:33:33 verbose #17754 > > x 00:33:33 verbose #17755 > > |> unbox 00:33:33 verbose #17756 > > |> optionm.map unbox 00:33:33 verbose #17757 > > |> flatten 00:33:33 verbose #17758 > > 00:33:33 verbose #17759 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:33:33 verbose #17760 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:33:33 verbose #17761 > > │ ## rust │ 00:33:33 verbose #17762 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:33 verbose #17763 > > 00:33:33 verbose #17764 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:33:33 verbose #17765 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:33:33 verbose #17766 > > │ ### try' │ 00:33:33 verbose #17767 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:33 verbose #17768 > > 00:33:33 verbose #17769 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:33:33 verbose #17770 > > inl try' forall t. (x : option' t) : t = 00:33:33 verbose #17771 > > !\\(x, $'"$0?"') 00:33:34 verbose #17772 > > 00:33:34 verbose #17773 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:33:34 verbose #17774 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:33:34 verbose #17775 > > │ ### map' │ 00:33:34 verbose #17776 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:34 verbose #17777 > > 00:33:34 verbose #17778 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:33:34 verbose #17779 > > inl map' forall t u. (fn : t -> u) (x : option' t) : option' u = 00:33:34 verbose #17780 > > (!\\(x, $'"true; let _optionm_map_ = $0.map(|x| { //"') : bool) |> ignore 00:33:34 verbose #17781 > > inl result = fn !\($'"x"') 00:33:34 verbose #17782 > > (!\\(result, $'"true; $0 })"') : bool) |> ignore 00:33:34 verbose #17783 > > !\($'"_optionm_map_"') 00:33:34 verbose #17784 > > 00:33:34 verbose #17785 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:33:34 verbose #17786 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:33:34 verbose #17787 > > │ ### unwrap │ 00:33:34 verbose #17788 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:34 verbose #17789 > > 00:33:34 verbose #17790 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:33:34 verbose #17791 > > inl unwrap forall t. (x : option' t) : t = 00:33:34 verbose #17792 > > !\\(x, $'"$0.unwrap()"') 00:33:34 verbose #17793 > > 00:33:34 verbose #17794 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:33:34 verbose #17795 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:33:34 verbose #17796 > > │ ### take │ 00:33:34 verbose #17797 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:34 verbose #17798 > > 00:33:34 verbose #17799 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:33:34 verbose #17800 > > inl take forall t. (x : option' t) : option' t = 00:33:34 verbose #17801 > > (!\\(x, $'"true; let mut !x = !x"') : bool) |> ignore 00:33:34 verbose #17802 > > !\\(x, $'"Option::take(&mut $0)"') 00:33:35 verbose #17803 > > 00:33:35 verbose #17804 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:33:35 verbose #17805 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:33:35 verbose #17806 > > │ ### take_ref │ 00:33:35 verbose #17807 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:35 verbose #17808 > > 00:33:35 verbose #17809 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:33:35 verbose #17810 > > inl take_ref forall t. (x : rust.ref (option' t)) : option' t = 00:33:35 verbose #17811 > > (!\\(x, $'"true; let mut !x = !x"') : bool) |> ignore 00:33:35 verbose #17812 > > !\\(x, $'"Option::take(&mut $0)"') 00:33:35 verbose #17813 > > 00:33:35 verbose #17814 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:33:35 verbose #17815 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:33:35 verbose #17816 > > │ ### take_ref_mut │ 00:33:35 verbose #17817 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:35 verbose #17818 > > 00:33:35 verbose #17819 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:33:35 verbose #17820 > > inl take_ref_mut forall t. (x : rust.ref (rust.mut' (option' t))) : option' t = 00:33:35 verbose #17821 > > !\\(x, $'"Option::take($0)"') 00:33:36 verbose #17822 > > 00:33:36 verbose #17823 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:33:36 verbose #17824 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:33:36 verbose #17825 > > │ ### cloned │ 00:33:36 verbose #17826 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:36 verbose #17827 > > 00:33:36 verbose #17828 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:33:36 verbose #17829 > > inl cloned forall t. (x : option' (rust.ref t)) : option' t = 00:33:36 verbose #17830 > > !\\(x, $'"$0.cloned()"') 00:33:36 verbose #17831 > > 00:33:36 verbose #17832 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:33:36 verbose #17833 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:33:36 verbose #17834 > > │ ### as_ref │ 00:33:36 verbose #17835 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:36 verbose #17836 > > 00:33:36 verbose #17837 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:33:36 verbose #17838 > > inl as_ref forall t. (x : rust.ref (option' t)) : option' (rust.ref t) = 00:33:36 verbose #17839 > > !\\(x, $'"$0.as_ref()"') 00:33:37 verbose #17840 > > 00:33:37 verbose #17841 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:33:37 verbose #17842 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:33:37 verbose #17843 > > │ ### as_mut │ 00:33:37 verbose #17844 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:37 verbose #17845 > > 00:33:37 verbose #17846 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:33:37 verbose #17847 > > inl as_mut forall t. (x : rust.ref (rust.mut' (option' t))) : option' (rust.ref 00:33:37 verbose #17848 > > (rust.mut' t)) = 00:33:37 verbose #17849 > > !\\(x, $'"$0.as_mut()"') 00:33:37 verbose #17850 > > 00:33:37 verbose #17851 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:33:37 verbose #17852 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:33:37 verbose #17853 > > │ ### unwrap_or │ 00:33:37 verbose #17854 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:37 verbose #17855 > > 00:33:37 verbose #17856 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:33:37 verbose #17857 > > inl unwrap_or forall t. (def : t) (x : option' t) : t = 00:33:37 verbose #17858 > > !\($'"!x.unwrap_or(!def)"') 00:33:38 verbose #17859 > > 00:33:38 verbose #17860 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:33:38 verbose #17861 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:33:38 verbose #17862 > > │ ### and_then │ 00:33:38 verbose #17863 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:38 verbose #17864 > > 00:33:38 verbose #17865 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:33:38 verbose #17866 > > inl and_then forall t u. (fn : t -> option' u) (x : option' t) : option' u = 00:33:38 verbose #17867 > > !\\((x, fn), $'"$0.and_then(|x| $1(x))"') 00:33:38 verbose #17868 > > 00:33:38 verbose #17869 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:33:38 verbose #17870 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:33:38 verbose #17871 > > │ ### rc_upgrade │ 00:33:38 verbose #17872 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:38 verbose #17873 > > 00:33:38 verbose #17874 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:33:38 verbose #17875 > > inl rc_upgrade forall t. (x : rust.weak_rc t) : option' (rust.rc t) = 00:33:38 verbose #17876 > > !\\(x, $'"std::rc::Weak::upgrade(&$0)"') 00:33:38 verbose #17877 > > 00:33:38 verbose #17878 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:33:38 verbose #17879 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:33:38 verbose #17880 > > │ ### rc_into_inner │ 00:33:38 verbose #17881 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:38 verbose #17882 > > 00:33:38 verbose #17883 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:33:38 verbose #17884 > > inl rc_into_inner forall t. (x : rust.rc t) : option' t = 00:33:38 verbose #17885 > > !\\(x, $'"std::rc::Rc::into_inner($0)"') 00:33:39 verbose #17886 > > 00:33:39 verbose #17887 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:33:39 verbose #17888 > > //// test 00:33:39 verbose #17889 > > ///! rust 00:33:39 verbose #17890 > > 00:33:39 verbose #17891 > > rust.new_rc 0i32 00:33:39 verbose #17892 > > |> rc_into_inner 00:33:39 verbose #17893 > > |> unbox 00:33:39 verbose #17894 > > |> _assert_eq' (Some 0i32) 00:33:56 verbose #17895 > > 00:33:56 verbose #17896 > > ╭─[ 16.86s - return value ]────────────────────────────────────────────────────╮ 00:33:56 verbose #17897 > > │ __assert_eq' / actual: US0_0(0) / expected: US0_0(0) │ 00:33:56 verbose #17898 > > │ │ 00:33:56 verbose #17899 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:33:56 verbose #17900 > 00:01:19 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 27172 } 00:33:56 verbose #17901 > 00:01:19 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:33:56 verbose #17902 > "nbconvert", 00:33:56 verbose #17903 > "c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb", 00:33:56 verbose #17904 > "--to", 00:33:56 verbose #17905 > "html", 00:33:56 verbose #17906 > "--HTMLExporter.theme=dark", 00:33:56 verbose #17907 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:33:58 verbose #17908 > 00:01:21 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb to html 00:33:58 verbose #17909 > 00:01:21 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:33:58 verbose #17910 > 00:01:21 verbose #7 ! validate(nb) 00:33:59 verbose #17911 > 00:01:23 verbose #8 ! [NbConvertApp] Writing 346052 bytes to c:\home\git\polyglot\lib\spiral\optionm'.dib.html 00:34:00 verbose #17912 > 00:01:23 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 647 } 00:34:00 verbose #17913 > 00:01:23 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 647 } 00:34:00 verbose #17914 > 00:01:23 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:34:00 verbose #17915 > "-c", 00:34:00 verbose #17916 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/optionm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:34:00 verbose #17917 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/optionm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:34:00 verbose #17918 > 00:01:23 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:34:00 verbose #17919 > 00:01:23 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:34:00 verbose #17920 > 00:01:23 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 27878 } 00:34:00 debug #17921 runtime.execute_with_options_async / { exit_code = 0; output_length = 31700 } 00:34:00 debug #21 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path optionm'.dib --retries 3 00:34:00 debug #17922 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path listm'.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:34:00 verbose #17923 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "listm'.dib", "--retries", "3"])) } 00:34:00 verbose #17924 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:34:00 verbose #17925 > "repl", 00:34:00 verbose #17926 > "--exit-after-run", 00:34:00 verbose #17927 > "--run", 00:34:00 verbose #17928 > "c:/home/git/polyglot/lib/spiral/listm'.dib", 00:34:00 verbose #17929 > "--output-path", 00:34:00 verbose #17930 > "c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb", 00:34:00 verbose #17931 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/listm'.dib" --output-path "c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:34:02 verbose #17932 > > 00:34:02 verbose #17933 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:02 verbose #17934 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:02 verbose #17935 > > │ # listm' │ 00:34:02 verbose #17936 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:06 verbose #17937 > > 00:34:06 verbose #17938 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:06 verbose #17939 > > //// test 00:34:06 verbose #17940 > > 00:34:06 verbose #17941 > > open testing 00:34:08 verbose #17942 > > 00:34:08 verbose #17943 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:08 verbose #17944 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:08 verbose #17945 > > │ ## listm' │ 00:34:08 verbose #17946 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:08 verbose #17947 > > 00:34:08 verbose #17948 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:08 verbose #17949 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:08 verbose #17950 > > │ ### append │ 00:34:08 verbose #17951 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:08 verbose #17952 > > 00:34:08 verbose #17953 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:08 verbose #17954 > > instance append list t = 00:34:08 verbose #17955 > > listm.append 00:34:08 verbose #17956 > > 00:34:08 verbose #17957 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:08 verbose #17958 > > //// test 00:34:08 verbose #17959 > > 00:34:08 verbose #17960 > > [[ "a"; "b" ]] ++ [[ "c"; "d" ]] 00:34:08 verbose #17961 > > |> _assert_eq [[ "a"; "b"; "c"; "d" ]] 00:34:09 verbose #17962 > > 00:34:09 verbose #17963 > > ╭─[ 1.48s - stdout ]───────────────────────────────────────────────────────────╮ 00:34:09 verbose #17964 > > │ __assert_eq / actual: UH0_1 ("a", UH0_1 ("b", UH0_1 ("c", UH0_1 ("d", │ 00:34:09 verbose #17965 > > │ UH0_0)))) / expected: UH0_1 ("a", UH0_1 ("b", UH0_1 ("c", UH0_1 ("d", │ 00:34:09 verbose #17966 > > │ UH0_0)))) │ 00:34:09 verbose #17967 > > │ │ 00:34:09 verbose #17968 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:09 verbose #17969 > > 00:34:09 verbose #17970 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:09 verbose #17971 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:09 verbose #17972 > > │ ### collect │ 00:34:09 verbose #17973 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:09 verbose #17974 > > 00:34:09 verbose #17975 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:09 verbose #17976 > > inl collect forall t r. (fn : t -> list r) (items : list t) : list r = 00:34:09 verbose #17977 > > items 00:34:09 verbose #17978 > > |> listm.map fn 00:34:09 verbose #17979 > > |> listm.fold (++) [[]] 00:34:10 verbose #17980 > > 00:34:10 verbose #17981 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:10 verbose #17982 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:10 verbose #17983 > > │ ### init_series │ 00:34:10 verbose #17984 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:10 verbose #17985 > > 00:34:10 verbose #17986 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:10 verbose #17987 > > inl init_series start end inc = 00:34:10 verbose #17988 > > inl total : f64 = conv ((end - start) / inc) + 1 00:34:10 verbose #17989 > > listm.init total (conv >> (*) inc >> (+) start) 00:34:10 verbose #17990 > > 00:34:10 verbose #17991 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:10 verbose #17992 > > //// test 00:34:10 verbose #17993 > > 00:34:10 verbose #17994 > > init_series 0 1 0.5 00:34:10 verbose #17995 > > |> _assert_eq [[ 0f64; 0.5; 1 ]] 00:34:11 verbose #17996 > > 00:34:11 verbose #17997 > > ╭─[ 591.98ms - stdout ]────────────────────────────────────────────────────────╮ 00:34:11 verbose #17998 > > │ __assert_eq / actual: UH0_1 (0.0, UH0_1 (0.5, UH0_1 (1.0, UH0_0))) / │ 00:34:11 verbose #17999 > > │ expected: UH0_1 (0.0, UH0_1 (0.5, UH0_1 (1.0, UH0_0))) │ 00:34:11 verbose #18000 > > │ │ 00:34:11 verbose #18001 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:11 verbose #18002 > > 00:34:11 verbose #18003 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:11 verbose #18004 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:11 verbose #18005 > > │ ### try_item │ 00:34:11 verbose #18006 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:11 verbose #18007 > > 00:34:11 verbose #18008 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:11 verbose #18009 > > inl rec try_item i = function 00:34:11 verbose #18010 > > | Cons (x, _) when i = 0 => Some x 00:34:11 verbose #18011 > > | Cons (_, xs) => try_item (i - 1) xs 00:34:11 verbose #18012 > > | Nil => None 00:34:11 verbose #18013 > > 00:34:11 verbose #18014 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:11 verbose #18015 > > //// test 00:34:11 verbose #18016 > > 00:34:11 verbose #18017 > > listm.init 10i32 id 00:34:11 verbose #18018 > > |> try_item 9i32 00:34:11 verbose #18019 > > |> _assert_eq (Some 9) 00:34:12 verbose #18020 > > 00:34:12 verbose #18021 > > ╭─[ 437.08ms - stdout ]────────────────────────────────────────────────────────╮ 00:34:12 verbose #18022 > > │ __assert_eq / actual: US0_0 9 / expected: US0_0 9 │ 00:34:12 verbose #18023 > > │ │ 00:34:12 verbose #18024 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:12 verbose #18025 > > 00:34:12 verbose #18026 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:12 verbose #18027 > > //// test 00:34:12 verbose #18028 > > 00:34:12 verbose #18029 > > listm.init 10i32 id 00:34:12 verbose #18030 > > |> try_item 10i32 00:34:12 verbose #18031 > > |> _assert_eq None 00:34:12 verbose #18032 > > 00:34:12 verbose #18033 > > ╭─[ 453.28ms - stdout ]────────────────────────────────────────────────────────╮ 00:34:12 verbose #18034 > > │ __assert_eq / actual: US0_1 / expected: US0_1 │ 00:34:12 verbose #18035 > > │ │ 00:34:12 verbose #18036 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:12 verbose #18037 > > 00:34:12 verbose #18038 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:12 verbose #18039 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:12 verbose #18040 > > │ ### item │ 00:34:12 verbose #18041 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:12 verbose #18042 > > 00:34:12 verbose #18043 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:12 verbose #18044 > > inl item i = 00:34:12 verbose #18045 > > try_item i >> optionm.value 00:34:13 verbose #18046 > > 00:34:13 verbose #18047 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:13 verbose #18048 > > //// test 00:34:13 verbose #18049 > > 00:34:13 verbose #18050 > > listm.init 10i32 id 00:34:13 verbose #18051 > > |> item 9i32 00:34:13 verbose #18052 > > |> _assert_eq 9 00:34:13 verbose #18053 > > 00:34:13 verbose #18054 > > ╭─[ 430.15ms - stdout ]────────────────────────────────────────────────────────╮ 00:34:13 verbose #18055 > > │ __assert_eq / actual: 9 / expected: 9 │ 00:34:13 verbose #18056 > > │ │ 00:34:13 verbose #18057 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:13 verbose #18058 > > 00:34:13 verbose #18059 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:13 verbose #18060 > > //// test 00:34:13 verbose #18061 > > 00:34:13 verbose #18062 > > fun () => 00:34:13 verbose #18063 > > listm.init 10i32 id 00:34:13 verbose #18064 > > |> item 10i32 00:34:13 verbose #18065 > > |> ignore 00:34:13 verbose #18066 > > |> _throws 00:34:13 verbose #18067 > > |> optionm.map sm'.format_exception 00:34:13 verbose #18068 > > |> _assert_eq (Some "System.Exception: Option does not have a value.") 00:34:14 verbose #18069 > > 00:34:14 verbose #18070 > > ╭─[ 648.59ms - stdout ]────────────────────────────────────────────────────────╮ 00:34:14 verbose #18071 > > │ __assert_eq / actual: US1_0 "System.Exception: Option does not have a │ 00:34:14 verbose #18072 > > │ value." / expected: US1_0 "System.Exception: Option does not have a value." │ 00:34:14 verbose #18073 > > │ │ 00:34:14 verbose #18074 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:14 verbose #18075 > > 00:34:14 verbose #18076 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:14 verbose #18077 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:14 verbose #18078 > > │ ### try_item_ │ 00:34:14 verbose #18079 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:14 verbose #18080 > > 00:34:14 verbose #18081 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:14 verbose #18082 > > let rec try_item_ i = function 00:34:14 verbose #18083 > > | Cons (x, _) when i = 0 => Some x 00:34:14 verbose #18084 > > | Cons (_, xs) => try_item_ (i - 1) xs 00:34:14 verbose #18085 > > | Nil => None 00:34:14 verbose #18086 > > 00:34:14 verbose #18087 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:14 verbose #18088 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:14 verbose #18089 > > │ ### item_ │ 00:34:14 verbose #18090 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:14 verbose #18091 > > 00:34:14 verbose #18092 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:14 verbose #18093 > > inl item_ i = 00:34:14 verbose #18094 > > try_item_ i >> optionm.value 00:34:14 verbose #18095 > > 00:34:14 verbose #18096 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:14 verbose #18097 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:14 verbose #18098 > > │ ### sum │ 00:34:14 verbose #18099 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:14 verbose #18100 > > 00:34:14 verbose #18101 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:14 verbose #18102 > > inl sum list = 00:34:14 verbose #18103 > > list |> listm.fold (+) 0 00:34:15 verbose #18104 > > 00:34:15 verbose #18105 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:15 verbose #18106 > > //// test 00:34:15 verbose #18107 > > 00:34:15 verbose #18108 > > listm.init 10i32 id 00:34:15 verbose #18109 > > |> sum 00:34:15 verbose #18110 > > |> _assert_eq 45 00:34:15 verbose #18111 > > 00:34:15 verbose #18112 > > ╭─[ 478.17ms - stdout ]────────────────────────────────────────────────────────╮ 00:34:15 verbose #18113 > > │ __assert_eq / actual: 45 / expected: 45 │ 00:34:15 verbose #18114 > > │ │ 00:34:15 verbose #18115 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:15 verbose #18116 > > 00:34:15 verbose #18117 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:15 verbose #18118 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:15 verbose #18119 > > │ ### unzip │ 00:34:15 verbose #18120 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:15 verbose #18121 > > 00:34:15 verbose #18122 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:15 verbose #18123 > > inl unzip list = 00:34:15 verbose #18124 > > (([[]], [[]]), list) 00:34:15 verbose #18125 > > ||> listm.fold fun (acc_x, acc_y) (x, y) => 00:34:15 verbose #18126 > > x :: acc_x, y :: acc_y 00:34:15 verbose #18127 > > |> fun x, y => 00:34:15 verbose #18128 > > x |> listm.rev, y |> listm.rev 00:34:16 verbose #18129 > > 00:34:16 verbose #18130 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:16 verbose #18131 > > //// test 00:34:16 verbose #18132 > > 00:34:16 verbose #18133 > > listm.init 10i32 id 00:34:16 verbose #18134 > > |> listm.map (fun x => x, x) 00:34:16 verbose #18135 > > |> unzip 00:34:16 verbose #18136 > > |> fun x, y => 00:34:16 verbose #18137 > > x |> sum 00:34:16 verbose #18138 > > |> _assert_eq 45 00:34:16 verbose #18139 > > 00:34:16 verbose #18140 > > y |> sum 00:34:16 verbose #18141 > > |> _assert_eq 45 00:34:16 verbose #18142 > > 00:34:16 verbose #18143 > > ╭─[ 474.34ms - stdout ]────────────────────────────────────────────────────────╮ 00:34:16 verbose #18144 > > │ __assert_eq / actual: 45 / expected: 45 │ 00:34:16 verbose #18145 > > │ __assert_eq / actual: 45 / expected: 45 │ 00:34:16 verbose #18146 > > │ │ 00:34:16 verbose #18147 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:16 verbose #18148 > > 00:34:16 verbose #18149 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:16 verbose #18150 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:16 verbose #18151 > > │ ### try_index_of │ 00:34:16 verbose #18152 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:16 verbose #18153 > > 00:34:16 verbose #18154 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:16 verbose #18155 > > inl try_index_of item list = 00:34:16 verbose #18156 > > inl rec loop i = function 00:34:16 verbose #18157 > > | [[]] => None 00:34:16 verbose #18158 > > | x :: xs => 00:34:16 verbose #18159 > > if x = item 00:34:16 verbose #18160 > > then Some i 00:34:16 verbose #18161 > > else loop (i + 1) xs 00:34:16 verbose #18162 > > loop 0 list 00:34:16 verbose #18163 > > 00:34:16 verbose #18164 > > inl index_of item = 00:34:16 verbose #18165 > > try_index_of item >> optionm.value 00:34:16 verbose #18166 > > 00:34:16 verbose #18167 > > inl try_index_of_ item list = 00:34:16 verbose #18168 > > let rec loop i = function 00:34:16 verbose #18169 > > | [[]] => None 00:34:16 verbose #18170 > > | x :: xs => 00:34:16 verbose #18171 > > if x = item 00:34:16 verbose #18172 > > then Some i 00:34:16 verbose #18173 > > else loop (i + 1) xs 00:34:16 verbose #18174 > > loop 0 list 00:34:16 verbose #18175 > > 00:34:16 verbose #18176 > > inl index_of_ item = 00:34:16 verbose #18177 > > try_index_of_ item >> optionm.value 00:34:16 verbose #18178 > > 00:34:16 verbose #18179 > > inl try_index_of__ item list = 00:34:16 verbose #18180 > > inl i = mut 0 00:34:16 verbose #18181 > > inl list = mut list 00:34:16 verbose #18182 > > inl result = mut None 00:34:16 verbose #18183 > > let rec loop () = 00:34:16 verbose #18184 > > match *list with 00:34:16 verbose #18185 > > | [[]] => result <- None 00:34:16 verbose #18186 > > | x :: xs => 00:34:16 verbose #18187 > > if x = item 00:34:16 verbose #18188 > > then result <- Some *i 00:34:16 verbose #18189 > > else 00:34:16 verbose #18190 > > i <- *i + 1 00:34:16 verbose #18191 > > list <- xs 00:34:16 verbose #18192 > > loop () 00:34:16 verbose #18193 > > loop () 00:34:16 verbose #18194 > > *result 00:34:16 verbose #18195 > > 00:34:16 verbose #18196 > > inl index_of__ item = 00:34:16 verbose #18197 > > try_index_of__ item >> optionm.value 00:34:17 verbose #18198 > > 00:34:17 verbose #18199 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:17 verbose #18200 > > //// test 00:34:17 verbose #18201 > > 00:34:17 verbose #18202 > > listm.init 10i32 id 00:34:17 verbose #18203 > > |> index_of 5i32 00:34:17 verbose #18204 > > |> _assert_eq 5i32 00:34:17 verbose #18205 > > 00:34:17 verbose #18206 > > ╭─[ 428.25ms - stdout ]────────────────────────────────────────────────────────╮ 00:34:17 verbose #18207 > > │ __assert_eq / actual: 5 / expected: 5 │ 00:34:17 verbose #18208 > > │ │ 00:34:17 verbose #18209 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:17 verbose #18210 > > 00:34:17 verbose #18211 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:17 verbose #18212 > > //// test 00:34:17 verbose #18213 > > 00:34:17 verbose #18214 > > listm.init 10i32 id 00:34:17 verbose #18215 > > |> try_index_of 10i32 00:34:17 verbose #18216 > > |> _assert_eq (None : option i32) 00:34:18 verbose #18217 > > 00:34:18 verbose #18218 > > ╭─[ 458.17ms - stdout ]────────────────────────────────────────────────────────╮ 00:34:18 verbose #18219 > > │ __assert_eq / actual: US0_1 / expected: US0_1 │ 00:34:18 verbose #18220 > > │ │ 00:34:18 verbose #18221 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:18 verbose #18222 > > 00:34:18 verbose #18223 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:18 verbose #18224 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:18 verbose #18225 > > │ ### try_find │ 00:34:18 verbose #18226 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:18 verbose #18227 > > 00:34:18 verbose #18228 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:18 verbose #18229 > > inl try_find fn list = 00:34:18 verbose #18230 > > inl rec loop = function 00:34:18 verbose #18231 > > | [[]] => None 00:34:18 verbose #18232 > > | x :: xs => 00:34:18 verbose #18233 > > if fn x 00:34:18 verbose #18234 > > then Some x 00:34:18 verbose #18235 > > else loop xs 00:34:18 verbose #18236 > > loop list 00:34:18 verbose #18237 > > 00:34:18 verbose #18238 > > inl try_find_ fn list = 00:34:18 verbose #18239 > > let rec loop = function 00:34:18 verbose #18240 > > | [[]] => None 00:34:18 verbose #18241 > > | x :: xs => 00:34:18 verbose #18242 > > if fn x 00:34:18 verbose #18243 > > then Some x 00:34:18 verbose #18244 > > else loop xs 00:34:18 verbose #18245 > > loop list 00:34:18 verbose #18246 > > 00:34:18 verbose #18247 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:18 verbose #18248 > > //// test 00:34:18 verbose #18249 > > 00:34:18 verbose #18250 > > listm.init 10i32 id 00:34:18 verbose #18251 > > |> try_find ((=) 5i32) 00:34:18 verbose #18252 > > |> _assert_eq (Some 5i32) 00:34:18 verbose #18253 > > 00:34:18 verbose #18254 > > ╭─[ 482.06ms - stdout ]────────────────────────────────────────────────────────╮ 00:34:18 verbose #18255 > > │ __assert_eq / actual: US0_0 5 / expected: US0_0 5 │ 00:34:18 verbose #18256 > > │ │ 00:34:18 verbose #18257 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:18 verbose #18258 > > 00:34:18 verbose #18259 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:18 verbose #18260 > > inl find x = 00:34:18 verbose #18261 > > try_find x >> optionm.value 00:34:18 verbose #18262 > > 00:34:18 verbose #18263 > > inl find_ x = 00:34:18 verbose #18264 > > try_find_ x >> optionm.value 00:34:19 verbose #18265 > > 00:34:19 verbose #18266 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:19 verbose #18267 > > //// test 00:34:19 verbose #18268 > > 00:34:19 verbose #18269 > > listm.init 10i32 id 00:34:19 verbose #18270 > > |> find ((=) 5i32) 00:34:19 verbose #18271 > > |> _assert_eq 5i32 00:34:19 verbose #18272 > > 00:34:19 verbose #18273 > > ╭─[ 479.17ms - stdout ]────────────────────────────────────────────────────────╮ 00:34:19 verbose #18274 > > │ __assert_eq / actual: 5 / expected: 5 │ 00:34:19 verbose #18275 > > │ │ 00:34:19 verbose #18276 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:19 verbose #18277 > > 00:34:19 verbose #18278 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:19 verbose #18279 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:19 verbose #18280 > > │ ### choose │ 00:34:19 verbose #18281 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:19 verbose #18282 > > 00:34:19 verbose #18283 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:19 verbose #18284 > > inl choose f l = 00:34:19 verbose #18285 > > (l, [[]]) 00:34:19 verbose #18286 > > ||> listm.foldBack fun x acc => 00:34:19 verbose #18287 > > match f x with 00:34:19 verbose #18288 > > | Some y => y :: acc 00:34:19 verbose #18289 > > | None => acc 00:34:20 verbose #18290 > > 00:34:20 verbose #18291 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:20 verbose #18292 > > //// test 00:34:20 verbose #18293 > > 00:34:20 verbose #18294 > > listm.init 10i32 id 00:34:20 verbose #18295 > > |> choose (fun x => if x % 2 = 0 then Some x else None) 00:34:20 verbose #18296 > > |> _assert_eq [[ 0; 2; 4; 6; 8 ]] 00:34:20 verbose #18297 > > 00:34:20 verbose #18298 > > ╭─[ 491.12ms - stdout ]────────────────────────────────────────────────────────╮ 00:34:20 verbose #18299 > > │ __assert_eq / actual: UH0_1 (0, UH0_1 (2, UH0_1 (4, UH0_1 (6, UH0_1 (8, │ 00:34:20 verbose #18300 > > │ UH0_0))))) / expected: UH0_1 (0, UH0_1 (2, UH0_1 (4, UH0_1 (6, UH0_1 (8, │ 00:34:20 verbose #18301 > > │ UH0_0))))) │ 00:34:20 verbose #18302 > > │ │ 00:34:20 verbose #18303 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:20 verbose #18304 > > 00:34:20 verbose #18305 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:20 verbose #18306 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:20 verbose #18307 > > │ ### filter │ 00:34:20 verbose #18308 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:20 verbose #18309 > > 00:34:20 verbose #18310 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:20 verbose #18311 > > inl filter forall t. (fn : t -> bool) (list : list t) : list t = 00:34:20 verbose #18312 > > (list, Nil) 00:34:20 verbose #18313 > > ||> listm.foldBack fun x acc => 00:34:20 verbose #18314 > > if fn x then x :: acc else acc 00:34:21 verbose #18315 > > 00:34:21 verbose #18316 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:21 verbose #18317 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:21 verbose #18318 > > │ ### zip_with │ 00:34:21 verbose #18319 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:21 verbose #18320 > > 00:34:21 verbose #18321 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:21 verbose #18322 > > inl zip_with fn xs ys = 00:34:21 verbose #18323 > > inl rec loop acc xs ys = 00:34:21 verbose #18324 > > match xs, ys with 00:34:21 verbose #18325 > > | Cons (x, xs), Cons (y, ys) => 00:34:21 verbose #18326 > > loop (fn x y :: acc) xs ys 00:34:21 verbose #18327 > > | _ => listm.rev acc 00:34:21 verbose #18328 > > loop [[]] xs ys 00:34:21 verbose #18329 > > 00:34:21 verbose #18330 > > inl zip_with_ fn xs ys = 00:34:21 verbose #18331 > > let rec loop acc xs ys = 00:34:21 verbose #18332 > > match xs, ys with 00:34:21 verbose #18333 > > | Cons (x, xs), Cons (y, ys) => 00:34:21 verbose #18334 > > loop (fn x y :: acc) xs ys 00:34:21 verbose #18335 > > | _ => listm.rev acc 00:34:21 verbose #18336 > > loop [[]] xs ys 00:34:21 verbose #18337 > > 00:34:21 verbose #18338 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:21 verbose #18339 > > //// test 00:34:21 verbose #18340 > > 00:34:21 verbose #18341 > > ([[ 1i32; 2; 3 ]], [[ 4; 5; 6 ]]) 00:34:21 verbose #18342 > > ||> zip_with (+) 00:34:21 verbose #18343 > > |> _assert_eq [[ 5; 7; 9 ]] 00:34:22 verbose #18344 > > 00:34:22 verbose #18345 > > ╭─[ 563.97ms - stdout ]────────────────────────────────────────────────────────╮ 00:34:22 verbose #18346 > > │ __assert_eq / actual: UH0_1 (5, UH0_1 (7, UH0_1 (9, UH0_0))) / expected: │ 00:34:22 verbose #18347 > > │ UH0_1 (5, UH0_1 (7, UH0_1 (9, UH0_0))) │ 00:34:22 verbose #18348 > > │ │ 00:34:22 verbose #18349 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:22 verbose #18350 > > 00:34:22 verbose #18351 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:22 verbose #18352 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:22 verbose #18353 > > │ ### zip │ 00:34:22 verbose #18354 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:22 verbose #18355 > > 00:34:22 verbose #18356 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:22 verbose #18357 > > inl zip xs ys = 00:34:22 verbose #18358 > > zip_with pair xs ys 00:34:22 verbose #18359 > > 00:34:22 verbose #18360 > > inl zip_ xs ys = 00:34:22 verbose #18361 > > zip_with_ pair xs ys 00:34:22 verbose #18362 > > 00:34:22 verbose #18363 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:22 verbose #18364 > > //// test 00:34:22 verbose #18365 > > 00:34:22 verbose #18366 > > ([[ 1i32; 2; 3 ]], [[ 4i32; 5; 6 ]]) 00:34:22 verbose #18367 > > ||> zip 00:34:22 verbose #18368 > > |> _assert_eq [[ 1, 4; 2, 5; 3, 6 ]] 00:34:23 verbose #18369 > > 00:34:23 verbose #18370 > > ╭─[ 519.27ms - stdout ]────────────────────────────────────────────────────────╮ 00:34:23 verbose #18371 > > │ __assert_eq / actual: UH0_1 (1, 4, UH0_1 (2, 5, UH0_1 (3, 6, UH0_0))) / │ 00:34:23 verbose #18372 > > │ expected: UH0_1 (1, 4, UH0_1 (2, 5, UH0_1 (3, 6, UH0_0))) │ 00:34:23 verbose #18373 > > │ │ 00:34:23 verbose #18374 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:23 verbose #18375 > > 00:34:23 verbose #18376 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:23 verbose #18377 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:23 verbose #18378 > > │ ### indexed │ 00:34:23 verbose #18379 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:23 verbose #18380 > > 00:34:23 verbose #18381 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:23 verbose #18382 > > inl indexed list = 00:34:23 verbose #18383 > > (([[]], 0), list) 00:34:23 verbose #18384 > > ||> listm.fold fun (acc, i) x => 00:34:23 verbose #18385 > > (i, x) :: acc, i + 1 00:34:23 verbose #18386 > > |> fst 00:34:23 verbose #18387 > > |> listm.rev 00:34:23 verbose #18388 > > 00:34:23 verbose #18389 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:23 verbose #18390 > > //// test 00:34:23 verbose #18391 > > 00:34:23 verbose #18392 > > listm.init 5i32 ((*) 2) 00:34:23 verbose #18393 > > |> indexed 00:34:23 verbose #18394 > > |> _assert_eq [[ 0i32, 0; 1, 2; 2, 4; 3, 6; 4, 8 ]] 00:34:24 verbose #18395 > > 00:34:24 verbose #18396 > > ╭─[ 440.31ms - stdout ]────────────────────────────────────────────────────────╮ 00:34:24 verbose #18397 > > │ __assert_eq / actual: UH0_1 (0, 0, UH0_1 (1, 2, UH0_1 (2, 4, UH0_1 (3, 6, │ 00:34:24 verbose #18398 > > │ UH0_1 (4, 8, UH0_0))))) / expected: UH0_1 (0, 0, UH0_1 (1, 2, UH0_1 (2, 4, │ 00:34:24 verbose #18399 > > │ UH0_1 (3, 6, UH0_1 (4, 8, UH0_0))))) │ 00:34:24 verbose #18400 > > │ │ 00:34:24 verbose #18401 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:24 verbose #18402 > > 00:34:24 verbose #18403 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:24 verbose #18404 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:24 verbose #18405 > > │ ### group_by │ 00:34:24 verbose #18406 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:24 verbose #18407 > > 00:34:24 verbose #18408 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:24 verbose #18409 > > inl group_by fn list = 00:34:24 verbose #18410 > > (list, [[]]) 00:34:24 verbose #18411 > > ||> listm.foldBack fun x acc => 00:34:24 verbose #18412 > > inl xk = fn x 00:34:24 verbose #18413 > > inl found, new_acc = 00:34:24 verbose #18414 > > ((false, [[]]), acc) 00:34:24 verbose #18415 > > ||> listm.fold fun (found, acc') (k, xs) => 00:34:24 verbose #18416 > > if k = xk 00:34:24 verbose #18417 > > then true, (k, x :: xs) :: acc' 00:34:24 verbose #18418 > > else found, (k, xs) :: acc' 00:34:24 verbose #18419 > > if found 00:34:24 verbose #18420 > > then new_acc 00:34:24 verbose #18421 > > else (xk, [[ x ]]) :: new_acc 00:34:24 verbose #18422 > > 00:34:24 verbose #18423 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:24 verbose #18424 > > //// test 00:34:24 verbose #18425 > > 00:34:24 verbose #18426 > > listm.init 10i32 id 00:34:24 verbose #18427 > > |> group_by (fun x => x % 2 = 0) 00:34:24 verbose #18428 > > |> _assert_eq [[ true, [[ 0; 2; 4; 6; 8 ]]; false, [[ 1; 3; 5; 7; 9 ]] ]] 00:34:25 verbose #18429 > > 00:34:25 verbose #18430 > > ╭─[ 485.70ms - stdout ]────────────────────────────────────────────────────────╮ 00:34:25 verbose #18431 > > │ __assert_eq / actual: UH1_1 │ 00:34:25 verbose #18432 > > │ (true, UH0_1 (0, UH0_1 (2, UH0_1 (4, UH0_1 (6, UH0_1 (8, UH0_0))))), │ 00:34:25 verbose #18433 > > │ UH1_1 │ 00:34:25 verbose #18434 > > │ (false, UH0_1 (1, UH0_1 (3, UH0_1 (5, UH0_1 (7, UH0_1 (9, UH0_0))))), │ 00:34:25 verbose #18435 > > │ UH1_0)) / expected: UH1_1 │ 00:34:25 verbose #18436 > > │ (true, UH0_1 (0, UH0_1 (2, UH0_1 (4, UH0_1 (6, UH0_1 (8, UH0_0))))), │ 00:34:25 verbose #18437 > > │ UH1_1 │ 00:34:25 verbose #18438 > > │ (false, UH0_1 (1, UH0_1 (3, UH0_1 (5, UH0_1 (7, UH0_1 (9, UH0_0))))), │ 00:34:25 verbose #18439 > > │ UH1_0)) │ 00:34:25 verbose #18440 > > │ │ 00:34:25 verbose #18441 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:25 verbose #18442 > > 00:34:25 verbose #18443 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:25 verbose #18444 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:25 verbose #18445 > > │ ### forall' │ 00:34:25 verbose #18446 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:25 verbose #18447 > > 00:34:25 verbose #18448 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:25 verbose #18449 > > inl forall' fn (head :: tail) = 00:34:25 verbose #18450 > > (true, tail) 00:34:25 verbose #18451 > > ||> listm.fold fun acc x => 00:34:25 verbose #18452 > > acc && x = head 00:34:25 verbose #18453 > > 00:34:25 verbose #18454 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:25 verbose #18455 > > //// test 00:34:25 verbose #18456 > > 00:34:25 verbose #18457 > > [[ 1i32; 1; 1; 1; 1 ]] 00:34:25 verbose #18458 > > |> forall' ((=) 1i32) 00:34:25 verbose #18459 > > |> _assert_eq true 00:34:25 verbose #18460 > > 00:34:25 verbose #18461 > > ╭─[ 461.63ms - stdout ]────────────────────────────────────────────────────────╮ 00:34:25 verbose #18462 > > │ __assert_eq / actual: true / expected: true │ 00:34:25 verbose #18463 > > │ │ 00:34:25 verbose #18464 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:25 verbose #18465 > > 00:34:25 verbose #18466 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:25 verbose #18467 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:25 verbose #18468 > > │ ### last │ 00:34:25 verbose #18469 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:25 verbose #18470 > > 00:34:25 verbose #18471 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:25 verbose #18472 > > inl last list = 00:34:25 verbose #18473 > > list 00:34:25 verbose #18474 > > |> listm.rev 00:34:25 verbose #18475 > > |> item 0i32 00:34:26 verbose #18476 > > 00:34:26 verbose #18477 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:26 verbose #18478 > > //// test 00:34:26 verbose #18479 > > 00:34:26 verbose #18480 > > listm.init 10i32 id 00:34:26 verbose #18481 > > |> last 00:34:26 verbose #18482 > > |> _assert_eq 9 00:34:26 verbose #18483 > > 00:34:26 verbose #18484 > > ╭─[ 446.63ms - stdout ]────────────────────────────────────────────────────────╮ 00:34:26 verbose #18485 > > │ __assert_eq / actual: 9 / expected: 9 │ 00:34:26 verbose #18486 > > │ │ 00:34:26 verbose #18487 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:26 verbose #18488 > > 00:34:26 verbose #18489 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:26 verbose #18490 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:26 verbose #18491 > > │ ### try_pick │ 00:34:26 verbose #18492 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:26 verbose #18493 > > 00:34:26 verbose #18494 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:26 verbose #18495 > > inl try_pick fn list = 00:34:26 verbose #18496 > > inl rec body fn = function 00:34:26 verbose #18497 > > | [[]] => None 00:34:26 verbose #18498 > > | x :: xs => 00:34:26 verbose #18499 > > match fn x with 00:34:26 verbose #18500 > > | Some y => Some y 00:34:26 verbose #18501 > > | None => loop xs 00:34:26 verbose #18502 > > and inl loop list = 00:34:26 verbose #18503 > > if var_is list |> not 00:34:26 verbose #18504 > > then body fn list 00:34:26 verbose #18505 > > else 00:34:26 verbose #18506 > > inl fn = join fn 00:34:26 verbose #18507 > > inl list = dyn list 00:34:26 verbose #18508 > > join body fn list 00:34:26 verbose #18509 > > loop list 00:34:27 verbose #18510 > > 00:34:27 verbose #18511 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:27 verbose #18512 > > //// test 00:34:27 verbose #18513 > > 00:34:27 verbose #18514 > > listm.init 10i32 id 00:34:27 verbose #18515 > > |> try_pick (fun x => if x = 5i32 then Some x else None) 00:34:27 verbose #18516 > > |> _assert_eq (Some 5i32) 00:34:27 verbose #18517 > > 00:34:27 verbose #18518 > > ╭─[ 464.33ms - stdout ]────────────────────────────────────────────────────────╮ 00:34:27 verbose #18519 > > │ __assert_eq / actual: US0_0 5 / expected: US0_0 5 │ 00:34:27 verbose #18520 > > │ │ 00:34:27 verbose #18521 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:27 verbose #18522 > > 00:34:27 verbose #18523 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:27 verbose #18524 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:27 verbose #18525 > > │ ### exists' │ 00:34:27 verbose #18526 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:27 verbose #18527 > > 00:34:27 verbose #18528 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:27 verbose #18529 > > inl exists' f x = 00:34:27 verbose #18530 > > inl length_x : i64 = x |> listm.length 00:34:27 verbose #18531 > > let rec loop i = 00:34:27 verbose #18532 > > if i >= length_x 00:34:27 verbose #18533 > > then false 00:34:27 verbose #18534 > > elif x |> item i |> f 00:34:27 verbose #18535 > > then true 00:34:27 verbose #18536 > > else loop (i + 1) 00:34:27 verbose #18537 > > loop 0 00:34:28 verbose #18538 > > 00:34:28 verbose #18539 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:28 verbose #18540 > > //// test 00:34:28 verbose #18541 > > 00:34:28 verbose #18542 > > [[ 'a'; 'b'; 'c' ]] 00:34:28 verbose #18543 > > |> exists' fun x => x = 'b' 00:34:28 verbose #18544 > > |> _assert_eq true 00:34:28 verbose #18545 > > 00:34:28 verbose #18546 > > [[ 'a'; 'b' ]] 00:34:28 verbose #18547 > > |> exists' fun x => x = 'c' 00:34:28 verbose #18548 > > |> _assert_eq false 00:34:28 verbose #18549 > > 00:34:28 verbose #18550 > > [[]] 00:34:28 verbose #18551 > > |> exists' fun x => x = 'a' 00:34:28 verbose #18552 > > |> _assert_eq false 00:34:28 verbose #18553 > > 00:34:28 verbose #18554 > > ╭─[ 532.94ms - stdout ]────────────────────────────────────────────────────────╮ 00:34:28 verbose #18555 > > │ __assert_eq / actual: true / expected: true │ 00:34:28 verbose #18556 > > │ __assert_eq / actual: false / expected: false │ 00:34:28 verbose #18557 > > │ __assert_eq / actual: false / expected: false │ 00:34:28 verbose #18558 > > │ │ 00:34:28 verbose #18559 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:28 verbose #18560 > > 00:34:28 verbose #18561 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:28 verbose #18562 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:28 verbose #18563 > > │ ## fsharp │ 00:34:28 verbose #18564 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:28 verbose #18565 > > 00:34:28 verbose #18566 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:28 verbose #18567 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:28 verbose #18568 > > │ ### list' │ 00:34:28 verbose #18569 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:28 verbose #18570 > > 00:34:28 verbose #18571 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:28 verbose #18572 > > nominal list' t = $"backend_switch `({ Fsharp : $'`t list'; Python : 00:34:28 verbose #18573 > > $'List[[`t]]' })" 00:34:29 verbose #18574 > > 00:34:29 verbose #18575 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:29 verbose #18576 > > inl empty' forall t. () : list' t = 00:34:29 verbose #18577 > > $'[[]]' 00:34:29 verbose #18578 > > 00:34:29 verbose #18579 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:29 verbose #18580 > > inl cons' forall t. (head : t) (tail : list' t) : list' t = 00:34:29 verbose #18581 > > backend_switch { 00:34:29 verbose #18582 > > Fsharp = fun () => $'!head :: !tail ' : list' t 00:34:29 verbose #18583 > > Python = fun () => 00:34:29 verbose #18584 > > $'!tail.insert(0, !head)' 00:34:29 verbose #18585 > > $'!tail ' : list' t 00:34:29 verbose #18586 > > } 00:34:29 verbose #18587 > > 00:34:29 verbose #18588 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:29 verbose #18589 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:29 verbose #18590 > > │ ### box │ 00:34:29 verbose #18591 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:29 verbose #18592 > > 00:34:29 verbose #18593 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:29 verbose #18594 > > inl box forall t. (list : list t) : list' t = 00:34:29 verbose #18595 > > (list, empty' ()) 00:34:29 verbose #18596 > > ||> listm.foldBack fun x acc => 00:34:29 verbose #18597 > > acc |> cons' x 00:34:30 verbose #18598 > > 00:34:30 verbose #18599 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:30 verbose #18600 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:30 verbose #18601 > > │ ### fold' │ 00:34:30 verbose #18602 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:30 verbose #18603 > > 00:34:30 verbose #18604 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:30 verbose #18605 > > inl fold' forall t u. (fn : t -> u) (init : list u) (list : list' t) : list u = 00:34:30 verbose #18606 > > backend_switch { 00:34:30 verbose #18607 > > Fsharp = fun () => 00:34:30 verbose #18608 > > (init, list) 00:34:30 verbose #18609 > > ||> $'List.fold' join fun acc x => Cons (fn x, acc) 00:34:30 verbose #18610 > > : list u 00:34:30 verbose #18611 > > Python = fun () => 00:34:30 verbose #18612 > > $'x = !init ' 00:34:30 verbose #18613 > > $'for x in !list: x = !fn(x)' 00:34:30 verbose #18614 > > $'x' : list u 00:34:30 verbose #18615 > > } 00:34:30 verbose #18616 > > 00:34:30 verbose #18617 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:30 verbose #18618 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:30 verbose #18619 > > │ ### fold_back' │ 00:34:30 verbose #18620 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:30 verbose #18621 > > 00:34:30 verbose #18622 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:30 verbose #18623 > > inl fold_back' forall t u. (fn : t -> u) (list : list' t) (init : list u) : list 00:34:30 verbose #18624 > > u = 00:34:30 verbose #18625 > > backend_switch { 00:34:30 verbose #18626 > > Fsharp = fun () => 00:34:30 verbose #18627 > > (list, init) 00:34:30 verbose #18628 > > ||> $'List.foldBack' join fun x acc => Cons (fn x, acc) 00:34:30 verbose #18629 > > : list u 00:34:30 verbose #18630 > > Python = fun () => 00:34:30 verbose #18631 > > $'x = !init ' 00:34:30 verbose #18632 > > $'for x in reversed(!list): x = !fn(x)' 00:34:30 verbose #18633 > > $'x' : list u 00:34:30 verbose #18634 > > } 00:34:31 verbose #18635 > > 00:34:31 verbose #18636 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:31 verbose #18637 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:31 verbose #18638 > > │ ### filter' │ 00:34:31 verbose #18639 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:31 verbose #18640 > > 00:34:31 verbose #18641 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:31 verbose #18642 > > inl filter' forall t. (fn : t -> bool) (list : list' t) : list' t = 00:34:31 verbose #18643 > > backend_switch { 00:34:31 verbose #18644 > > Fsharp = fun () => list |> $'"List.filter !fn"' : list' t 00:34:31 verbose #18645 > > Python = fun () => $'list(filter(!fn, !list))' : list' t 00:34:31 verbose #18646 > > } 00:34:31 verbose #18647 > > 00:34:31 verbose #18648 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:31 verbose #18649 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:31 verbose #18650 > > │ ### map │ 00:34:31 verbose #18651 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:31 verbose #18652 > > 00:34:31 verbose #18653 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:31 verbose #18654 > > inl map forall t u. (fn : t -> u) (list : list' t) : list' u = 00:34:31 verbose #18655 > > backend_switch { 00:34:31 verbose #18656 > > Fsharp = fun () => list |> $'List.map' fn : list' u 00:34:31 verbose #18657 > > Python = fun () => $'list(map(!fn, !list))' : list' u 00:34:31 verbose #18658 > > } 00:34:32 verbose #18659 > > 00:34:32 verbose #18660 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:32 verbose #18661 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:32 verbose #18662 > > │ ### unbox │ 00:34:32 verbose #18663 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:32 verbose #18664 > > 00:34:32 verbose #18665 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:32 verbose #18666 > > inl unbox forall t. (list : list' t) : list t = 00:34:32 verbose #18667 > > (list, Nil) 00:34:32 verbose #18668 > > ||> fold_back' id 00:34:32 verbose #18669 > > 00:34:32 verbose #18670 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:32 verbose #18671 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:32 verbose #18672 > > │ ### distinct' │ 00:34:32 verbose #18673 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:32 verbose #18674 > > 00:34:32 verbose #18675 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:32 verbose #18676 > > inl distinct' forall t. (list : list' t) : list' t = 00:34:32 verbose #18677 > > backend_switch { 00:34:32 verbose #18678 > > Fsharp = fun () => list |> $'List.distinct' : list' t 00:34:32 verbose #18679 > > Python = fun () => $'list(set(!list))' : list' t 00:34:32 verbose #18680 > > } 00:34:33 verbose #18681 > > 00:34:33 verbose #18682 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:33 verbose #18683 > > //// test 00:34:33 verbose #18684 > > 00:34:33 verbose #18685 > > [[ "1"; "2"; "2"; "3" ]] 00:34:33 verbose #18686 > > |> box 00:34:33 verbose #18687 > > |> distinct' 00:34:33 verbose #18688 > > |> unbox 00:34:33 verbose #18689 > > |> _assert_eq [[ "1"; "2"; "3" ]] 00:34:33 verbose #18690 > > 00:34:33 verbose #18691 > > ╭─[ 512.55ms - stdout ]────────────────────────────────────────────────────────╮ 00:34:33 verbose #18692 > > │ __assert_eq / actual: UH0_1 ("1", UH0_1 ("2", UH0_1 ("3", UH0_0))) / │ 00:34:33 verbose #18693 > > │ expected: UH0_1 ("1", UH0_1 ("2", UH0_1 ("3", UH0_0))) │ 00:34:33 verbose #18694 > > │ │ 00:34:33 verbose #18695 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:33 verbose #18696 > > 00:34:33 verbose #18697 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:33 verbose #18698 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:33 verbose #18699 > > │ ### to_array' │ 00:34:33 verbose #18700 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:33 verbose #18701 > > 00:34:33 verbose #18702 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:33 verbose #18703 > > inl to_array' forall t. (items : list' t) : array_base t = 00:34:33 verbose #18704 > > backend_switch { 00:34:33 verbose #18705 > > Fsharp = fun () => items |> $'List.toArray' : array_base t 00:34:33 verbose #18706 > > Python = fun () => $'cp.array(!items)' : array_base t 00:34:33 verbose #18707 > > } 00:34:34 verbose #18708 > 00:00:33 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 32996 } 00:34:34 verbose #18709 > 00:00:33 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:34:34 verbose #18710 > "nbconvert", 00:34:34 verbose #18711 > "c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb", 00:34:34 verbose #18712 > "--to", 00:34:34 verbose #18713 > "html", 00:34:34 verbose #18714 > "--HTMLExporter.theme=dark", 00:34:34 verbose #18715 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:34:36 verbose #18716 > 00:00:35 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb to html 00:34:36 verbose #18717 > 00:00:35 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:34:36 verbose #18718 > 00:00:35 verbose #7 ! validate(nb) 00:34:38 verbose #18719 > 00:00:37 verbose #8 ! [NbConvertApp] Writing 380373 bytes to c:\home\git\polyglot\lib\spiral\listm'.dib.html 00:34:38 verbose #18720 > 00:00:37 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 643 } 00:34:38 verbose #18721 > 00:00:37 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 643 } 00:34:38 verbose #18722 > 00:00:37 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:34:38 verbose #18723 > "-c", 00:34:38 verbose #18724 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/listm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:34:38 verbose #18725 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/listm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:34:38 verbose #18726 > 00:00:38 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:34:38 verbose #18727 > 00:00:38 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:34:38 verbose #18728 > 00:00:38 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 33698 } 00:34:38 debug #18729 runtime.execute_with_options_async / { exit_code = 0; output_length = 37930 } 00:34:38 debug #22 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path listm'.dib --retries 3 00:34:38 debug #18730 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path reflection.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:34:38 verbose #18731 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "reflection.dib", "--retries", "3"])) } 00:34:38 verbose #18732 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:34:38 verbose #18733 > "repl", 00:34:38 verbose #18734 > "--exit-after-run", 00:34:38 verbose #18735 > "--run", 00:34:38 verbose #18736 > "c:/home/git/polyglot/lib/spiral/reflection.dib", 00:34:38 verbose #18737 > "--output-path", 00:34:38 verbose #18738 > "c:/home/git/polyglot/lib/spiral/reflection.dib.ipynb", 00:34:38 verbose #18739 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/reflection.dib" --output-path "c:/home/git/polyglot/lib/spiral/reflection.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:34:40 verbose #18740 > > 00:34:40 verbose #18741 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:40 verbose #18742 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:40 verbose #18743 > > │ # reflection │ 00:34:40 verbose #18744 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:44 verbose #18745 > > 00:34:44 verbose #18746 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:44 verbose #18747 > > //// test 00:34:44 verbose #18748 > > 00:34:44 verbose #18749 > > open testing 00:34:45 verbose #18750 > > 00:34:45 verbose #18751 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:45 verbose #18752 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:45 verbose #18753 > > │ ## reflection │ 00:34:45 verbose #18754 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:45 verbose #18755 > > 00:34:45 verbose #18756 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:34:45 verbose #18757 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:34:45 verbose #18758 > > │ ### get_union_fields │ 00:34:45 verbose #18759 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:34:45 verbose #18760 > > 00:34:45 verbose #18761 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:45 verbose #18762 > > inl get_union_fields forall union_type. () : list (string * union_type) = 00:34:45 verbose #18763 > > real 00:34:45 verbose #18764 > > real_core.union_to_record 00:34:45 verbose #18765 > > `union_type 00:34:45 verbose #18766 > > forall union_record_type. => 00:34:45 verbose #18767 > > real_core.record_type_fold 00:34:45 verbose #18768 > > fun acc key => 00:34:45 verbose #18769 > > forall value. => 00:34:45 verbose #18770 > > inl value = 00:34:45 verbose #18771 > > typecase value with 00:34:45 verbose #18772 > > | () => $'' : value 00:34:45 verbose #18773 > > | _ => 00:34:45 verbose #18774 > > backend_switch `value `({}) { 00:34:45 verbose #18775 > > Fsharp = 00:34:45 verbose #18776 > > (fun () => 00:34:45 verbose #18777 > > $'Unchecked.defaultof<_>' : 00:34:45 verbose #18778 > > value 00:34:45 verbose #18779 > > ) : () -> value 00:34:45 verbose #18780 > > Python = 00:34:45 verbose #18781 > > (fun () => 00:34:45 verbose #18782 > > $'None' : value 00:34:45 verbose #18783 > > ) : () -> value 00:34:45 verbose #18784 > > } 00:34:45 verbose #18785 > > inl item = real_core.nominal_create `union_type 00:34:45 verbose #18786 > > (key, value) 00:34:45 verbose #18787 > > inl key' = sm'_real.symbol_to_string `(`key) 00:34:45 verbose #18788 > > (::) `(string * union_type) (key', item) acc 00:34:45 verbose #18789 > > (Nil `(string * union_type)) 00:34:45 verbose #18790 > > `union_record_type 00:34:46 verbose #18791 > > 00:34:46 verbose #18792 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:34:46 verbose #18793 > > //// test 00:34:46 verbose #18794 > > ///! fsharp 00:34:46 verbose #18795 > > ///! rust 00:34:46 verbose #18796 > > ///! typescript 00:34:46 verbose #18797 > > ///! python 00:34:46 verbose #18798 > > 00:34:46 verbose #18799 > > get_union_fields () 00:34:46 verbose #18800 > > |> listm'.box 00:34:46 verbose #18801 > > |> listm'.to_array' 00:34:46 verbose #18802 > > |> a 00:34:46 verbose #18803 > > |> am'.sort_by snd 00:34:46 verbose #18804 > > |> fun (a x : _ int _) => x 00:34:46 verbose #18805 > > |> _assert_eq' ;[[ "Native", Native; "Wasm", Wasm; "Contract", Contract ]] 00:35:04 verbose #18806 > > 00:35:04 verbose #18807 > > ╭─[ 18.51s - return value ]────────────────────────────────────────────────────╮ 00:35:04 verbose #18808 > > │ .rs output: │ 00:35:04 verbose #18809 > > │ __assert_eq' / actual: Array(MutCell([("Native", US0_0), ("Wasm", US0_1), │ 00:35:04 verbose #18810 > > │ ("Contract", US0_2)])) / expected: Array(MutCell([("Native", US0_0), │ 00:35:04 verbose #18811 > > │ ("Wasm", US0_1), ("Contract", US0_2)])) │ 00:35:04 verbose #18812 > > │ │ 00:35:04 verbose #18813 > > │ .ts output: │ 00:35:04 verbose #18814 > > │ __assert_eq' / actual: Native,US0_0,Wasm,US0_1,Contract,US0_2 / expected: │ 00:35:04 verbose #18815 > > │ Native,US0_0,Wasm,US0_1,Contract,US0_2 │ 00:35:04 verbose #18816 > > │ │ 00:35:04 verbose #18817 > > │ .py output: │ 00:35:04 verbose #18818 > > │ __assert_eq' / actual: [('Native', US0_0), ('Wasm', US0_1), ('Contract', │ 00:35:04 verbose #18819 > > │ US0_2)] / expected: [('Native', US0_0), ('Wasm', US0_1), ('Contract', │ 00:35:04 verbose #18820 > > │ US0_2)] │ 00:35:04 verbose #18821 > > │ │ 00:35:04 verbose #18822 > > │ │ 00:35:04 verbose #18823 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:35:04 verbose #18824 > > 00:35:04 verbose #18825 > > ╭─[ 18.52s - stdout ]──────────────────────────────────────────────────────────╮ 00:35:04 verbose #18826 > > │ .fsx output: │ 00:35:04 verbose #18827 > > │ __assert_eq' / actual: [|struct ("Native", US0_0); struct ("Wasm", US0_1); │ 00:35:04 verbose #18828 > > │ struct ("Contract", US0_2)|] / expected: [|struct ("Native", US0_0); struct │ 00:35:04 verbose #18829 > > │ ("Wasm", US0_1); struct ("Contract", US0_2)|] │ 00:35:04 verbose #18830 > > │ │ 00:35:04 verbose #18831 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:35:04 verbose #18832 > > 00:35:04 verbose #18833 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:35:04 verbose #18834 > > //// test 00:35:04 verbose #18835 > > ///! fsharp 00:35:04 verbose #18836 > > ///! rust 00:35:04 verbose #18837 > > ///! typescript 00:35:04 verbose #18838 > > ///! python 00:35:04 verbose #18839 > > 00:35:04 verbose #18840 > > get_union_fields () 00:35:04 verbose #18841 > > |> listm'.box 00:35:04 verbose #18842 > > |> listm'.to_array' 00:35:04 verbose #18843 > > |> a 00:35:04 verbose #18844 > > |> am'.sort_by snd 00:35:04 verbose #18845 > > |> fun (a x : _ int _) => x 00:35:04 verbose #18846 > > |> _assert_eq' ;[[ "Some", Some 0i32; "None", None ]] 00:35:22 verbose #18847 > > 00:35:22 verbose #18848 > > ╭─[ 17.31s - return value ]────────────────────────────────────────────────────╮ 00:35:22 verbose #18849 > > │ .rs output: │ 00:35:22 verbose #18850 > > │ __assert_eq' / actual: Array(MutCell([("Some", US0_0(0)), ("None", US0_1)])) │ 00:35:22 verbose #18851 > > │ / expected: Array(MutCell([("Some", US0_0(0)), ("None", US0_1)])) │ 00:35:22 verbose #18852 > > │ │ 00:35:22 verbose #18853 > > │ .ts output: │ 00:35:22 verbose #18854 > > │ __assert_eq' / actual: Some,US0_0 0,None,US0_1 / expected: Some,US0_0 │ 00:35:22 verbose #18855 > > │ 0,None,US0_1 │ 00:35:22 verbose #18856 > > │ │ 00:35:22 verbose #18857 > > │ .py output: │ 00:35:22 verbose #18858 > > │ __assert_eq' / actual: [('Some', US0_0 0), ('None', US0_1)] / expected: [ │ 00:35:22 verbose #18859 > > │ ('Some', US0_0 0), ('None', US0_1)] │ 00:35:22 verbose #18860 > > │ │ 00:35:22 verbose #18861 > > │ │ 00:35:22 verbose #18862 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:35:22 verbose #18863 > > 00:35:22 verbose #18864 > > ╭─[ 17.31s - stdout ]──────────────────────────────────────────────────────────╮ 00:35:22 verbose #18865 > > │ .fsx output: │ 00:35:22 verbose #18866 > > │ __assert_eq' / actual: [|struct ("Some", US0_0 0); struct ("None", US0_1)|] │ 00:35:22 verbose #18867 > > │ / expected: [|struct ("Some", US0_0 0); struct ("None", US0_1)|] │ 00:35:22 verbose #18868 > > │ │ 00:35:22 verbose #18869 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:35:22 verbose #18870 > > 00:35:22 verbose #18871 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:35:22 verbose #18872 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:35:22 verbose #18873 > > │ ### get_union_fields_untag │ 00:35:22 verbose #18874 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:35:22 verbose #18875 > > 00:35:22 verbose #18876 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:35:22 verbose #18877 > > inl get_union_fields_untag forall union_type. () : list (string * union_type) = 00:35:22 verbose #18878 > > real 00:35:22 verbose #18879 > > real_core.union_to_record 00:35:22 verbose #18880 > > `union_type 00:35:22 verbose #18881 > > forall union_record_type. => 00:35:22 verbose #18882 > > inl result = 00:35:22 verbose #18883 > > real_core.record_type_fold_back 00:35:22 verbose #18884 > > fun _key => 00:35:22 verbose #18885 > > forall value. (acc, (i : i32)) => 00:35:22 verbose #18886 > > inl key, item : (string * union_type) = 00:35:22 verbose #18887 > > real_core.union_untag `union_type i 00:35:22 verbose #18888 > > (fun key => forall value. => 00:35:22 verbose #18889 > > inl key' = sm'_real.symbol_to_string 00:35:22 verbose #18890 > > `(`key) 00:35:22 verbose #18891 > > inl value = 00:35:22 verbose #18892 > > typecase value with 00:35:22 verbose #18893 > > | () => $'' : value 00:35:22 verbose #18894 > > | _ => 00:35:22 verbose #18895 > > backend_switch `value `({}) 00:35:22 verbose #18896 > > { 00:35:22 verbose #18897 > > Fsharp = 00:35:22 verbose #18898 > > (fun () => 00:35:22 verbose #18899 > > 00:35:22 verbose #18900 > > $'Unchecked.defaultof<_>' : value 00:35:22 verbose #18901 > > ) : () -> value 00:35:22 verbose #18902 > > Python = 00:35:22 verbose #18903 > > (fun () => 00:35:22 verbose #18904 > > $'None' : value 00:35:22 verbose #18905 > > ) : () -> value 00:35:22 verbose #18906 > > } 00:35:22 verbose #18907 > > inl item = real_core.nominal_create 00:35:22 verbose #18908 > > `union_type (key, value) 00:35:22 verbose #18909 > > key', item 00:35:22 verbose #18910 > > ) 00:35:22 verbose #18911 > > (fun _ => 00:35:22 verbose #18912 > > failwith 00:35:22 verbose #18913 > > `(string * union_type) 00:35:22 verbose #18914 > > 00:35:22 verbose #18915 > > "reflection.get_union_fields_untag / invalid tag" 00:35:22 verbose #18916 > > ) 00:35:22 verbose #18917 > > (::) `(string * union_type) (key, item) acc, (+) 00:35:22 verbose #18918 > > `i32 i 1 00:35:22 verbose #18919 > > `union_record_type 00:35:22 verbose #18920 > > (Nil `(string * union_type), 0i32) 00:35:22 verbose #18921 > > inl result = fst `(list (string * union_type)) `i32 result 00:35:22 verbose #18922 > > listm.rev `(string * union_type) result 00:35:22 verbose #18923 > > 00:35:22 verbose #18924 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:35:22 verbose #18925 > > //// test 00:35:22 verbose #18926 > > ///! fsharp 00:35:22 verbose #18927 > > ///! cuda 00:35:22 verbose #18928 > > ///! rust 00:35:22 verbose #18929 > > ///! typescript 00:35:22 verbose #18930 > > ///! python 00:35:22 verbose #18931 > > 00:35:22 verbose #18932 > > get_union_fields_untag () 00:35:22 verbose #18933 > > |> _assert_eq' [[ "Native", Native; "Wasm", Wasm; "Contract", Contract ]] 00:35:40 verbose #18934 > > 00:35:40 verbose #18935 > > ╭─[ 18.19s - return value ]────────────────────────────────────────────────────╮ 00:35:40 verbose #18936 > > │ .py output (Cuda): │ 00:35:40 verbose #18937 > > │ __assert_eq' / actual: UH0_1(v0='Native', v1=US0_0(), v2=UH0_1(v0='Wasm', │ 00:35:40 verbose #18938 > > │ v1=US0_1(), v2=UH0_1(v0='Contract', v1=US0_2(), v2=UH0_0()))) / expected: │ 00:35:40 verbose #18939 > > │ UH0_1(v0='Native', v1=US0_0(), v2=UH0_1(v0='Wasm', v1=US0_1(), │ 00:35:40 verbose #18940 > > │ v2=UH0_1(v0='Contract', v1=US0_2(), v2=UH0_0()))) │ 00:35:40 verbose #18941 > > │ │ 00:35:40 verbose #18942 > > │ .rs output: │ 00:35:40 verbose #18943 > > │ __assert_eq' / actual: UH0_1("Native", US0_0, UH0_1("Wasm", US0_1, │ 00:35:40 verbose #18944 > > │ UH0_1("Contract", US0_2, UH0_0))) / expected: UH0_1("Native", US0_0, │ 00:35:40 verbose #18945 > > │ UH0_1("Wasm", US0_1, UH0_1("Contract", US0_2, UH0_0))) │ 00:35:40 verbose #18946 > > │ │ 00:35:40 verbose #18947 > > │ .ts output: │ 00:35:40 verbose #18948 > > │ __assert_eq' / actual: UH0_1 (Native, US0_0, UH0_1 (Wasm, US0_1, UH0_1 │ 00:35:40 verbose #18949 > > │ (Contract, US0_2, UH0_0))) / expected: UH0_1 (Native, US0_0, UH0_1 (Wasm, │ 00:35:40 verbose #18950 > > │ US0_1, UH0_1 (Contract, US0_2, UH0_0))) │ 00:35:40 verbose #18951 > > │ │ 00:35:40 verbose #18952 > > │ .py output: │ 00:35:40 verbose #18953 > > │ __assert_eq' / actual: UH0_1 ("Native", US0_0, UH0_1 ("Wasm", US0_1, UH0_1 │ 00:35:40 verbose #18954 > > │ ("Contract", US0_2, UH0_0))) / expected: UH0_1 ("Native", US0_0, UH0_1 │ 00:35:40 verbose #18955 > > │ ("Wasm", US0_1, UH0_1 ("Contract", US0_2, UH0_0))) │ 00:35:40 verbose #18956 > > │ │ 00:35:40 verbose #18957 > > │ │ 00:35:40 verbose #18958 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:35:40 verbose #18959 > > 00:35:40 verbose #18960 > > ╭─[ 18.19s - stdout ]──────────────────────────────────────────────────────────╮ 00:35:40 verbose #18961 > > │ .fsx output: │ 00:35:40 verbose #18962 > > │ __assert_eq' / actual: UH0_1 ("Native", US0_0, UH0_1 ("Wasm", US0_1, UH0_1 │ 00:35:40 verbose #18963 > > │ ("Contract", US0_2, UH0_0))) / expected: UH0_1 ("Native", US0_0, UH0_1 │ 00:35:40 verbose #18964 > > │ ("Wasm", US0_1, UH0_1 ("Contract", US0_2, UH0_0))) │ 00:35:40 verbose #18965 > > │ │ 00:35:40 verbose #18966 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:35:40 verbose #18967 > > 00:35:40 verbose #18968 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:35:40 verbose #18969 > > //// test 00:35:40 verbose #18970 > > ///! fsharp 00:35:40 verbose #18971 > > ///! cuda 00:35:40 verbose #18972 > > ///! rust 00:35:40 verbose #18973 > > ///! typescript 00:35:40 verbose #18974 > > ///! python 00:35:40 verbose #18975 > > 00:35:40 verbose #18976 > > get_union_fields_untag () 00:35:40 verbose #18977 > > |> _assert_eq' [[ "Some", Some (); "None", None ]] 00:35:59 verbose #18978 > > 00:35:59 verbose #18979 > > ╭─[ 18.39s - return value ]────────────────────────────────────────────────────╮ 00:35:59 verbose #18980 > > │ .py output (Cuda): │ 00:35:59 verbose #18981 > > │ __assert_eq' / actual: UH0_1(v0='Some', v1=US0_0(), v2=UH0_1(v0='None', │ 00:35:59 verbose #18982 > > │ v1=US0_1(), v2=UH0_0())) / expected: UH0_1(v0='Some', v1=US0_0(), │ 00:35:59 verbose #18983 > > │ v2=UH0_1(v0='None', v1=US0_1(), v2=UH0_0())) │ 00:35:59 verbose #18984 > > │ │ 00:35:59 verbose #18985 > > │ .rs output: │ 00:35:59 verbose #18986 > > │ __assert_eq' / actual: UH0_1("Some", US0_0, UH0_1("None", US0_1, UH0_0)) / │ 00:35:59 verbose #18987 > > │ expected: UH0_1("Some", US0_0, UH0_1("None", US0_1, UH0_0)) │ 00:35:59 verbose #18988 > > │ │ 00:35:59 verbose #18989 > > │ .ts output: │ 00:35:59 verbose #18990 > > │ __assert_eq' / actual: UH0_1 (Some, US0_0, UH0_1 (None, US0_1, UH0_0)) / │ 00:35:59 verbose #18991 > > │ expected: UH0_1 (Some, US0_0, UH0_1 (None, US0_1, UH0_0)) │ 00:35:59 verbose #18992 > > │ │ 00:35:59 verbose #18993 > > │ .py output: │ 00:35:59 verbose #18994 > > │ __assert_eq' / actual: UH0_1 ("Some", US0_0, UH0_1 ("None", US0_1, UH0_0)) / │ 00:35:59 verbose #18995 > > │ expected: UH0_1 ("Some", US0_0, UH0_1 ("None", US0_1, UH0_0)) │ 00:35:59 verbose #18996 > > │ │ 00:35:59 verbose #18997 > > │ │ 00:35:59 verbose #18998 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:35:59 verbose #18999 > > 00:35:59 verbose #19000 > > ╭─[ 18.39s - stdout ]──────────────────────────────────────────────────────────╮ 00:35:59 verbose #19001 > > │ .fsx output: │ 00:35:59 verbose #19002 > > │ __assert_eq' / actual: UH0_1 ("Some", US0_0, UH0_1 ("None", US0_1, UH0_0)) / │ 00:35:59 verbose #19003 > > │ expected: UH0_1 ("Some", US0_0, UH0_1 ("None", US0_1, UH0_0)) │ 00:35:59 verbose #19004 > > │ │ 00:35:59 verbose #19005 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:35:59 verbose #19006 > > 00:35:59 verbose #19007 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:35:59 verbose #19008 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:35:59 verbose #19009 > > │ ### union_try_pick │ 00:35:59 verbose #19010 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:35:59 verbose #19011 > > 00:35:59 verbose #19012 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:35:59 verbose #19013 > > inl union_try_pick forall t. (key : string) : option t = 00:35:59 verbose #19014 > > real get_union_fields_untag `t () 00:35:59 verbose #19015 > > |> listm'.try_pick fun key', x => 00:35:59 verbose #19016 > > if key' = key 00:35:59 verbose #19017 > > then Some x 00:35:59 verbose #19018 > > else None 00:35:59 verbose #19019 > > 00:35:59 verbose #19020 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:35:59 verbose #19021 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:35:59 verbose #19022 > > │ ### union_to_string │ 00:35:59 verbose #19023 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:35:59 verbose #19024 > > 00:35:59 verbose #19025 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:35:59 verbose #19026 > > inl union_to_string forall t. (x : t) : string = 00:35:59 verbose #19027 > > real get_union_fields_untag `t () 00:35:59 verbose #19028 > > |> listm'.try_pick fun key, x' => 00:35:59 verbose #19029 > > if x' = x 00:35:59 verbose #19030 > > then Some key 00:35:59 verbose #19031 > > else 00:35:59 verbose #19032 > > inl has_case = 00:35:59 verbose #19033 > > real 00:35:59 verbose #19034 > > real_core.union_to_record 00:35:59 verbose #19035 > > `t 00:35:59 verbose #19036 > > forall union_record_type. => 00:35:59 verbose #19037 > > real_core.record_type_fold_back 00:35:59 verbose #19038 > > fun _key => 00:35:59 verbose #19039 > > forall value. acc => 00:35:59 verbose #19040 > > if acc 00:35:59 verbose #19041 > > then acc 00:35:59 verbose #19042 > > else 00:35:59 verbose #19043 > > typecase value with 00:35:59 verbose #19044 > > | () => false 00:35:59 verbose #19045 > > | _ => true 00:35:59 verbose #19046 > > `union_record_type 00:35:59 verbose #19047 > > false 00:35:59 verbose #19048 > > if has_case |> not 00:35:59 verbose #19049 > > then None 00:35:59 verbose #19050 > > else 00:35:59 verbose #19051 > > inl separator = 00:35:59 verbose #19052 > > backend_switch { 00:35:59 verbose #19053 > > Fsharp = fun () => 00:35:59 verbose #19054 > > run_target function 00:35:59 verbose #19055 > > | Rust _ => fun () => join "(" 00:35:59 verbose #19056 > > | _ => fun () => join " " 00:35:59 verbose #19057 > > Python = fun () => "(" 00:35:59 verbose #19058 > > } 00:35:59 verbose #19059 > > inl x' = x' |> sm'.format |> sm'.split separator |> 00:35:59 verbose #19060 > > am'.index_base 0 00:35:59 verbose #19061 > > if x |> sm'.format |> sm'.starts_with x' 00:35:59 verbose #19062 > > then Some key 00:35:59 verbose #19063 > > else None 00:35:59 verbose #19064 > > |> optionm.value 00:36:00 verbose #19065 > > 00:36:00 verbose #19066 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:36:00 verbose #19067 > > //// test 00:36:00 verbose #19068 > > ///! fsharp 00:36:00 verbose #19069 > > ///! cuda 00:36:00 verbose #19070 > > ///! rust 00:36:00 verbose #19071 > > ///! typescript 00:36:00 verbose #19072 > > ///! python 00:36:00 verbose #19073 > > 00:36:00 verbose #19074 > > Some true 00:36:00 verbose #19075 > > |> union_to_string 00:36:00 verbose #19076 > > |> _assert_eq' "Some" 00:36:18 verbose #19077 > > 00:36:18 verbose #19078 > > ╭─[ 18.67s - return value ]────────────────────────────────────────────────────╮ 00:36:18 verbose #19079 > > │ .py output (Cuda): │ 00:36:18 verbose #19080 > > │ __assert_eq' / actual: Some / expected: Some │ 00:36:18 verbose #19081 > > │ │ 00:36:18 verbose #19082 > > │ .rs output: │ 00:36:18 verbose #19083 > > │ __assert_eq' / actual: "Some" / expected: "Some" │ 00:36:18 verbose #19084 > > │ │ 00:36:18 verbose #19085 > > │ .ts output: │ 00:36:18 verbose #19086 > > │ __assert_eq' / actual: Some / expected: Some │ 00:36:18 verbose #19087 > > │ │ 00:36:18 verbose #19088 > > │ .py output: │ 00:36:18 verbose #19089 > > │ __assert_eq' / actual: Some / expected: Some │ 00:36:18 verbose #19090 > > │ │ 00:36:18 verbose #19091 > > │ │ 00:36:18 verbose #19092 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:36:18 verbose #19093 > > 00:36:18 verbose #19094 > > ╭─[ 18.68s - stdout ]──────────────────────────────────────────────────────────╮ 00:36:18 verbose #19095 > > │ .fsx output: │ 00:36:18 verbose #19096 > > │ __assert_eq' / actual: "Some" / expected: "Some" │ 00:36:18 verbose #19097 > > │ │ 00:36:18 verbose #19098 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:36:18 verbose #19099 > > 00:36:18 verbose #19100 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:36:18 verbose #19101 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:36:18 verbose #19102 > > │ ### nameof │ 00:36:18 verbose #19103 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:36:18 verbose #19104 > > 00:36:18 verbose #19105 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:36:18 verbose #19106 > > inl nameof forall t. (x : t) : string = 00:36:18 verbose #19107 > > real 00:36:18 verbose #19108 > > real_core.record_type_fold_back 00:36:18 verbose #19109 > > fun key => 00:36:18 verbose #19110 > > forall value. _ => 00:36:18 verbose #19111 > > sm'_real.symbol_to_string `(`key) 00:36:18 verbose #19112 > > `t 00:36:18 verbose #19113 > > "" 00:36:19 verbose #19114 > > 00:36:19 verbose #19115 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:36:19 verbose #19116 > > //// test 00:36:19 verbose #19117 > > 00:36:19 verbose #19118 > > { test1 = ""; test2 = "" } 00:36:19 verbose #19119 > > |> nameof 00:36:19 verbose #19120 > > |> _assert_eq' "test1" 00:36:19 verbose #19121 > > 00:36:19 verbose #19122 > > ╭─[ 420.40ms - stdout ]────────────────────────────────────────────────────────╮ 00:36:19 verbose #19123 > > │ __assert_eq' / actual: "test1" / expected: "test1" │ 00:36:19 verbose #19124 > > │ │ 00:36:19 verbose #19125 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:36:19 verbose #19126 > > 00:36:19 verbose #19127 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:36:19 verbose #19128 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:36:19 verbose #19129 > > │ ### get_record_fields │ 00:36:19 verbose #19130 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:36:19 verbose #19131 > > 00:36:19 verbose #19132 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:36:19 verbose #19133 > > inl get_record_fields forall t u. (x : t) : list (string * u) = 00:36:19 verbose #19134 > > real 00:36:19 verbose #19135 > > real_core.record_type_fold_back 00:36:19 verbose #19136 > > fun key => 00:36:19 verbose #19137 > > forall u'. acc => 00:36:19 verbose #19138 > > inl k = sm'_real.symbol_to_string `(`key) 00:36:19 verbose #19139 > > inl v = x key 00:36:19 verbose #19140 > > (::) `(string * u') (k, v) acc 00:36:19 verbose #19141 > > `t 00:36:19 verbose #19142 > > (Nil `(string * u)) 00:36:19 verbose #19143 > > 00:36:19 verbose #19144 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:36:19 verbose #19145 > > //// test 00:36:19 verbose #19146 > > 00:36:19 verbose #19147 > > { a = "1"; b = "2" } 00:36:19 verbose #19148 > > |> get_record_fields 00:36:19 verbose #19149 > > |> _assert_eq' [[ "a", "1"; "b", "2" ]] 00:36:20 verbose #19150 > > 00:36:20 verbose #19151 > > ╭─[ 530.69ms - stdout ]────────────────────────────────────────────────────────╮ 00:36:20 verbose #19152 > > │ __assert_eq' / actual: UH0_1 ("a", "1", UH0_1 ("b", "2", UH0_0)) / expected: │ 00:36:20 verbose #19153 > > │ UH0_1 ("a", "1", UH0_1 ("b", "2", UH0_0)) │ 00:36:20 verbose #19154 > > │ │ 00:36:20 verbose #19155 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:36:20 verbose #19156 > > 00:36:20 verbose #19157 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:36:20 verbose #19158 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:36:20 verbose #19159 > > │ ### get_functions_types │ 00:36:20 verbose #19160 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:36:20 verbose #19161 > > 00:36:20 verbose #19162 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:36:20 verbose #19163 > > inl get_functions_types forall t {record}. (fns : t) = 00:36:20 verbose #19164 > > real 00:36:20 verbose #19165 > > inl get_function_type forall t. = 00:36:20 verbose #19166 > > inl args forall t {record}. : list (string * string) = 00:36:20 verbose #19167 > > real_core.record_type_fold_back 00:36:20 verbose #19168 > > fun key => 00:36:20 verbose #19169 > > forall v. acc => 00:36:20 verbose #19170 > > inl k = sm'_real.symbol_to_string `(`key) 00:36:20 verbose #19171 > > inl v = $'"`v"' : string 00:36:20 verbose #19172 > > (::) `(string * string) (k, v) acc 00:36:20 verbose #19173 > > `t 00:36:20 verbose #19174 > > (Nil `(string * string)) 00:36:20 verbose #19175 > > 00:36:20 verbose #19176 > > typecase t with 00:36:20 verbose #19177 > > | ~t -> ~u => args `t, ($'"`u"' : string) 00:36:20 verbose #19178 > > 00:36:20 verbose #19179 > > real_core.record_type_fold_back 00:36:20 verbose #19180 > > fun key => 00:36:20 verbose #19181 > > forall v. acc => 00:36:20 verbose #19182 > > inl k = sm'_real.symbol_to_string `(`key) 00:36:20 verbose #19183 > > inl args, result = get_function_type `v 00:36:20 verbose #19184 > > (::) `(string * (list (string * string) * string)) (k, 00:36:20 verbose #19185 > > (args, result)) acc 00:36:20 verbose #19186 > > `(`fns) 00:36:20 verbose #19187 > > (Nil `(string * (list (string * string) * string))) 00:36:20 verbose #19188 > > |> fun x => x : list (string * (list (string * string) * string)) 00:36:20 verbose #19189 > > 00:36:20 verbose #19190 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:36:20 verbose #19191 > > //// test 00:36:20 verbose #19192 > > 00:36:20 verbose #19193 > > inl one ({ a } : { a : i32 }) : i32 = a + 1 00:36:20 verbose #19194 > > inl two ({ a b } : { a : i32; b : i32 }) : i32 = a + b + 2 00:36:20 verbose #19195 > > inl fns = { one two } 00:36:20 verbose #19196 > > 00:36:20 verbose #19197 > > fns 00:36:20 verbose #19198 > > |> get_functions_types 00:36:20 verbose #19199 > > |> listm.map fun (name, args, result) => name, (args |> listm'.box |> 00:36:20 verbose #19200 > > listm'.to_array', result) 00:36:20 verbose #19201 > > |> listm'.box 00:36:20 verbose #19202 > > |> listm'.to_array' 00:36:20 verbose #19203 > > |> sm'.format 00:36:20 verbose #19204 > > |> _assert_eq' ( 00:36:20 verbose #19205 > > [[ 00:36:20 verbose #19206 > > "one", [["a", "int32"]], "int32" 00:36:20 verbose #19207 > > "two", [["a", "int32"; "b", "int32"]], "int32" 00:36:20 verbose #19208 > > ]] 00:36:20 verbose #19209 > > |> listm.map fun (name, args, result) => name, (args |> listm'.box |> 00:36:20 verbose #19210 > > listm'.to_array', result) 00:36:20 verbose #19211 > > |> listm'.box 00:36:20 verbose #19212 > > |> listm'.to_array' 00:36:20 verbose #19213 > > |> sm'.format 00:36:20 verbose #19214 > > ) 00:36:21 verbose #19215 > > 00:36:21 verbose #19216 > > ╭─[ 473.71ms - stdout ]────────────────────────────────────────────────────────╮ 00:36:21 verbose #19217 > > │ __assert_eq' / actual: "[|struct ("one", [|struct ("a", "int32")|], │ 00:36:21 verbose #19218 > > │ "int32"); │ 00:36:21 verbose #19219 > > │ struct ("two", [|struct ("a", "int32"); struct ("b", "int32")|], │ 00:36:21 verbose #19220 > > │ "int32")|]" / expected: "[|struct ("one", [|struct ("a", "int32")|], │ 00:36:21 verbose #19221 > > │ "int32"); │ 00:36:21 verbose #19222 > > │ struct ("two", [|struct ("a", "int32"); struct ("b", "int32")|], │ 00:36:21 verbose #19223 > > │ "int32")|]" │ 00:36:21 verbose #19224 > > │ │ 00:36:21 verbose #19225 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:36:21 verbose #19226 > 00:01:42 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 24693 } 00:36:21 verbose #19227 > 00:01:42 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:36:21 verbose #19228 > "nbconvert", 00:36:21 verbose #19229 > "c:/home/git/polyglot/lib/spiral/reflection.dib.ipynb", 00:36:21 verbose #19230 > "--to", 00:36:21 verbose #19231 > "html", 00:36:21 verbose #19232 > "--HTMLExporter.theme=dark", 00:36:21 verbose #19233 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/reflection.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:36:23 verbose #19234 > 00:01:44 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/reflection.dib.ipynb to html 00:36:23 verbose #19235 > 00:01:44 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:36:23 verbose #19236 > 00:01:44 verbose #7 ! validate(nb) 00:36:25 verbose #19237 > 00:01:46 verbose #8 ! [NbConvertApp] Writing 326407 bytes to c:\home\git\polyglot\lib\spiral\reflection.dib.html 00:36:25 verbose #19238 > 00:01:46 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 651 } 00:36:25 verbose #19239 > 00:01:46 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 651 } 00:36:25 verbose #19240 > 00:01:46 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:36:25 verbose #19241 > "-c", 00:36:25 verbose #19242 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/reflection.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:36:25 verbose #19243 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/reflection.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:36:26 verbose #19244 > 00:01:47 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:36:26 verbose #19245 > 00:01:47 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:36:26 verbose #19246 > 00:01:47 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 25403 } 00:36:26 debug #19247 runtime.execute_with_options_async / { exit_code = 0; output_length = 29089 } 00:36:26 debug #23 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path reflection.dib --retries 3 00:36:26 debug #19248 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path iter.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:36:26 verbose #19249 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "iter.dib", "--retries", "3"])) } 00:36:26 verbose #19250 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:36:26 verbose #19251 > "repl", 00:36:26 verbose #19252 > "--exit-after-run", 00:36:26 verbose #19253 > "--run", 00:36:26 verbose #19254 > "c:/home/git/polyglot/lib/spiral/iter.dib", 00:36:26 verbose #19255 > "--output-path", 00:36:26 verbose #19256 > "c:/home/git/polyglot/lib/spiral/iter.dib.ipynb", 00:36:26 verbose #19257 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/iter.dib" --output-path "c:/home/git/polyglot/lib/spiral/iter.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:36:28 verbose #19258 > > 00:36:28 verbose #19259 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:36:28 verbose #19260 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:36:28 verbose #19261 > > │ # iter │ 00:36:28 verbose #19262 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:36:31 verbose #19263 > > 00:36:31 verbose #19264 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:36:31 verbose #19265 > > open rust 00:36:31 verbose #19266 > > open rust_operators 00:36:33 verbose #19267 > > 00:36:33 verbose #19268 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:36:33 verbose #19269 > > //// test 00:36:33 verbose #19270 > > 00:36:33 verbose #19271 > > open testing 00:36:33 verbose #19272 > > 00:36:33 verbose #19273 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:36:33 verbose #19274 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:36:33 verbose #19275 > > │ ## rust │ 00:36:33 verbose #19276 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:36:33 verbose #19277 > > 00:36:33 verbose #19278 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:36:33 verbose #19279 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:36:33 verbose #19280 > > │ ### enumerate │ 00:36:33 verbose #19281 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:36:33 verbose #19282 > > 00:36:33 verbose #19283 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:36:33 verbose #19284 > > inl enumerate forall t. (iter : into_iterator t) : into_iterator (pair 00:36:33 verbose #19285 > > unativeint t) = 00:36:33 verbose #19286 > > !\($'"!iter.enumerate().map(std::sync::Arc::new)"') 00:36:34 verbose #19287 > > 00:36:34 verbose #19288 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:36:34 verbose #19289 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:36:34 verbose #19290 > > │ ### into_iter │ 00:36:34 verbose #19291 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:36:34 verbose #19292 > > 00:36:34 verbose #19293 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:36:34 verbose #19294 > > inl into_iter forall (t : * -> *) u. (x : t u) : into_iterator u = 00:36:34 verbose #19295 > > !\($'"!x.into_iter()"') 00:36:34 verbose #19296 > > 00:36:34 verbose #19297 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:36:34 verbose #19298 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:36:34 verbose #19299 > > │ ### iter │ 00:36:34 verbose #19300 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:36:34 verbose #19301 > > 00:36:34 verbose #19302 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:36:34 verbose #19303 > > inl iter forall (t : * -> *) u. (x : t u) : into_iterator u = 00:36:34 verbose #19304 > > !\\(x, $'"$0.iter()"') 00:36:34 verbose #19305 > > 00:36:34 verbose #19306 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:36:34 verbose #19307 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:36:34 verbose #19308 > > │ ### map │ 00:36:34 verbose #19309 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:36:34 verbose #19310 > > 00:36:34 verbose #19311 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:36:34 verbose #19312 > > inl map forall t u. (fn : t -> u) (iter : into_iterator t) : into_iterator u = 00:36:34 verbose #19313 > > !\\(fn, $'"!iter.map(|x| $0(x))"') 00:36:35 verbose #19314 > > 00:36:35 verbose #19315 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:36:35 verbose #19316 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:36:35 verbose #19317 > > │ ### cloned │ 00:36:35 verbose #19318 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:36:35 verbose #19319 > > 00:36:35 verbose #19320 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:36:35 verbose #19321 > > inl cloned forall t. (iter : into_iterator (rust.ref t)) : into_iterator t = 00:36:35 verbose #19322 > > !\($'"!iter.cloned()"') 00:36:35 verbose #19323 > > 00:36:35 verbose #19324 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:36:35 verbose #19325 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:36:35 verbose #19326 > > │ ### for_each │ 00:36:35 verbose #19327 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:36:35 verbose #19328 > > 00:36:35 verbose #19329 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:36:35 verbose #19330 > > inl for_each forall t. (fn : t -> ()) (iter : into_iterator t) : () = 00:36:35 verbose #19331 > > (!\\(fn, $'"true; !iter.for_each(|x| $0(x))"') : bool) |> ignore 00:36:36 verbose #19332 > > 00:36:36 verbose #19333 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:36:36 verbose #19334 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:36:36 verbose #19335 > > │ ### try_for_each │ 00:36:36 verbose #19336 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:36:36 verbose #19337 > > 00:36:36 verbose #19338 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:36:36 verbose #19339 > > inl try_for_each forall t. (fn : t -> rust.try ()) x : resultm.result' () string 00:36:36 verbose #19340 > > = 00:36:36 verbose #19341 > > (!\($'"true; let mut !x = !x; let _iter_try_for_each = !x.try_for_each(|x| { 00:36:36 verbose #19342 > > //"') : bool) |> ignore 00:36:36 verbose #19343 > > (!\\(fn !\($'"x"'), $'"true; $0 }); //"') : bool) |> ignore 00:36:36 verbose #19344 > > !\($'"_iter_try_for_each.map_err(|x| x.into())"') 00:36:36 verbose #19345 > > 00:36:36 verbose #19346 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:36:36 verbose #19347 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:36:36 verbose #19348 > > │ ### all │ 00:36:36 verbose #19349 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:36:36 verbose #19350 > > 00:36:36 verbose #19351 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:36:36 verbose #19352 > > inl all forall t. (fn : t -> bool) (x : rust.mut' (into_iterator t)) : bool = 00:36:36 verbose #19353 > > x |> rust.to_mut 00:36:36 verbose #19354 > > !\\(fn, $'$"!x.all(|x| $0(x))"') 00:36:37 verbose #19355 > > 00:36:37 verbose #19356 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:36:37 verbose #19357 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:36:37 verbose #19358 > > │ ### enumerate │ 00:36:37 verbose #19359 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:36:37 verbose #19360 > > 00:36:37 verbose #19361 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:36:37 verbose #19362 > > inl enumerate forall dim {int; number} t. (ar : a dim t) : a dim (unativeint * 00:36:37 verbose #19363 > > t) = 00:36:37 verbose #19364 > > inl (a ar) = ar 00:36:37 verbose #19365 > > ar 00:36:37 verbose #19366 > > |> am'.to_vec 00:36:37 verbose #19367 > > |> into_iter 00:36:37 verbose #19368 > > |> enumerate 00:36:37 verbose #19369 > > |> iter_collect 00:36:37 verbose #19370 > > |> am'.vec_map' from_pair 00:36:37 verbose #19371 > > |> am'.from_vec 00:36:37 verbose #19372 > > 00:36:37 verbose #19373 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:36:37 verbose #19374 > > //// test 00:36:37 verbose #19375 > > ///! rust 00:36:37 verbose #19376 > > 00:36:37 verbose #19377 > > am'.init_series 0i32 2 1 00:36:37 verbose #19378 > > |> fun x => a x : _ int _ 00:36:37 verbose #19379 > > |> enumerate 00:36:37 verbose #19380 > > |> fun (a x : _ int _) => x 00:36:37 verbose #19381 > > |> _assert_eq' ;[[ convert 0i32, 0; convert 1i32, 1; convert 2i32, 2 ]] 00:36:54 verbose #19382 > > 00:36:54 verbose #19383 > > ╭─[ 17.01s - return value ]────────────────────────────────────────────────────╮ 00:36:54 verbose #19384 > > │ __assert_eq' / actual: Array(MutCell([(0, 0), (1, 1), (2, 2)])) / expected: │ 00:36:54 verbose #19385 > > │ Array(MutCell([(0, 0), (1, 1), (2, 2)])) │ 00:36:54 verbose #19386 > > │ │ 00:36:54 verbose #19387 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:36:54 verbose #19388 > 00:00:28 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 6569 } 00:36:54 verbose #19389 > 00:00:28 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:36:54 verbose #19390 > "nbconvert", 00:36:54 verbose #19391 > "c:/home/git/polyglot/lib/spiral/iter.dib.ipynb", 00:36:54 verbose #19392 > "--to", 00:36:54 verbose #19393 > "html", 00:36:54 verbose #19394 > "--HTMLExporter.theme=dark", 00:36:54 verbose #19395 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/iter.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:36:56 verbose #19396 > 00:00:30 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/iter.dib.ipynb to html 00:36:56 verbose #19397 > 00:00:30 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:36:56 verbose #19398 > 00:00:30 verbose #7 ! validate(nb) 00:36:58 verbose #19399 > 00:00:32 verbose #8 ! [NbConvertApp] Writing 291880 bytes to c:\home\git\polyglot\lib\spiral\iter.dib.html 00:36:58 verbose #19400 > 00:00:32 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 639 } 00:36:58 verbose #19401 > 00:00:32 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 639 } 00:36:58 verbose #19402 > 00:00:32 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:36:58 verbose #19403 > "-c", 00:36:58 verbose #19404 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/iter.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:36:58 verbose #19405 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/iter.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:36:58 verbose #19406 > 00:00:32 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:36:58 verbose #19407 > 00:00:32 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:36:58 verbose #19408 > 00:00:32 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 7267 } 00:36:58 debug #19409 runtime.execute_with_options_async / { exit_code = 0; output_length = 10185 } 00:36:58 debug #24 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path iter.dib --retries 3 00:36:58 debug #19410 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path wasm.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:36:58 verbose #19411 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "wasm.dib", "--retries", "3"])) } 00:36:58 verbose #19412 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:36:58 verbose #19413 > "repl", 00:36:58 verbose #19414 > "--exit-after-run", 00:36:58 verbose #19415 > "--run", 00:36:58 verbose #19416 > "c:/home/git/polyglot/lib/spiral/wasm.dib", 00:36:58 verbose #19417 > "--output-path", 00:36:58 verbose #19418 > "c:/home/git/polyglot/lib/spiral/wasm.dib.ipynb", 00:36:58 verbose #19419 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/wasm.dib" --output-path "c:/home/git/polyglot/lib/spiral/wasm.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:37:00 verbose #19420 > > 00:37:00 verbose #19421 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:00 verbose #19422 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:00 verbose #19423 > > │ # wasm │ 00:37:00 verbose #19424 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:04 verbose #19425 > > 00:37:04 verbose #19426 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:04 verbose #19427 > > open rust 00:37:04 verbose #19428 > > open rust_operators 00:37:05 verbose #19429 > > 00:37:05 verbose #19430 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:05 verbose #19431 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:05 verbose #19432 > > │ ### rexie │ 00:37:05 verbose #19433 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:05 verbose #19434 > > 00:37:05 verbose #19435 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:05 verbose #19436 > > nominal rexie = 00:37:05 verbose #19437 > > `( 00:37:05 verbose #19438 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:05 verbose #19439 > > Fable.Core.Emit(\"rexie::Rexie\")>]]\n#endif\ntype rexie_Rexie = class end" 00:37:05 verbose #19440 > > $'' : $'rexie_Rexie' 00:37:05 verbose #19441 > > ) 00:37:06 verbose #19442 > > 00:37:06 verbose #19443 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:06 verbose #19444 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:06 verbose #19445 > > │ ### rexie_store │ 00:37:06 verbose #19446 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:06 verbose #19447 > > 00:37:06 verbose #19448 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:06 verbose #19449 > > nominal rexie_store = 00:37:06 verbose #19450 > > `( 00:37:06 verbose #19451 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:06 verbose #19452 > > Fable.Core.Emit(\"rexie::Store\")>]]\n#endif\ntype rexie_Store = class end" 00:37:06 verbose #19453 > > $'' : $'rexie_Store' 00:37:06 verbose #19454 > > ) 00:37:06 verbose #19455 > > 00:37:06 verbose #19456 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:06 verbose #19457 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:06 verbose #19458 > > │ ### rexie_transaction │ 00:37:06 verbose #19459 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:06 verbose #19460 > > 00:37:06 verbose #19461 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:06 verbose #19462 > > nominal rexie_transaction = 00:37:06 verbose #19463 > > `( 00:37:06 verbose #19464 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:06 verbose #19465 > > Fable.Core.Emit(\"rexie::Transaction\")>]]\n#endif\ntype rexie_Transaction = 00:37:06 verbose #19466 > > class end" 00:37:06 verbose #19467 > > $'' : $'rexie_Transaction' 00:37:06 verbose #19468 > > ) 00:37:07 verbose #19469 > > 00:37:07 verbose #19470 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:07 verbose #19471 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:07 verbose #19472 > > │ ### rexie_error │ 00:37:07 verbose #19473 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:07 verbose #19474 > > 00:37:07 verbose #19475 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:07 verbose #19476 > > nominal rexie_error = 00:37:07 verbose #19477 > > `( 00:37:07 verbose #19478 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:07 verbose #19479 > > Fable.Core.Emit(\"rexie::Error\")>]]\n#endif\ntype rexie_Error = class end" 00:37:07 verbose #19480 > > $'' : $'rexie_Error' 00:37:07 verbose #19481 > > ) 00:37:07 verbose #19482 > > 00:37:07 verbose #19483 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:07 verbose #19484 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:07 verbose #19485 > > │ ### js_value │ 00:37:07 verbose #19486 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:07 verbose #19487 > > 00:37:07 verbose #19488 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:07 verbose #19489 > > nominal js_value = 00:37:07 verbose #19490 > > `( 00:37:07 verbose #19491 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:07 verbose #19492 > > Fable.Core.Emit(\"wasm_bindgen::JsValue\")>]]\n#endif\ntype wasm_bindgen_JsValue 00:37:07 verbose #19493 > > = class end" 00:37:07 verbose #19494 > > $'' : $'wasm_bindgen_JsValue' 00:37:07 verbose #19495 > > ) 00:37:07 verbose #19496 > > 00:37:07 verbose #19497 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:07 verbose #19498 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:07 verbose #19499 > > │ ### closure │ 00:37:07 verbose #19500 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:07 verbose #19501 > > 00:37:07 verbose #19502 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:07 verbose #19503 > > nominal closure t = 00:37:07 verbose #19504 > > `( 00:37:07 verbose #19505 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:07 verbose #19506 > > Fable.Core.Emit(\"wasm_bindgen::closure::Closure<$0>\")>]]\n#endif\ntype 00:37:07 verbose #19507 > > wasm_bindgen_closure_Closure<'T> = class end" 00:37:07 verbose #19508 > > $'' : $'wasm_bindgen_closure_Closure<`t>' 00:37:07 verbose #19509 > > ) 00:37:08 verbose #19510 > > 00:37:08 verbose #19511 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:08 verbose #19512 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:08 verbose #19513 > > │ ### js_function │ 00:37:08 verbose #19514 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:08 verbose #19515 > > 00:37:08 verbose #19516 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:08 verbose #19517 > > nominal js_function = 00:37:08 verbose #19518 > > `( 00:37:08 verbose #19519 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:08 verbose #19520 > > Fable.Core.Emit(\"js_sys::Function\")>]]\n#endif\ntype js_sys_Function = class 00:37:08 verbose #19521 > > end" 00:37:08 verbose #19522 > > $'' : $'js_sys_Function' 00:37:08 verbose #19523 > > ) 00:37:08 verbose #19524 > > 00:37:08 verbose #19525 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:08 verbose #19526 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:08 verbose #19527 > > │ ### window │ 00:37:08 verbose #19528 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:08 verbose #19529 > > 00:37:08 verbose #19530 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:08 verbose #19531 > > nominal window = 00:37:08 verbose #19532 > > `( 00:37:08 verbose #19533 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:08 verbose #19534 > > Fable.Core.Emit(\"web_sys::Window\")>]]\n#endif\ntype web_sys_Window = class 00:37:08 verbose #19535 > > end" 00:37:08 verbose #19536 > > $'' : $'web_sys_Window' 00:37:08 verbose #19537 > > ) 00:37:09 verbose #19538 > > 00:37:09 verbose #19539 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:09 verbose #19540 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:09 verbose #19541 > > │ ### document │ 00:37:09 verbose #19542 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:09 verbose #19543 > > 00:37:09 verbose #19544 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:09 verbose #19545 > > nominal document = 00:37:09 verbose #19546 > > `( 00:37:09 verbose #19547 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:09 verbose #19548 > > Fable.Core.Emit(\"web_sys::Document\")>]]\n#endif\ntype web_sys_Document = class 00:37:09 verbose #19549 > > end" 00:37:09 verbose #19550 > > $'' : $'web_sys_Document' 00:37:09 verbose #19551 > > ) 00:37:09 verbose #19552 > > 00:37:09 verbose #19553 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:09 verbose #19554 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:09 verbose #19555 > > │ ### html_element │ 00:37:09 verbose #19556 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:09 verbose #19557 > > 00:37:09 verbose #19558 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:09 verbose #19559 > > nominal html_element = 00:37:09 verbose #19560 > > `( 00:37:09 verbose #19561 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:09 verbose #19562 > > Fable.Core.Emit(\"web_sys::HtmlElement\")>]]\n#endif\ntype web_sys_HtmlElement = 00:37:09 verbose #19563 > > class end" 00:37:09 verbose #19564 > > $'' : $'web_sys_HtmlElement' 00:37:09 verbose #19565 > > ) 00:37:10 verbose #19566 > > 00:37:10 verbose #19567 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:10 verbose #19568 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:10 verbose #19569 > > │ ### storage │ 00:37:10 verbose #19570 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:10 verbose #19571 > > 00:37:10 verbose #19572 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:10 verbose #19573 > > nominal storage = 00:37:10 verbose #19574 > > `( 00:37:10 verbose #19575 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:10 verbose #19576 > > Fable.Core.Emit(\"web_sys::Storage\")>]]\n#endif\ntype web_sys_Storage = class 00:37:10 verbose #19577 > > end" 00:37:10 verbose #19578 > > $'' : $'web_sys_Storage' 00:37:10 verbose #19579 > > ) 00:37:10 verbose #19580 > > 00:37:10 verbose #19581 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:10 verbose #19582 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:10 verbose #19583 > > │ ### closure_wrap │ 00:37:10 verbose #19584 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:10 verbose #19585 > > 00:37:10 verbose #19586 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:10 verbose #19587 > > inl closure_wrap forall t. (x : rust.box t) : closure t = 00:37:10 verbose #19588 > > inl x = join x 00:37:10 verbose #19589 > > !\($'"wasm_bindgen::closure::Closure::wrap(!x)"') 00:37:11 verbose #19590 > > 00:37:11 verbose #19591 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:11 verbose #19592 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:11 verbose #19593 > > │ ### closure_forget │ 00:37:11 verbose #19594 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:11 verbose #19595 > > 00:37:11 verbose #19596 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:11 verbose #19597 > > inl closure_forget forall t. (closure : closure t) = 00:37:11 verbose #19598 > > !\($'"!closure.forget()"') : () 00:37:11 verbose #19599 > > 00:37:11 verbose #19600 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:11 verbose #19601 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:11 verbose #19602 > > │ ### closure_as_ref │ 00:37:11 verbose #19603 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:11 verbose #19604 > > 00:37:11 verbose #19605 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:11 verbose #19606 > > inl closure_as_ref forall t. (closure : closure t) : rust.ref js_value = 00:37:11 verbose #19607 > > !\($'"wasm_bindgen::closure::Closure::as_ref(&!closure)"') 00:37:11 verbose #19608 > > 00:37:11 verbose #19609 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:11 verbose #19610 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:11 verbose #19611 > > │ ### unchecked_ref │ 00:37:11 verbose #19612 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:11 verbose #19613 > > 00:37:11 verbose #19614 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:11 verbose #19615 > > inl unchecked_ref (ref : rust.ref js_value) : rust.ref js_function = 00:37:11 verbose #19616 > > !\($'"wasm_bindgen::JsCast::unchecked_ref(!ref)"') 00:37:12 verbose #19617 > > 00:37:12 verbose #19618 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:12 verbose #19619 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:12 verbose #19620 > > │ ### set_inner_html │ 00:37:12 verbose #19621 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:12 verbose #19622 > > 00:37:12 verbose #19623 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:12 verbose #19624 > > inl set_inner_html (html : string) (el : html_element) = 00:37:12 verbose #19625 > > inl html = join html 00:37:12 verbose #19626 > > inl html = html |> sm'.as_str 00:37:12 verbose #19627 > > inl el = join el 00:37:12 verbose #19628 > > !\\(html, $'"!el.set_inner_html($0)"') 00:37:12 verbose #19629 > > 00:37:12 verbose #19630 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:12 verbose #19631 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:12 verbose #19632 > > │ ### from_js_value │ 00:37:12 verbose #19633 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:12 verbose #19634 > > 00:37:12 verbose #19635 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:12 verbose #19636 > > inl from_js_value (value : js_value) : resultm.result' (optionm'.option' 00:37:12 verbose #19637 > > sm'.json_value) sm'.std_string = 00:37:12 verbose #19638 > > inl value = join value 00:37:12 verbose #19639 > > !\($'"serde_wasm_bindgen::from_value(!value)"') 00:37:12 verbose #19640 > > |> resultm.map_error' fun (x : sm'.serde_wasm_bindgen_error) => x |> 00:37:12 verbose #19641 > > sm'.format' 00:37:13 verbose #19642 > 00:00:14 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 10635 } 00:37:13 verbose #19643 > 00:00:14 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:37:13 verbose #19644 > "nbconvert", 00:37:13 verbose #19645 > "c:/home/git/polyglot/lib/spiral/wasm.dib.ipynb", 00:37:13 verbose #19646 > "--to", 00:37:13 verbose #19647 > "html", 00:37:13 verbose #19648 > "--HTMLExporter.theme=dark", 00:37:13 verbose #19649 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/wasm.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:37:15 verbose #19650 > 00:00:16 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/wasm.dib.ipynb to html 00:37:15 verbose #19651 > 00:00:16 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:37:15 verbose #19652 > 00:00:16 verbose #7 ! validate(nb) 00:37:16 verbose #19653 > 00:00:18 verbose #8 ! [NbConvertApp] Writing 302243 bytes to c:\home\git\polyglot\lib\spiral\wasm.dib.html 00:37:17 verbose #19654 > 00:00:18 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 639 } 00:37:17 verbose #19655 > 00:00:18 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 639 } 00:37:17 verbose #19656 > 00:00:18 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:37:17 verbose #19657 > "-c", 00:37:17 verbose #19658 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/wasm.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:37:17 verbose #19659 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/wasm.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:37:17 verbose #19660 > 00:00:18 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:37:17 verbose #19661 > 00:00:18 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:37:17 verbose #19662 > 00:00:18 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 11333 } 00:37:17 debug #19663 runtime.execute_with_options_async / { exit_code = 0; output_length = 14437 } 00:37:17 debug #25 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path wasm.dib --retries 3 00:37:17 debug #19664 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path leptos/leptos.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:37:17 verbose #19665 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "leptos/leptos.dib", "--retries", "3"])) } 00:37:17 verbose #19666 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:37:17 verbose #19667 > "repl", 00:37:17 verbose #19668 > "--exit-after-run", 00:37:17 verbose #19669 > "--run", 00:37:17 verbose #19670 > "c:/home/git/polyglot/lib/spiral/leptos/leptos.dib", 00:37:17 verbose #19671 > "--output-path", 00:37:17 verbose #19672 > "c:/home/git/polyglot/lib/spiral/leptos/leptos.dib.ipynb", 00:37:17 verbose #19673 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/leptos/leptos.dib" --output-path "c:/home/git/polyglot/lib/spiral/leptos/leptos.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:37:19 verbose #19674 > > 00:37:19 verbose #19675 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:19 verbose #19676 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:19 verbose #19677 > > │ # leptos │ 00:37:19 verbose #19678 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:22 verbose #19679 > > 00:37:22 verbose #19680 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:22 verbose #19681 > > open rust.rust_operators 00:37:22 verbose #19682 > > open rust 00:37:22 verbose #19683 > > open sm'_operators 00:37:24 verbose #19684 > > 00:37:24 verbose #19685 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:24 verbose #19686 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:24 verbose #19687 > > │ ### a' │ 00:37:24 verbose #19688 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:24 verbose #19689 > > 00:37:24 verbose #19690 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:24 verbose #19691 > > nominal a' = 00:37:24 verbose #19692 > > `( 00:37:24 verbose #19693 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:24 verbose #19694 > > Fable.Core.Emit(\"leptos::html::A\")>]]\n#endif\ntype leptos_html_A = class end" 00:37:24 verbose #19695 > > $'' : $'leptos_html_A' 00:37:24 verbose #19696 > > ) 00:37:24 verbose #19697 > > 00:37:24 verbose #19698 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:24 verbose #19699 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:24 verbose #19700 > > │ ### event │ 00:37:24 verbose #19701 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:24 verbose #19702 > > 00:37:24 verbose #19703 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:24 verbose #19704 > > nominal event = 00:37:24 verbose #19705 > > `( 00:37:24 verbose #19706 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:24 verbose #19707 > > Fable.Core.Emit(\"leptos::ev::Event\")>]]\n#endif\ntype leptos_ev_Event = class 00:37:24 verbose #19708 > > end" 00:37:24 verbose #19709 > > $'' : $'leptos_ev_Event' 00:37:24 verbose #19710 > > ) 00:37:25 verbose #19711 > > 00:37:25 verbose #19712 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:25 verbose #19713 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:25 verbose #19714 > > │ ### mouse_event │ 00:37:25 verbose #19715 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:25 verbose #19716 > > 00:37:25 verbose #19717 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:25 verbose #19718 > > nominal mouse_event = 00:37:25 verbose #19719 > > `( 00:37:25 verbose #19720 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:25 verbose #19721 > > Fable.Core.Emit(\"leptos::ev::MouseEvent\")>]]\n#endif\ntype 00:37:25 verbose #19722 > > leptos_ev_MouseEvent = class end" 00:37:25 verbose #19723 > > $'' : $'leptos_ev_MouseEvent' 00:37:25 verbose #19724 > > ) 00:37:25 verbose #19725 > > 00:37:25 verbose #19726 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:25 verbose #19727 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:25 verbose #19728 > > │ ### button │ 00:37:25 verbose #19729 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:25 verbose #19730 > > 00:37:25 verbose #19731 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:25 verbose #19732 > > nominal button = 00:37:25 verbose #19733 > > `( 00:37:25 verbose #19734 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:25 verbose #19735 > > Fable.Core.Emit(\"leptos::html::Button\")>]]\n#endif\ntype leptos_html_Button = 00:37:25 verbose #19736 > > class end" 00:37:25 verbose #19737 > > $'' : $'leptos_html_Button' 00:37:25 verbose #19738 > > ) 00:37:25 verbose #19739 > > 00:37:25 verbose #19740 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:25 verbose #19741 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:25 verbose #19742 > > │ ### details │ 00:37:25 verbose #19743 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:25 verbose #19744 > > 00:37:25 verbose #19745 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:25 verbose #19746 > > nominal details = 00:37:25 verbose #19747 > > `( 00:37:25 verbose #19748 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:25 verbose #19749 > > Fable.Core.Emit(\"leptos::html::Details\")>]]\n#endif\ntype leptos_html_Details 00:37:25 verbose #19750 > > = class end" 00:37:25 verbose #19751 > > $'' : $'leptos_html_Details' 00:37:25 verbose #19752 > > ) 00:37:26 verbose #19753 > > 00:37:26 verbose #19754 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:26 verbose #19755 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:26 verbose #19756 > > │ ### dd │ 00:37:26 verbose #19757 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:26 verbose #19758 > > 00:37:26 verbose #19759 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:26 verbose #19760 > > nominal dd = 00:37:26 verbose #19761 > > `( 00:37:26 verbose #19762 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:26 verbose #19763 > > Fable.Core.Emit(\"leptos::html::Dd\")>]]\n#endif\ntype leptos_html_Dd = class 00:37:26 verbose #19764 > > end" 00:37:26 verbose #19765 > > $'' : $'leptos_html_Dd' 00:37:26 verbose #19766 > > ) 00:37:26 verbose #19767 > > 00:37:26 verbose #19768 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:26 verbose #19769 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:26 verbose #19770 > > │ ### div │ 00:37:26 verbose #19771 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:26 verbose #19772 > > 00:37:26 verbose #19773 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:26 verbose #19774 > > nominal div = 00:37:26 verbose #19775 > > `( 00:37:26 verbose #19776 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:26 verbose #19777 > > Fable.Core.Emit(\"leptos::html::Div\")>]]\n#endif\ntype leptos_html_Div = class 00:37:26 verbose #19778 > > end" 00:37:26 verbose #19779 > > $'' : $'leptos_html_Div' 00:37:26 verbose #19780 > > ) 00:37:27 verbose #19781 > > 00:37:27 verbose #19782 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:27 verbose #19783 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:27 verbose #19784 > > │ ### dl │ 00:37:27 verbose #19785 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:27 verbose #19786 > > 00:37:27 verbose #19787 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:27 verbose #19788 > > nominal dl = 00:37:27 verbose #19789 > > `( 00:37:27 verbose #19790 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:27 verbose #19791 > > Fable.Core.Emit(\"leptos::html::Dl\")>]]\n#endif\ntype leptos_html_Dl = class 00:37:27 verbose #19792 > > end" 00:37:27 verbose #19793 > > $'' : $'leptos_html_Dl' 00:37:27 verbose #19794 > > ) 00:37:27 verbose #19795 > > 00:37:27 verbose #19796 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:27 verbose #19797 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:27 verbose #19798 > > │ ### dt │ 00:37:27 verbose #19799 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:27 verbose #19800 > > 00:37:27 verbose #19801 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:27 verbose #19802 > > nominal dt = 00:37:27 verbose #19803 > > `( 00:37:27 verbose #19804 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:27 verbose #19805 > > Fable.Core.Emit(\"leptos::html::Dt\")>]]\n#endif\ntype leptos_html_Dt = class 00:37:27 verbose #19806 > > end" 00:37:27 verbose #19807 > > $'' : $'leptos_html_Dt' 00:37:27 verbose #19808 > > ) 00:37:27 verbose #19809 > > 00:37:27 verbose #19810 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:27 verbose #19811 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:27 verbose #19812 > > │ ### footer │ 00:37:27 verbose #19813 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:27 verbose #19814 > > 00:37:27 verbose #19815 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:27 verbose #19816 > > nominal footer = 00:37:27 verbose #19817 > > `( 00:37:27 verbose #19818 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:27 verbose #19819 > > Fable.Core.Emit(\"leptos::html::Footer\")>]]\n#endif\ntype leptos_html_Footer = 00:37:27 verbose #19820 > > class end" 00:37:27 verbose #19821 > > $'' : $'leptos_html_Footer' 00:37:27 verbose #19822 > > ) 00:37:28 verbose #19823 > > 00:37:28 verbose #19824 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:28 verbose #19825 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:28 verbose #19826 > > │ ### header │ 00:37:28 verbose #19827 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:28 verbose #19828 > > 00:37:28 verbose #19829 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:28 verbose #19830 > > nominal header = 00:37:28 verbose #19831 > > `( 00:37:28 verbose #19832 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:28 verbose #19833 > > Fable.Core.Emit(\"leptos::html::Header\")>]]\n#endif\ntype leptos_html_Header = 00:37:28 verbose #19834 > > class end" 00:37:28 verbose #19835 > > $'' : $'leptos_html_Header' 00:37:28 verbose #19836 > > ) 00:37:28 verbose #19837 > > 00:37:28 verbose #19838 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:28 verbose #19839 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:28 verbose #19840 > > │ ### input │ 00:37:28 verbose #19841 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:28 verbose #19842 > > 00:37:28 verbose #19843 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:28 verbose #19844 > > nominal input = 00:37:28 verbose #19845 > > `( 00:37:28 verbose #19846 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:28 verbose #19847 > > Fable.Core.Emit(\"leptos::html::Input\")>]]\n#endif\ntype leptos_html_Input = 00:37:28 verbose #19848 > > class end" 00:37:28 verbose #19849 > > $'' : $'leptos_html_Input' 00:37:28 verbose #19850 > > ) 00:37:29 verbose #19851 > > 00:37:29 verbose #19852 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:29 verbose #19853 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:29 verbose #19854 > > │ ### label │ 00:37:29 verbose #19855 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:29 verbose #19856 > > 00:37:29 verbose #19857 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:29 verbose #19858 > > nominal label = 00:37:29 verbose #19859 > > `( 00:37:29 verbose #19860 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:29 verbose #19861 > > Fable.Core.Emit(\"leptos::html::Label\")>]]\n#endif\ntype leptos_html_Label = 00:37:29 verbose #19862 > > class end" 00:37:29 verbose #19863 > > $'' : $'leptos_html_Label' 00:37:29 verbose #19864 > > ) 00:37:29 verbose #19865 > > 00:37:29 verbose #19866 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:29 verbose #19867 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:29 verbose #19868 > > │ ### main │ 00:37:29 verbose #19869 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:29 verbose #19870 > > 00:37:29 verbose #19871 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:29 verbose #19872 > > nominal main = 00:37:29 verbose #19873 > > `( 00:37:29 verbose #19874 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:29 verbose #19875 > > Fable.Core.Emit(\"leptos::html::Main\")>]]\n#endif\ntype leptos_html_Main = 00:37:29 verbose #19876 > > class end" 00:37:29 verbose #19877 > > $'' : $'leptos_html_Main' 00:37:29 verbose #19878 > > ) 00:37:30 verbose #19879 > > 00:37:30 verbose #19880 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:30 verbose #19881 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:30 verbose #19882 > > │ ### nav │ 00:37:30 verbose #19883 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:30 verbose #19884 > > 00:37:30 verbose #19885 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:30 verbose #19886 > > nominal nav = 00:37:30 verbose #19887 > > `( 00:37:30 verbose #19888 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:30 verbose #19889 > > Fable.Core.Emit(\"leptos::html::Nav\")>]]\n#endif\ntype leptos_html_Nav = class 00:37:30 verbose #19890 > > end" 00:37:30 verbose #19891 > > $'' : $'leptos_html_Nav' 00:37:30 verbose #19892 > > ) 00:37:30 verbose #19893 > > 00:37:30 verbose #19894 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:30 verbose #19895 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:30 verbose #19896 > > │ ### option' │ 00:37:30 verbose #19897 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:30 verbose #19898 > > 00:37:30 verbose #19899 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:30 verbose #19900 > > nominal option' = 00:37:30 verbose #19901 > > `( 00:37:30 verbose #19902 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:30 verbose #19903 > > Fable.Core.Emit(\"leptos::html::Option_\")>]]\n#endif\ntype leptos_html_Option = 00:37:30 verbose #19904 > > class end" 00:37:30 verbose #19905 > > $'' : $'leptos_html_Option' 00:37:30 verbose #19906 > > ) 00:37:30 verbose #19907 > > 00:37:30 verbose #19908 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:30 verbose #19909 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:30 verbose #19910 > > │ ### pre │ 00:37:30 verbose #19911 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:30 verbose #19912 > > 00:37:30 verbose #19913 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:30 verbose #19914 > > nominal pre = 00:37:30 verbose #19915 > > `( 00:37:30 verbose #19916 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:30 verbose #19917 > > Fable.Core.Emit(\"leptos::html::Pre\")>]]\n#endif\ntype leptos_html_Pre = class 00:37:30 verbose #19918 > > end" 00:37:30 verbose #19919 > > $'' : $'leptos_html_Pre' 00:37:30 verbose #19920 > > ) 00:37:31 verbose #19921 > > 00:37:31 verbose #19922 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:31 verbose #19923 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:31 verbose #19924 > > │ ### select │ 00:37:31 verbose #19925 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:31 verbose #19926 > > 00:37:31 verbose #19927 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:31 verbose #19928 > > nominal select = 00:37:31 verbose #19929 > > `( 00:37:31 verbose #19930 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:31 verbose #19931 > > Fable.Core.Emit(\"leptos::html::Select\")>]]\n#endif\ntype leptos_html_Select = 00:37:31 verbose #19932 > > class end" 00:37:31 verbose #19933 > > $'' : $'leptos_html_Select' 00:37:31 verbose #19934 > > ) 00:37:31 verbose #19935 > > 00:37:31 verbose #19936 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:31 verbose #19937 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:31 verbose #19938 > > │ ### span │ 00:37:31 verbose #19939 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:31 verbose #19940 > > 00:37:31 verbose #19941 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:31 verbose #19942 > > nominal span = 00:37:31 verbose #19943 > > `( 00:37:31 verbose #19944 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:31 verbose #19945 > > Fable.Core.Emit(\"leptos::html::Span\")>]]\n#endif\ntype leptos_html_Span = 00:37:31 verbose #19946 > > class end" 00:37:31 verbose #19947 > > $'' : $'leptos_html_Span' 00:37:31 verbose #19948 > > ) 00:37:32 verbose #19949 > > 00:37:32 verbose #19950 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:32 verbose #19951 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:32 verbose #19952 > > │ ### summary │ 00:37:32 verbose #19953 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:32 verbose #19954 > > 00:37:32 verbose #19955 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:32 verbose #19956 > > nominal summary = 00:37:32 verbose #19957 > > `( 00:37:32 verbose #19958 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:32 verbose #19959 > > Fable.Core.Emit(\"leptos::html::Summary\")>]]\n#endif\ntype leptos_html_Summary 00:37:32 verbose #19960 > > = class end" 00:37:32 verbose #19961 > > $'' : $'leptos_html_Summary' 00:37:32 verbose #19962 > > ) 00:37:32 verbose #19963 > > 00:37:32 verbose #19964 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:32 verbose #19965 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:32 verbose #19966 > > │ ### table │ 00:37:32 verbose #19967 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:32 verbose #19968 > > 00:37:32 verbose #19969 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:32 verbose #19970 > > nominal table = 00:37:32 verbose #19971 > > `( 00:37:32 verbose #19972 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:32 verbose #19973 > > Fable.Core.Emit(\"leptos::html::Table\")>]]\n#endif\ntype leptos_html_Table = 00:37:32 verbose #19974 > > class end" 00:37:32 verbose #19975 > > $'' : $'leptos_html_Table' 00:37:32 verbose #19976 > > ) 00:37:33 verbose #19977 > > 00:37:33 verbose #19978 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:33 verbose #19979 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:33 verbose #19980 > > │ ### thead │ 00:37:33 verbose #19981 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:33 verbose #19982 > > 00:37:33 verbose #19983 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:33 verbose #19984 > > nominal thead = 00:37:33 verbose #19985 > > `( 00:37:33 verbose #19986 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:33 verbose #19987 > > Fable.Core.Emit(\"leptos::html::Thead\")>]]\n#endif\ntype leptos_html_Thead = 00:37:33 verbose #19988 > > class end" 00:37:33 verbose #19989 > > $'' : $'leptos_html_Thead' 00:37:33 verbose #19990 > > ) 00:37:33 verbose #19991 > > 00:37:33 verbose #19992 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:33 verbose #19993 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:33 verbose #19994 > > │ ### tbody │ 00:37:33 verbose #19995 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:33 verbose #19996 > > 00:37:33 verbose #19997 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:33 verbose #19998 > > nominal tbody = 00:37:33 verbose #19999 > > `( 00:37:33 verbose #20000 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:33 verbose #20001 > > Fable.Core.Emit(\"leptos::html::Tbody\")>]]\n#endif\ntype leptos_html_Tbody = 00:37:33 verbose #20002 > > class end" 00:37:33 verbose #20003 > > $'' : $'leptos_html_Tbody' 00:37:33 verbose #20004 > > ) 00:37:33 verbose #20005 > > 00:37:33 verbose #20006 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:33 verbose #20007 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:33 verbose #20008 > > │ ### tr │ 00:37:33 verbose #20009 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:33 verbose #20010 > > 00:37:33 verbose #20011 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:33 verbose #20012 > > nominal tr = 00:37:33 verbose #20013 > > `( 00:37:33 verbose #20014 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:33 verbose #20015 > > Fable.Core.Emit(\"leptos::html::Tr\")>]]\n#endif\ntype leptos_html_Tr = class 00:37:33 verbose #20016 > > end" 00:37:33 verbose #20017 > > $'' : $'leptos_html_Tr' 00:37:33 verbose #20018 > > ) 00:37:34 verbose #20019 > > 00:37:34 verbose #20020 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:34 verbose #20021 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:34 verbose #20022 > > │ ### th │ 00:37:34 verbose #20023 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:34 verbose #20024 > > 00:37:34 verbose #20025 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:34 verbose #20026 > > nominal th = 00:37:34 verbose #20027 > > `( 00:37:34 verbose #20028 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:34 verbose #20029 > > Fable.Core.Emit(\"leptos::html::Th\")>]]\n#endif\ntype leptos_html_Th = class 00:37:34 verbose #20030 > > end" 00:37:34 verbose #20031 > > $'' : $'leptos_html_Th' 00:37:34 verbose #20032 > > ) 00:37:34 verbose #20033 > > 00:37:34 verbose #20034 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:34 verbose #20035 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:34 verbose #20036 > > │ ### td │ 00:37:34 verbose #20037 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:34 verbose #20038 > > 00:37:34 verbose #20039 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:34 verbose #20040 > > nominal td = 00:37:34 verbose #20041 > > `( 00:37:34 verbose #20042 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:34 verbose #20043 > > Fable.Core.Emit(\"leptos::html::Td\")>]]\n#endif\ntype leptos_html_Td = class 00:37:34 verbose #20044 > > end" 00:37:34 verbose #20045 > > $'' : $'leptos_html_Td' 00:37:34 verbose #20046 > > ) 00:37:35 verbose #20047 > > 00:37:35 verbose #20048 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:35 verbose #20049 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:35 verbose #20050 > > │ ### svg │ 00:37:35 verbose #20051 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:35 verbose #20052 > > 00:37:35 verbose #20053 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:35 verbose #20054 > > nominal svg = 00:37:35 verbose #20055 > > `( 00:37:35 verbose #20056 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:35 verbose #20057 > > Fable.Core.Emit(\"leptos::svg::Svg\")>]]\n#endif\ntype leptos_svg_Svg = class 00:37:35 verbose #20058 > > end" 00:37:35 verbose #20059 > > $'' : $'leptos_svg_Svg' 00:37:35 verbose #20060 > > ) 00:37:35 verbose #20061 > > 00:37:35 verbose #20062 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:35 verbose #20063 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:35 verbose #20064 > > │ ### path │ 00:37:35 verbose #20065 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:35 verbose #20066 > > 00:37:35 verbose #20067 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:35 verbose #20068 > > nominal path = 00:37:35 verbose #20069 > > `( 00:37:35 verbose #20070 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:35 verbose #20071 > > Fable.Core.Emit(\"leptos::svg::Path\")>]]\n#endif\ntype leptos_svg_Path = class 00:37:35 verbose #20072 > > end" 00:37:35 verbose #20073 > > $'' : $'leptos_svg_Path' 00:37:35 verbose #20074 > > ) 00:37:36 verbose #20075 > > 00:37:36 verbose #20076 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:36 verbose #20077 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:36 verbose #20078 > > │ ### circle │ 00:37:36 verbose #20079 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:36 verbose #20080 > > 00:37:36 verbose #20081 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:36 verbose #20082 > > nominal circle = 00:37:36 verbose #20083 > > `( 00:37:36 verbose #20084 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:36 verbose #20085 > > Fable.Core.Emit(\"leptos::svg::Circle\")>]]\n#endif\ntype leptos_svg_Circle = 00:37:36 verbose #20086 > > class end" 00:37:36 verbose #20087 > > $'' : $'leptos_svg_Circle' 00:37:36 verbose #20088 > > ) 00:37:36 verbose #20089 > > 00:37:36 verbose #20090 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:36 verbose #20091 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:36 verbose #20092 > > │ ### rect │ 00:37:36 verbose #20093 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:36 verbose #20094 > > 00:37:36 verbose #20095 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:36 verbose #20096 > > nominal rect = 00:37:36 verbose #20097 > > `( 00:37:36 verbose #20098 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:36 verbose #20099 > > Fable.Core.Emit(\"leptos::svg::Rect\")>]]\n#endif\ntype leptos_svg_Rect = class 00:37:36 verbose #20100 > > end" 00:37:36 verbose #20101 > > $'' : $'leptos_svg_Rect' 00:37:36 verbose #20102 > > ) 00:37:37 verbose #20103 > > 00:37:37 verbose #20104 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:37 verbose #20105 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:37 verbose #20106 > > │ ### animate │ 00:37:37 verbose #20107 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:37 verbose #20108 > > 00:37:37 verbose #20109 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:37 verbose #20110 > > nominal animate = 00:37:37 verbose #20111 > > `( 00:37:37 verbose #20112 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:37 verbose #20113 > > Fable.Core.Emit(\"leptos::svg::Animate\")>]]\n#endif\ntype leptos_svg_Animate = 00:37:37 verbose #20114 > > class end" 00:37:37 verbose #20115 > > $'' : $'leptos_svg_Animate' 00:37:37 verbose #20116 > > ) 00:37:37 verbose #20117 > > 00:37:37 verbose #20118 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:37 verbose #20119 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:37 verbose #20120 > > │ ### action │ 00:37:37 verbose #20121 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:37 verbose #20122 > > 00:37:37 verbose #20123 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:37 verbose #20124 > > nominal action t u = 00:37:37 verbose #20125 > > `( 00:37:37 verbose #20126 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:37 verbose #20127 > > Fable.Core.Emit(\"leptos::Action<$0, $1>\")>]]\n#endif\ntype leptos_Action<'T, 00:37:37 verbose #20128 > > 'U> = class end" 00:37:37 verbose #20129 > > $'' : $'leptos_Action<`t, `u>' 00:37:37 verbose #20130 > > ) 00:37:37 verbose #20131 > > 00:37:37 verbose #20132 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:37 verbose #20133 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:37 verbose #20134 > > │ ### for │ 00:37:37 verbose #20135 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:37 verbose #20136 > > 00:37:37 verbose #20137 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:37 verbose #20138 > > nominal for = 00:37:37 verbose #20139 > > `( 00:37:37 verbose #20140 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:37 verbose #20141 > > Fable.Core.Emit(\"leptos::For\")>]]\n#endif\ntype leptos_For = class end" 00:37:37 verbose #20142 > > $'' : $'leptos_For' 00:37:37 verbose #20143 > > ) 00:37:38 verbose #20144 > > 00:37:38 verbose #20145 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:38 verbose #20146 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:38 verbose #20147 > > │ ### show │ 00:37:38 verbose #20148 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:38 verbose #20149 > > 00:37:38 verbose #20150 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:38 verbose #20151 > > nominal show = 00:37:38 verbose #20152 > > `( 00:37:38 verbose #20153 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:38 verbose #20154 > > Fable.Core.Emit(\"leptos::Show\")>]]\n#endif\ntype leptos_Show = class end" 00:37:38 verbose #20155 > > $'' : $'leptos_Show' 00:37:38 verbose #20156 > > ) 00:37:38 verbose #20157 > > 00:37:38 verbose #20158 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:38 verbose #20159 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:38 verbose #20160 > > │ ### fragment │ 00:37:38 verbose #20161 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:38 verbose #20162 > > 00:37:38 verbose #20163 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:38 verbose #20164 > > nominal fragment = 00:37:38 verbose #20165 > > `( 00:37:38 verbose #20166 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:38 verbose #20167 > > Fable.Core.Emit(\"leptos::Fragment\")>]]\n#endif\ntype leptos_Fragment = class 00:37:38 verbose #20168 > > end" 00:37:38 verbose #20169 > > $'' : $'leptos_Fragment' 00:37:38 verbose #20170 > > ) 00:37:39 verbose #20171 > > 00:37:39 verbose #20172 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:39 verbose #20173 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:39 verbose #20174 > > │ ### interval_handle │ 00:37:39 verbose #20175 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:39 verbose #20176 > > 00:37:39 verbose #20177 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:39 verbose #20178 > > nominal interval_handle = 00:37:39 verbose #20179 > > `( 00:37:39 verbose #20180 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:39 verbose #20181 > > Fable.Core.Emit(\"leptos::leptos_dom::helpers::IntervalHandle\")>]]\n#endif\ntyp 00:37:39 verbose #20182 > > e leptos_dom_IntervalHandle = class end" 00:37:39 verbose #20183 > > $'' : $'leptos_dom_IntervalHandle' 00:37:39 verbose #20184 > > ) 00:37:39 verbose #20185 > > 00:37:39 verbose #20186 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:39 verbose #20187 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:39 verbose #20188 > > │ ### text │ 00:37:39 verbose #20189 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:39 verbose #20190 > > 00:37:39 verbose #20191 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:39 verbose #20192 > > nominal text = 00:37:39 verbose #20193 > > `( 00:37:39 verbose #20194 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:39 verbose #20195 > > Fable.Core.Emit(\"leptos::leptos_dom::Text\")>]]\n#endif\ntype leptos_dom_Text = 00:37:39 verbose #20196 > > class end" 00:37:39 verbose #20197 > > $'' : $'leptos_dom_Text' 00:37:39 verbose #20198 > > ) 00:37:40 verbose #20199 > > 00:37:40 verbose #20200 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:40 verbose #20201 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:40 verbose #20202 > > │ ### transparent │ 00:37:40 verbose #20203 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:40 verbose #20204 > > 00:37:40 verbose #20205 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:40 verbose #20206 > > nominal transparent = 00:37:40 verbose #20207 > > `( 00:37:40 verbose #20208 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:40 verbose #20209 > > Fable.Core.Emit(\"leptos::leptos_dom::Transparent\")>]]\n#endif\ntype 00:37:40 verbose #20210 > > leptos_dom_Transparent = class end" 00:37:40 verbose #20211 > > $'' : $'leptos_dom_Transparent' 00:37:40 verbose #20212 > > ) 00:37:40 verbose #20213 > > 00:37:40 verbose #20214 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:40 verbose #20215 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:40 verbose #20216 > > │ ### route │ 00:37:40 verbose #20217 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:40 verbose #20218 > > 00:37:40 verbose #20219 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:40 verbose #20220 > > nominal route = 00:37:40 verbose #20221 > > `( 00:37:40 verbose #20222 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:40 verbose #20223 > > Fable.Core.Emit(\"leptos_router::Route\")>]]\n#endif\ntype leptos_router_Route = 00:37:40 verbose #20224 > > class end" 00:37:40 verbose #20225 > > $'' : $'leptos_router_Route' 00:37:40 verbose #20226 > > ) 00:37:40 verbose #20227 > > 00:37:40 verbose #20228 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:40 verbose #20229 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:40 verbose #20230 > > │ ### route_definition │ 00:37:40 verbose #20231 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:40 verbose #20232 > > 00:37:40 verbose #20233 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:40 verbose #20234 > > nominal route_definition = 00:37:40 verbose #20235 > > `( 00:37:40 verbose #20236 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:40 verbose #20237 > > Fable.Core.Emit(\"leptos_router::RouteDefinition\")>]]\n#endif\ntype 00:37:40 verbose #20238 > > leptos_router_RouteDefinition = class end" 00:37:40 verbose #20239 > > $'' : $'leptos_router_RouteDefinition' 00:37:40 verbose #20240 > > ) 00:37:41 verbose #20241 > > 00:37:41 verbose #20242 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:41 verbose #20243 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:41 verbose #20244 > > │ ### router │ 00:37:41 verbose #20245 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:41 verbose #20246 > > 00:37:41 verbose #20247 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:41 verbose #20248 > > nominal router = 00:37:41 verbose #20249 > > `( 00:37:41 verbose #20250 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:41 verbose #20251 > > Fable.Core.Emit(\"leptos_router::Router\")>]]\n#endif\ntype leptos_router_Router 00:37:41 verbose #20252 > > = class end" 00:37:41 verbose #20253 > > $'' : $'leptos_router_Router' 00:37:41 verbose #20254 > > ) 00:37:41 verbose #20255 > > 00:37:41 verbose #20256 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:41 verbose #20257 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:41 verbose #20258 > > │ ### routes │ 00:37:41 verbose #20259 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:41 verbose #20260 > > 00:37:41 verbose #20261 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:41 verbose #20262 > > nominal routes = 00:37:41 verbose #20263 > > `( 00:37:41 verbose #20264 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:41 verbose #20265 > > Fable.Core.Emit(\"leptos_router::Routes\")>]]\n#endif\ntype leptos_router_Routes 00:37:41 verbose #20266 > > = class end" 00:37:41 verbose #20267 > > $'' : $'leptos_router_Routes' 00:37:41 verbose #20268 > > ) 00:37:42 verbose #20269 > > 00:37:42 verbose #20270 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:42 verbose #20271 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:42 verbose #20272 > > │ ### html_element │ 00:37:42 verbose #20273 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:42 verbose #20274 > > 00:37:42 verbose #20275 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:42 verbose #20276 > > nominal html_element t = 00:37:42 verbose #20277 > > `( 00:37:42 verbose #20278 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:42 verbose #20279 > > Fable.Core.Emit(\"leptos::HtmlElement<$0>\")>]]\n#endif\ntype 00:37:42 verbose #20280 > > leptos_HtmlElement<'T> = class end" 00:37:42 verbose #20281 > > $'' : $'leptos_HtmlElement<`t>' 00:37:42 verbose #20282 > > ) 00:37:42 verbose #20283 > > 00:37:42 verbose #20284 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:42 verbose #20285 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:42 verbose #20286 > > │ ### into_view │ 00:37:42 verbose #20287 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:42 verbose #20288 > > 00:37:42 verbose #20289 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:42 verbose #20290 > > nominal into_view = 00:37:42 verbose #20291 > > `( 00:37:42 verbose #20292 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:42 verbose #20293 > > Fable.Core.Emit(\"leptos::IntoView\")>]]\n#endif\ntype leptos_IntoView = class 00:37:42 verbose #20294 > > end" 00:37:42 verbose #20295 > > $'' : $'leptos_IntoView' 00:37:42 verbose #20296 > > ) 00:37:43 verbose #20297 > > 00:37:43 verbose #20298 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:43 verbose #20299 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:43 verbose #20300 > > │ ### location │ 00:37:43 verbose #20301 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:43 verbose #20302 > > 00:37:43 verbose #20303 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:43 verbose #20304 > > nominal location = 00:37:43 verbose #20305 > > `( 00:37:43 verbose #20306 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:43 verbose #20307 > > Fable.Core.Emit(\"leptos_router::Location\")>]]\n#endif\ntype 00:37:43 verbose #20308 > > leptos_router_Location = class end" 00:37:43 verbose #20309 > > $'' : $'leptos_router_Location' 00:37:43 verbose #20310 > > ) 00:37:43 verbose #20311 > > 00:37:43 verbose #20312 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:43 verbose #20313 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:43 verbose #20314 > > │ ### navigate_options │ 00:37:43 verbose #20315 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:43 verbose #20316 > > 00:37:43 verbose #20317 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:43 verbose #20318 > > nominal navigate_options = 00:37:43 verbose #20319 > > `( 00:37:43 verbose #20320 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:43 verbose #20321 > > Fable.Core.Emit(\"leptos_router::NavigateOptions\")>]]\n#endif\ntype 00:37:43 verbose #20322 > > leptos_router_NavigateOptions = class end" 00:37:43 verbose #20323 > > $'' : $'leptos_router_NavigateOptions' 00:37:43 verbose #20324 > > ) 00:37:43 verbose #20325 > > 00:37:43 verbose #20326 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:43 verbose #20327 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:43 verbose #20328 > > │ ### url │ 00:37:43 verbose #20329 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:43 verbose #20330 > > 00:37:43 verbose #20331 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:43 verbose #20332 > > nominal url = 00:37:43 verbose #20333 > > `( 00:37:43 verbose #20334 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:43 verbose #20335 > > Fable.Core.Emit(\"leptos_router::Url\")>]]\n#endif\ntype leptos_router_Url = 00:37:43 verbose #20336 > > class end" 00:37:43 verbose #20337 > > $'' : $'leptos_router_Url' 00:37:43 verbose #20338 > > ) 00:37:44 verbose #20339 > > 00:37:44 verbose #20340 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:44 verbose #20341 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:44 verbose #20342 > > │ ### memo │ 00:37:44 verbose #20343 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:44 verbose #20344 > > 00:37:44 verbose #20345 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:44 verbose #20346 > > nominal memo t = 00:37:44 verbose #20347 > > `( 00:37:44 verbose #20348 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:44 verbose #20349 > > Fable.Core.Emit(\"leptos::Memo<$0>\")>]]\n#endif\ntype leptos_Memo<'T> = class 00:37:44 verbose #20350 > > end" 00:37:44 verbose #20351 > > $'' : $'leptos_Memo<`t>' 00:37:44 verbose #20352 > > ) 00:37:44 verbose #20353 > > 00:37:44 verbose #20354 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:44 verbose #20355 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:44 verbose #20356 > > │ ### rw_signal │ 00:37:44 verbose #20357 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:44 verbose #20358 > > 00:37:44 verbose #20359 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:44 verbose #20360 > > nominal rw_signal t = 00:37:44 verbose #20361 > > `( 00:37:44 verbose #20362 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:44 verbose #20363 > > Fable.Core.Emit(\"leptos::RwSignal<$0>\")>]]\n#endif\ntype leptos_RwSignal<'T> = 00:37:44 verbose #20364 > > class end" 00:37:44 verbose #20365 > > $'' : $'leptos_RwSignal<`t>' 00:37:44 verbose #20366 > > ) 00:37:45 verbose #20367 > > 00:37:45 verbose #20368 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:45 verbose #20369 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:45 verbose #20370 > > │ ### signal │ 00:37:45 verbose #20371 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:45 verbose #20372 > > 00:37:45 verbose #20373 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:45 verbose #20374 > > nominal signal t = 00:37:45 verbose #20375 > > `( 00:37:45 verbose #20376 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:45 verbose #20377 > > Fable.Core.Emit(\"leptos::Signal<$0>\")>]]\n#endif\ntype leptos_Signal<'T> = 00:37:45 verbose #20378 > > class end" 00:37:45 verbose #20379 > > $'' : $'leptos_Signal<`t>' 00:37:45 verbose #20380 > > ) 00:37:45 verbose #20381 > > 00:37:45 verbose #20382 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:45 verbose #20383 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:45 verbose #20384 > > │ ### read_signal │ 00:37:45 verbose #20385 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:45 verbose #20386 > > 00:37:45 verbose #20387 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:45 verbose #20388 > > nominal read_signal t = 00:37:45 verbose #20389 > > `( 00:37:45 verbose #20390 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:45 verbose #20391 > > Fable.Core.Emit(\"leptos::ReadSignal<$0>\")>]]\n#endif\ntype 00:37:45 verbose #20392 > > leptos_ReadSignal<'T> = class end" 00:37:45 verbose #20393 > > $'' : $'leptos_ReadSignal<`t>' 00:37:45 verbose #20394 > > ) 00:37:46 verbose #20395 > > 00:37:46 verbose #20396 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:46 verbose #20397 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:46 verbose #20398 > > │ ### write_signal │ 00:37:46 verbose #20399 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:46 verbose #20400 > > 00:37:46 verbose #20401 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:46 verbose #20402 > > nominal write_signal t = 00:37:46 verbose #20403 > > `( 00:37:46 verbose #20404 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:46 verbose #20405 > > Fable.Core.Emit(\"leptos::WriteSignal<$0>\")>]]\n#endif\ntype 00:37:46 verbose #20406 > > leptos_WriteSignal<'T> = class end" 00:37:46 verbose #20407 > > $'' : $'leptos_WriteSignal<`t>' 00:37:46 verbose #20408 > > ) 00:37:46 verbose #20409 > > 00:37:46 verbose #20410 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:46 verbose #20411 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:46 verbose #20412 > > │ ### resource │ 00:37:46 verbose #20413 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:46 verbose #20414 > > 00:37:46 verbose #20415 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:46 verbose #20416 > > nominal resource t u = 00:37:46 verbose #20417 > > `( 00:37:46 verbose #20418 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:46 verbose #20419 > > Fable.Core.Emit(\"leptos::Resource<$0, $1>\")>]]\n#endif\ntype 00:37:46 verbose #20420 > > leptos_Resource<'T, 'U> = class end" 00:37:46 verbose #20421 > > $'' : $'leptos_Resource<`t, `u>' 00:37:46 verbose #20422 > > ) 00:37:46 verbose #20423 > > 00:37:46 verbose #20424 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:46 verbose #20425 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:46 verbose #20426 > > │ ### view │ 00:37:46 verbose #20427 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:46 verbose #20428 > > 00:37:46 verbose #20429 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:46 verbose #20430 > > nominal view = 00:37:46 verbose #20431 > > `( 00:37:46 verbose #20432 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:37:46 verbose #20433 > > Fable.Core.Emit(\"leptos::View\")>]]\n#endif\ntype leptos_View = class end" 00:37:46 verbose #20434 > > $'' : $'leptos_View' 00:37:46 verbose #20435 > > ) 00:37:47 verbose #20436 > > 00:37:47 verbose #20437 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:47 verbose #20438 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:47 verbose #20439 > > │ ### signal_get │ 00:37:47 verbose #20440 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:47 verbose #20441 > > 00:37:47 verbose #20442 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:47 verbose #20443 > > prototype signal_get signal t : signal t -> t 00:37:47 verbose #20444 > > 00:37:47 verbose #20445 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:47 verbose #20446 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:47 verbose #20447 > > │ ### signal_get_untracked │ 00:37:47 verbose #20448 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:47 verbose #20449 > > 00:37:47 verbose #20450 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:47 verbose #20451 > > prototype signal_get_untracked signal t : signal t -> t 00:37:48 verbose #20452 > > 00:37:48 verbose #20453 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:48 verbose #20454 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:48 verbose #20455 > > │ ### signal_update │ 00:37:48 verbose #20456 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:48 verbose #20457 > > 00:37:48 verbose #20458 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:48 verbose #20459 > > prototype signal_update signal t : (t -> t) -> signal t -> () 00:37:48 verbose #20460 > > 00:37:48 verbose #20461 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:48 verbose #20462 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:48 verbose #20463 > > │ ### signal_set │ 00:37:48 verbose #20464 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:48 verbose #20465 > > 00:37:48 verbose #20466 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:48 verbose #20467 > > prototype signal_set signal t : t -> signal t -> () 00:37:48 verbose #20468 > > 00:37:48 verbose #20469 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:48 verbose #20470 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:48 verbose #20471 > > │ ### log_string │ 00:37:48 verbose #20472 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:48 verbose #20473 > > 00:37:48 verbose #20474 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:48 verbose #20475 > > inl log_string (text : string) = 00:37:48 verbose #20476 > > (!\($'@@"true; leptos::logging::log\!(""" + !text + @@""");"') : bool) |> 00:37:48 verbose #20477 > > ignore 00:37:49 verbose #20478 > > 00:37:49 verbose #20479 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:49 verbose #20480 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:49 verbose #20481 > > │ ### log │ 00:37:49 verbose #20482 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:49 verbose #20483 > > 00:37:49 verbose #20484 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:49 verbose #20485 > > inl log (text : string) = 00:37:49 verbose #20486 > > (!\\(text, $'@@$"true; leptos::logging::log\!(""{{}}"", $0)"') : bool) |> 00:37:49 verbose #20487 > > ignore 00:37:49 verbose #20488 > > 00:37:49 verbose #20489 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:49 verbose #20490 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:49 verbose #20491 > > │ ### log_debug │ 00:37:49 verbose #20492 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:49 verbose #20493 > > 00:37:49 verbose #20494 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:49 verbose #20495 > > inl log_debug (text : string) = 00:37:49 verbose #20496 > > (!\\(text, $'@@$"true; leptos::logging::log\!(""{{:?}}"", $0)"') : bool) |> 00:37:49 verbose #20497 > > ignore 00:37:50 verbose #20498 > > 00:37:50 verbose #20499 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:50 verbose #20500 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:50 verbose #20501 > > │ ### log_pretty │ 00:37:50 verbose #20502 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:50 verbose #20503 > > 00:37:50 verbose #20504 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:50 verbose #20505 > > inl log_pretty (text : string) = 00:37:50 verbose #20506 > > (!\\(text, $'@@$"true; leptos::logging::log\!(""{{:#?}}"", $0)"') : bool) |> 00:37:50 verbose #20507 > > ignore 00:37:50 verbose #20508 > > 00:37:50 verbose #20509 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:50 verbose #20510 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:50 verbose #20511 > > │ ### log_format │ 00:37:50 verbose #20512 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:50 verbose #20513 > > 00:37:50 verbose #20514 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:50 verbose #20515 > > inl log_format fn obj = 00:37:50 verbose #20516 > > inl obj_log = obj |> sm'.format_debug 00:37:50 verbose #20517 > > inl text = fn obj_log |> sm'.ellipsis_end 200 00:37:50 verbose #20518 > > log text 00:37:50 verbose #20519 > > obj 00:37:51 verbose #20520 > > 00:37:51 verbose #20521 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:51 verbose #20522 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:51 verbose #20523 > > │ ### mount_to_body │ 00:37:51 verbose #20524 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:51 verbose #20525 > > 00:37:51 verbose #20526 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:51 verbose #20527 > > inl mount_to_body (view_fn : () -> rust.impl into_view) : () = 00:37:51 verbose #20528 > > (!\\(view_fn, $'"true; leptos::mount_to_body(|| $0());"') : bool) |> ignore 00:37:51 verbose #20529 > > 00:37:51 verbose #20530 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:51 verbose #20531 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:51 verbose #20532 > > │ ### view_vec_to_fragment │ 00:37:51 verbose #20533 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:51 verbose #20534 > > 00:37:51 verbose #20535 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:51 verbose #20536 > > inl view_vec_to_fragment (view : am'.vec view) : fragment = 00:37:51 verbose #20537 > > !\\(view, $'"leptos::Fragment::new($0)"') 00:37:51 verbose #20538 > > 00:37:51 verbose #20539 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:51 verbose #20540 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:51 verbose #20541 > > │ ### view_array_to_fragment │ 00:37:51 verbose #20542 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:51 verbose #20543 > > 00:37:51 verbose #20544 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:51 verbose #20545 > > inl view_array_to_fragment (view : array_base view) : fragment = 00:37:51 verbose #20546 > > view |> am'.to_vec |> view_vec_to_fragment 00:37:52 verbose #20547 > > 00:37:52 verbose #20548 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:52 verbose #20549 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:52 verbose #20550 > > │ ### element_to_view │ 00:37:52 verbose #20551 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:52 verbose #20552 > > 00:37:52 verbose #20553 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:52 verbose #20554 > > inl element_to_view (view : html_element _) : view = 00:37:52 verbose #20555 > > !\\(view, $'"leptos::IntoView::into_view($0)"') 00:37:52 verbose #20556 > > 00:37:52 verbose #20557 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:52 verbose #20558 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:52 verbose #20559 > > │ ### view_to_fragment │ 00:37:52 verbose #20560 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:52 verbose #20561 > > 00:37:52 verbose #20562 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:52 verbose #20563 > > inl view_to_fragment (view : view) : fragment = 00:37:52 verbose #20564 > > ;[[view]] |> view_array_to_fragment 00:37:53 verbose #20565 > > 00:37:53 verbose #20566 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:53 verbose #20567 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:53 verbose #20568 > > │ ### fragment_to_view │ 00:37:53 verbose #20569 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:53 verbose #20570 > > 00:37:53 verbose #20571 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:53 verbose #20572 > > inl fragment_to_view (fragment : fragment) : view = 00:37:53 verbose #20573 > > !\\(fragment, $'"leptos::IntoView::into_view($0)"') 00:37:53 verbose #20574 > > 00:37:53 verbose #20575 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:53 verbose #20576 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:53 verbose #20577 > > │ ### element_to_fragment │ 00:37:53 verbose #20578 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:53 verbose #20579 > > 00:37:53 verbose #20580 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:53 verbose #20581 > > inl element_to_fragment (view : html_element _) : fragment = 00:37:53 verbose #20582 > > view 00:37:53 verbose #20583 > > |> element_to_view 00:37:53 verbose #20584 > > |> view_to_fragment 00:37:54 verbose #20585 > > 00:37:54 verbose #20586 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:54 verbose #20587 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:54 verbose #20588 > > │ ### (~:>) fragment │ 00:37:54 verbose #20589 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:54 verbose #20590 > > 00:37:54 verbose #20591 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:54 verbose #20592 > > instance (~:>) fragment = fun x => 00:37:54 verbose #20593 > > real 00:37:54 verbose #20594 > > typecase t with 00:37:54 verbose #20595 > > | array_base (html_element ~el) => 00:37:54 verbose #20596 > > inl x = am'.to_vec `(html_element el) x 00:37:54 verbose #20597 > > inl x = am'.vec_map' `(html_element el) `view (element_to_view `el) 00:37:54 verbose #20598 > > x 00:37:54 verbose #20599 > > inl x : a i32 view = am'.from_vec `i32 `view x 00:37:54 verbose #20600 > > inl (a x) = x 00:37:54 verbose #20601 > > view_array_to_fragment x 00:37:54 verbose #20602 > > | array_base view => view_array_to_fragment x 00:37:54 verbose #20603 > > | _ => x 00:37:54 verbose #20604 > > 00:37:54 verbose #20605 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:54 verbose #20606 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:54 verbose #20607 > > │ ### (~:>) view │ 00:37:54 verbose #20608 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:54 verbose #20609 > > 00:37:54 verbose #20610 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:54 verbose #20611 > > instance (~:>) view = fun x => 00:37:54 verbose #20612 > > real 00:37:54 verbose #20613 > > typecase t with 00:37:54 verbose #20614 > > | html_element _ => element_to_view x 00:37:54 verbose #20615 > > | _ => x 00:37:54 verbose #20616 > > 00:37:54 verbose #20617 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:54 verbose #20618 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:54 verbose #20619 > > │ ### view_trait_to_element │ 00:37:54 verbose #20620 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:54 verbose #20621 > > 00:37:54 verbose #20622 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:54 verbose #20623 > > inl view_trait_to_element (view : rust.impl into_view) : html_element _ = 00:37:54 verbose #20624 > > $'!view |> unbox' 00:37:55 verbose #20625 > > 00:37:55 verbose #20626 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:55 verbose #20627 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:55 verbose #20628 > > │ ### view_trait_to_route_definition │ 00:37:55 verbose #20629 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:55 verbose #20630 > > 00:37:55 verbose #20631 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:55 verbose #20632 > > inl view_trait_to_route_definition (view : rust.impl into_view) : 00:37:55 verbose #20633 > > route_definition = 00:37:55 verbose #20634 > > $'!view |> unbox' 00:37:55 verbose #20635 > > 00:37:55 verbose #20636 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:55 verbose #20637 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:55 verbose #20638 > > │ ### to_element_view │ 00:37:55 verbose #20639 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:55 verbose #20640 > > 00:37:55 verbose #20641 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:55 verbose #20642 > > inl to_element_view (view : html_element _) : rust.impl into_view = 00:37:55 verbose #20643 > > $'!view |> unbox' 00:37:56 verbose #20644 > > 00:37:56 verbose #20645 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:56 verbose #20646 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:56 verbose #20647 > > │ ### to_view_trait │ 00:37:56 verbose #20648 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:56 verbose #20649 > > 00:37:56 verbose #20650 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:56 verbose #20651 > > inl to_view_trait (view : view) : rust.impl into_view = 00:37:56 verbose #20652 > > $'!view |> unbox' 00:37:56 verbose #20653 > > 00:37:56 verbose #20654 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:56 verbose #20655 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:56 verbose #20656 > > │ ### to_fragment_unbox │ 00:37:56 verbose #20657 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:56 verbose #20658 > > 00:37:56 verbose #20659 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:56 verbose #20660 > > inl to_fragment_unbox view : fragment = 00:37:56 verbose #20661 > > $'!view |> unbox' 00:37:57 verbose #20662 > > 00:37:57 verbose #20663 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:57 verbose #20664 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:57 verbose #20665 > > │ ### from_fragment_unbox │ 00:37:57 verbose #20666 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:57 verbose #20667 > > 00:37:57 verbose #20668 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:57 verbose #20669 > > inl from_fragment_unbox (fragment : fragment) = 00:37:57 verbose #20670 > > $'!fragment |> unbox' 00:37:57 verbose #20671 > > 00:37:57 verbose #20672 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:57 verbose #20673 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:57 verbose #20674 > > │ ### element_to_view_trait │ 00:37:57 verbose #20675 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:57 verbose #20676 > > 00:37:57 verbose #20677 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:57 verbose #20678 > > inl element_to_view_trait (macro : html_element _) : rust.impl into_view = 00:37:57 verbose #20679 > > !\($'"leptos::view\! { {!macro} }"') 00:37:57 verbose #20680 > > 00:37:57 verbose #20681 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:57 verbose #20682 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:57 verbose #20683 > > │ ### macro_to_view_trait │ 00:37:57 verbose #20684 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:57 verbose #20685 > > 00:37:57 verbose #20686 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:57 verbose #20687 > > inl macro_to_view_trait (macro : string) : rust.impl into_view = 00:37:57 verbose #20688 > > !\($'"leptos::view\! { " + !macro + " }"') 00:37:58 verbose #20689 > > 00:37:58 verbose #20690 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:58 verbose #20691 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:58 verbose #20692 > > │ ### macro_to_fragment │ 00:37:58 verbose #20693 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:58 verbose #20694 > > 00:37:58 verbose #20695 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:58 verbose #20696 > > inl macro_to_fragment (macro : string) : fragment = 00:37:58 verbose #20697 > > !\($'"leptos::view\! { " + !macro + " }"') 00:37:58 verbose #20698 > > 00:37:58 verbose #20699 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:58 verbose #20700 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:58 verbose #20701 > > │ ### new_transparent │ 00:37:58 verbose #20702 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:58 verbose #20703 > > 00:37:58 verbose #20704 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:58 verbose #20705 > > inl new_transparent x : transparent = 00:37:58 verbose #20706 > > !\\(x, $'"leptos::leptos_dom::Transparent::new($0)"') 00:37:59 verbose #20707 > > 00:37:59 verbose #20708 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:59 verbose #20709 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:59 verbose #20710 > > │ ### closure_to_view │ 00:37:59 verbose #20711 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:59 verbose #20712 > > 00:37:59 verbose #20713 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:59 verbose #20714 > > inl closure_to_view (closure : rust.func0 view) : view = 00:37:59 verbose #20715 > > !\\(closure, $'"leptos::IntoView::into_view(move || $0())"') 00:37:59 verbose #20716 > > 00:37:59 verbose #20717 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:37:59 verbose #20718 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:37:59 verbose #20719 > > │ ### batch │ 00:37:59 verbose #20720 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:37:59 verbose #20721 > > 00:37:59 verbose #20722 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:37:59 verbose #20723 > > inl batch (fn : () -> ()) : () = 00:37:59 verbose #20724 > > (!\\(fn, $'"true; leptos::batch(move || $0());"') : bool) |> ignore 00:38:00 verbose #20725 > > 00:38:00 verbose #20726 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:00 verbose #20727 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:00 verbose #20728 > > │ ### closure_to_fragment │ 00:38:00 verbose #20729 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:00 verbose #20730 > > 00:38:00 verbose #20731 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:00 verbose #20732 > > inl closure_to_fragment (closure : rust.func0 fragment) : fragment = 00:38:00 verbose #20733 > > !\\(closure, $'"leptos::IntoView::into_view(move || $0())"') 00:38:00 verbose #20734 > > |> view_to_fragment 00:38:00 verbose #20735 > > 00:38:00 verbose #20736 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:00 verbose #20737 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:00 verbose #20738 > > │ ### array_to_view │ 00:38:00 verbose #20739 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:00 verbose #20740 > > 00:38:00 verbose #20741 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:00 verbose #20742 > > inl array_to_view (view : a _ view) : view = 00:38:00 verbose #20743 > > !\\(view, $'"leptos::CollectView::collect_view($0.to_vec())"') 00:38:00 verbose #20744 > > 00:38:00 verbose #20745 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:00 verbose #20746 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:00 verbose #20747 > > │ ### to_fragment │ 00:38:00 verbose #20748 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:00 verbose #20749 > > 00:38:00 verbose #20750 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:00 verbose #20751 > > inl to_fragment x : fragment = 00:38:00 verbose #20752 > > $'!x |> unbox' 00:38:01 verbose #20753 > > 00:38:01 verbose #20754 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:01 verbose #20755 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:01 verbose #20756 > > │ ### text_to_view │ 00:38:01 verbose #20757 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:01 verbose #20758 > > 00:38:01 verbose #20759 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:01 verbose #20760 > > inl text_to_view (text : text) : view = 00:38:01 verbose #20761 > > !\\(text, $'"leptos::IntoView::into_view($0)"') 00:38:01 verbose #20762 > > 00:38:01 verbose #20763 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:01 verbose #20764 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:01 verbose #20765 > > │ ### text_to_fragment │ 00:38:01 verbose #20766 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:01 verbose #20767 > > 00:38:01 verbose #20768 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:01 verbose #20769 > > inl text_to_fragment (text : text) : fragment = 00:38:01 verbose #20770 > > text 00:38:01 verbose #20771 > > |> text_to_view 00:38:01 verbose #20772 > > |> view_to_fragment 00:38:02 verbose #20773 > > 00:38:02 verbose #20774 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:02 verbose #20775 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:02 verbose #20776 > > │ ### macro_to_view │ 00:38:02 verbose #20777 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:02 verbose #20778 > > 00:38:02 verbose #20779 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:02 verbose #20780 > > inl macro_to_view (macro : string) : view = 00:38:02 verbose #20781 > > !\($'"leptos::IntoView::into_view(leptos::view\! { " + !macro + " })"') 00:38:02 verbose #20782 > > 00:38:02 verbose #20783 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:02 verbose #20784 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:02 verbose #20785 > > │ ### transparent_to_view │ 00:38:02 verbose #20786 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:02 verbose #20787 > > 00:38:02 verbose #20788 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:02 verbose #20789 > > inl transparent_to_view (transparent : transparent) : view = 00:38:02 verbose #20790 > > !\\(transparent, $'"leptos::IntoView::into_view($0)"') 00:38:03 verbose #20791 > > 00:38:03 verbose #20792 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:03 verbose #20793 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:03 verbose #20794 > > │ ### transparent_to_fragment │ 00:38:03 verbose #20795 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:03 verbose #20796 > > 00:38:03 verbose #20797 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:03 verbose #20798 > > inl transparent_to_fragment (transparent : transparent) : fragment = 00:38:03 verbose #20799 > > transparent 00:38:03 verbose #20800 > > |> transparent_to_view 00:38:03 verbose #20801 > > |> view_to_fragment 00:38:03 verbose #20802 > > 00:38:03 verbose #20803 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:03 verbose #20804 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:03 verbose #20805 > > │ ### macro_to_element │ 00:38:03 verbose #20806 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:03 verbose #20807 > > 00:38:03 verbose #20808 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:03 verbose #20809 > > inl macro_to_element (view : string) : html_element _ = 00:38:03 verbose #20810 > > view |> macro_to_view_trait |> view_trait_to_element 00:38:03 verbose #20811 > > 00:38:03 verbose #20812 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:03 verbose #20813 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:03 verbose #20814 > > │ ### transparents_fragment │ 00:38:03 verbose #20815 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:03 verbose #20816 > > 00:38:03 verbose #20817 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:03 verbose #20818 > > inl transparents_fragment (items : array_base transparent) : fragment = 00:38:03 verbose #20819 > > inl items = items |> am'.to_vec 00:38:03 verbose #20820 > > !\\((items, transparent_to_view), $'"$0.iter().map(|x| 00:38:03 verbose #20821 > > $1(x.clone())).collect::<leptos::Fragment>()"') 00:38:04 verbose #20822 > > 00:38:04 verbose #20823 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:04 verbose #20824 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:04 verbose #20825 > > │ ### views_to_view │ 00:38:04 verbose #20826 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:04 verbose #20827 > > 00:38:04 verbose #20828 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:04 verbose #20829 > > inl views_to_view (items : array_base view) : view = 00:38:04 verbose #20830 > > inl items = join items 00:38:04 verbose #20831 > > items 00:38:04 verbose #20832 > > // |> fun x => a (join x) : a u64 _ 00:38:04 verbose #20833 > > |> fun x => a x : a u64 _ 00:38:04 verbose #20834 > > |> array_to_view 00:38:04 verbose #20835 > > 00:38:04 verbose #20836 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:04 verbose #20837 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:04 verbose #20838 > > │ ### new_text │ 00:38:04 verbose #20839 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:04 verbose #20840 > > 00:38:04 verbose #20841 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:04 verbose #20842 > > inl new_text (text : string) : text = 00:38:04 verbose #20843 > > inl text = text |> sm'.to_std_string 00:38:04 verbose #20844 > > !\\(text, $'"leptos::html::text($0)"') 00:38:05 verbose #20845 > > 00:38:05 verbose #20846 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:05 verbose #20847 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:05 verbose #20848 > > │ ### text_view │ 00:38:05 verbose #20849 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:05 verbose #20850 > > 00:38:05 verbose #20851 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:05 verbose #20852 > > inl text_view (text : string) : view = 00:38:05 verbose #20853 > > text 00:38:05 verbose #20854 > > |> new_text 00:38:05 verbose #20855 > > |> text_to_view 00:38:05 verbose #20856 > > 00:38:05 verbose #20857 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:05 verbose #20858 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:05 verbose #20859 > > │ ### text_fragment │ 00:38:05 verbose #20860 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:05 verbose #20861 > > 00:38:05 verbose #20862 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:05 verbose #20863 > > inl text_fragment (text : string) : fragment = 00:38:05 verbose #20864 > > text 00:38:05 verbose #20865 > > |> text_view 00:38:05 verbose #20866 > > |> view_to_fragment 00:38:06 verbose #20867 > > 00:38:06 verbose #20868 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:06 verbose #20869 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:06 verbose #20870 > > │ ### provide_meta_context │ 00:38:06 verbose #20871 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:06 verbose #20872 > > 00:38:06 verbose #20873 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:06 verbose #20874 > > inl provide_meta_context () = 00:38:06 verbose #20875 > > (!\($'"true; leptos_meta::provide_meta_context()"') : bool) |> ignore 00:38:06 verbose #20876 > > 00:38:06 verbose #20877 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:06 verbose #20878 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:06 verbose #20879 > > │ ### provide_context │ 00:38:06 verbose #20880 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:06 verbose #20881 > > 00:38:06 verbose #20882 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:06 verbose #20883 > > inl provide_context forall t. (x : t) = 00:38:06 verbose #20884 > > (!\\(x, $'$"true; leptos::provide_context::<std::sync::Arc<`t>>($0)"') : 00:38:06 verbose #20885 > > bool) |> ignore 00:38:06 verbose #20886 > > 00:38:06 verbose #20887 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:06 verbose #20888 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:06 verbose #20889 > > │ ### create_signal │ 00:38:06 verbose #20890 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:06 verbose #20891 > > 00:38:06 verbose #20892 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:06 verbose #20893 > > inl create_signal forall t. (value : t) : read_signal t * write_signal t = 00:38:06 verbose #20894 > > !\\(value, $'$"leptos::create_signal($0)"') 00:38:07 verbose #20895 > > 00:38:07 verbose #20896 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:07 verbose #20897 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:07 verbose #20898 > > │ ### create_rw_signal │ 00:38:07 verbose #20899 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:07 verbose #20900 > > 00:38:07 verbose #20901 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:07 verbose #20902 > > inl create_rw_signal forall t. (value : t) : rw_signal t = 00:38:07 verbose #20903 > > !\\(value, $'$"leptos::create_rw_signal($0)"') 00:38:07 verbose #20904 > > 00:38:07 verbose #20905 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:07 verbose #20906 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:07 verbose #20907 > > │ ### read_only │ 00:38:07 verbose #20908 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:07 verbose #20909 > > 00:38:07 verbose #20910 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:07 verbose #20911 > > inl read_only forall t. (value : rw_signal t) : read_signal t = 00:38:07 verbose #20912 > > !\\(value, $'$"leptos::RwSignal::read_only(&$0)"') 00:38:08 verbose #20913 > > 00:38:08 verbose #20914 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:08 verbose #20915 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:08 verbose #20916 > > │ ### write_only │ 00:38:08 verbose #20917 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:08 verbose #20918 > > 00:38:08 verbose #20919 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:08 verbose #20920 > > inl write_only forall t. (value : rw_signal t) : write_signal t = 00:38:08 verbose #20921 > > !\\(value, $'$"leptos::RwSignal::write_only(&$0)"') 00:38:08 verbose #20922 > > 00:38:08 verbose #20923 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:08 verbose #20924 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:08 verbose #20925 > > │ ### typecheck_signal │ 00:38:08 verbose #20926 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:08 verbose #20927 > > 00:38:08 verbose #20928 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:08 verbose #20929 > > inl typecheck_signal forall (t : * -> *) u. (signal : t u) : () = 00:38:08 verbose #20930 > > real 00:38:08 verbose #20931 > > typecase t with 00:38:08 verbose #20932 > > | signal => () 00:38:08 verbose #20933 > > | rw_signal => () 00:38:08 verbose #20934 > > | read_signal => () 00:38:08 verbose #20935 > > | write_signal => () 00:38:08 verbose #20936 > > | memo => () 00:38:08 verbose #20937 > > | _ => error_type `(()) ("invalid signal", ``(t u)) 00:38:09 verbose #20938 > > 00:38:09 verbose #20939 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:09 verbose #20940 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:09 verbose #20941 > > │ ### memo_get' │ 00:38:09 verbose #20942 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:09 verbose #20943 > > 00:38:09 verbose #20944 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:09 verbose #20945 > > inl memo_get' forall t. (memo : memo t) : t = 00:38:09 verbose #20946 > > !\\(memo, $'$"$0()"') 00:38:09 verbose #20947 > > 00:38:09 verbose #20948 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:09 verbose #20949 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:09 verbose #20950 > > │ ### signal_get' │ 00:38:09 verbose #20951 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:09 verbose #20952 > > 00:38:09 verbose #20953 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:09 verbose #20954 > > inl signal_get' forall (t : * -> *) u. (signal : t u) : u = 00:38:09 verbose #20955 > > signal |> typecheck_signal 00:38:09 verbose #20956 > > !\\(signal, $'$"leptos::SignalGet::get(&$0)"') 00:38:09 verbose #20957 > > 00:38:09 verbose #20958 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:09 verbose #20959 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:09 verbose #20960 > > │ ### signal_get signal │ 00:38:09 verbose #20961 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:09 verbose #20962 > > 00:38:09 verbose #20963 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:09 verbose #20964 > > instance signal_get signal = signal_get' 00:38:10 verbose #20965 > > 00:38:10 verbose #20966 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:10 verbose #20967 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:10 verbose #20968 > > │ ### signal_get rw_signal │ 00:38:10 verbose #20969 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:10 verbose #20970 > > 00:38:10 verbose #20971 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:10 verbose #20972 > > instance signal_get rw_signal = signal_get' 00:38:10 verbose #20973 > > 00:38:10 verbose #20974 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:10 verbose #20975 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:10 verbose #20976 > > │ ### signal_get read_signal │ 00:38:10 verbose #20977 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:10 verbose #20978 > > 00:38:10 verbose #20979 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:10 verbose #20980 > > instance signal_get read_signal = signal_get' 00:38:11 verbose #20981 > > 00:38:11 verbose #20982 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:11 verbose #20983 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:11 verbose #20984 > > │ ### signal_get memo │ 00:38:11 verbose #20985 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:11 verbose #20986 > > 00:38:11 verbose #20987 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:11 verbose #20988 > > instance signal_get memo = memo_get' 00:38:11 verbose #20989 > > 00:38:11 verbose #20990 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:11 verbose #20991 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:11 verbose #20992 > > │ ### signal_update' │ 00:38:11 verbose #20993 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:11 verbose #20994 > > 00:38:11 verbose #20995 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:11 verbose #20996 > > inl signal_update' forall (t : * -> *) u. (fn : u -> u) (signal : t u) : () = 00:38:11 verbose #20997 > > signal |> typecheck_signal 00:38:11 verbose #20998 > > (!\\((signal, fn), $'"true; leptos::SignalUpdate::update(&$0, |x| { *x = 00:38:11 verbose #20999 > > $1(x.clone()) });"') : bool) |> ignore 00:38:12 verbose #21000 > > 00:38:12 verbose #21001 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:12 verbose #21002 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:12 verbose #21003 > > │ ### signal_update rw_signal │ 00:38:12 verbose #21004 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:12 verbose #21005 > > 00:38:12 verbose #21006 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:12 verbose #21007 > > instance signal_update rw_signal = signal_update' 00:38:12 verbose #21008 > > 00:38:12 verbose #21009 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:12 verbose #21010 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:12 verbose #21011 > > │ ### signal_update write_signal │ 00:38:12 verbose #21012 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:12 verbose #21013 > > 00:38:12 verbose #21014 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:12 verbose #21015 > > instance signal_update write_signal = signal_update' 00:38:12 verbose #21016 > > 00:38:12 verbose #21017 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:12 verbose #21018 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:12 verbose #21019 > > │ ### signal_get_untracked' │ 00:38:12 verbose #21020 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:12 verbose #21021 > > 00:38:12 verbose #21022 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:12 verbose #21023 > > inl signal_get_untracked' forall (t : * -> *) u. (signal : t u) : u = 00:38:12 verbose #21024 > > signal |> typecheck_signal 00:38:12 verbose #21025 > > !\\(signal, $'$"leptos::SignalGetUntracked::get_untracked(&$0)"') 00:38:13 verbose #21026 > > 00:38:13 verbose #21027 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:13 verbose #21028 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:13 verbose #21029 > > │ ### signal_get_untracked rw_signal │ 00:38:13 verbose #21030 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:13 verbose #21031 > > 00:38:13 verbose #21032 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:13 verbose #21033 > > instance signal_get_untracked rw_signal = signal_get_untracked' 00:38:13 verbose #21034 > > 00:38:13 verbose #21035 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:13 verbose #21036 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:13 verbose #21037 > > │ ### signal_get_untracked read_signal │ 00:38:13 verbose #21038 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:13 verbose #21039 > > 00:38:13 verbose #21040 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:13 verbose #21041 > > instance signal_get_untracked read_signal = signal_get_untracked' 00:38:14 verbose #21042 > > 00:38:14 verbose #21043 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:14 verbose #21044 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:14 verbose #21045 > > │ ### signal_get_untracked memo │ 00:38:14 verbose #21046 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:14 verbose #21047 > > 00:38:14 verbose #21048 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:14 verbose #21049 > > instance signal_get_untracked memo = signal_get_untracked' 00:38:14 verbose #21050 > > 00:38:14 verbose #21051 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:14 verbose #21052 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:14 verbose #21053 > > │ ### signal_set' │ 00:38:14 verbose #21054 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:14 verbose #21055 > > 00:38:14 verbose #21056 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:14 verbose #21057 > > inl signal_set' forall (t : * -> *) u. (value : u) (signal : t u) = 00:38:14 verbose #21058 > > signal |> typecheck_signal 00:38:14 verbose #21059 > > (!\\((signal, value), $'$"true; leptos::SignalSet::set(&$0, $1);"') : bool) 00:38:14 verbose #21060 > > |> ignore 00:38:15 verbose #21061 > > 00:38:15 verbose #21062 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:15 verbose #21063 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:15 verbose #21064 > > │ ### signal_set rw_signal │ 00:38:15 verbose #21065 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:15 verbose #21066 > > 00:38:15 verbose #21067 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:15 verbose #21068 > > instance signal_set rw_signal = signal_set' 00:38:15 verbose #21069 > > 00:38:15 verbose #21070 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:15 verbose #21071 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:15 verbose #21072 > > │ ### signal_set write_signal │ 00:38:15 verbose #21073 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:15 verbose #21074 > > 00:38:15 verbose #21075 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:15 verbose #21076 > > instance signal_set write_signal = signal_set' 00:38:16 verbose #21077 > > 00:38:16 verbose #21078 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:16 verbose #21079 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:16 verbose #21080 > > │ ### create_local_resource │ 00:38:16 verbose #21081 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:16 verbose #21082 > > 00:38:16 verbose #21083 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:16 verbose #21084 > > inl create_local_resource forall t u. 00:38:16 verbose #21085 > > (source : () -> t) 00:38:16 verbose #21086 > > (fetcher : t -> async.future_pin u) 00:38:16 verbose #21087 > > : resource t u 00:38:16 verbose #21088 > > = 00:38:16 verbose #21089 > > // inl fetcher x = rust.move fun () => 00:38:16 verbose #21090 > > // fetcher x 00:38:16 verbose #21091 > > // inl fetcher = join fetcher 00:38:16 verbose #21092 > > // !\($'"leptos::create_local_resource(move || !source(), move |x| async 00:38:16 verbose #21093 > > move { !fetcher(x)().await })"') 00:38:16 verbose #21094 > > 00:38:16 verbose #21095 > > // --- 00:38:16 verbose #21096 > > 00:38:16 verbose #21097 > > // inl fn x = async.new_future fun () => 00:38:16 verbose #21098 > > // inl x' = fetcher x 00:38:16 verbose #21099 > > // x' |> async.await 00:38:16 verbose #21100 > > 00:38:16 verbose #21101 > > // !\\((source, fn), $'"leptos::create_local_resource(move || $0(), |x| 00:38:16 verbose #21102 > > async move { $1(x).await })"') 00:38:16 verbose #21103 > > 00:38:16 verbose #21104 > > 00:38:16 verbose #21105 > > join 00:38:16 verbose #21106 > > !\\(source, $'"let __create_local_resource = 00:38:16 verbose #21107 > > leptos::create_local_resource(move || $0(), |x| async move { //"') 00:38:16 verbose #21108 > > 00:38:16 verbose #21109 > > inl x = !\($'"x"') 00:38:16 verbose #21110 > > inl x' = fetcher x 00:38:16 verbose #21111 > > inl x' = join x' 00:38:16 verbose #21112 > > inl x' = x' |> async.await 00:38:16 verbose #21113 > > 00:38:16 verbose #21114 > > inl closure_fix = 2u8, 1u8 00:38:16 verbose #21115 > > x' |> rust.fix_closure closure_fix 00:38:16 verbose #21116 > > 00:38:16 verbose #21117 > > !\($'"__create_local_resource"') 00:38:16 verbose #21118 > > 00:38:16 verbose #21119 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:16 verbose #21120 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:16 verbose #21121 > > │ ### create_resource │ 00:38:16 verbose #21122 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:16 verbose #21123 > > 00:38:16 verbose #21124 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:16 verbose #21125 > > // inl create_resource forall t u. (source : () -> t) (fetcher : t -> 00:38:16 verbose #21126 > > async.future_pin u) : resource t u = 00:38:16 verbose #21127 > > // inl source = join source 00:38:16 verbose #21128 > > // !\\(fetcher, $'"leptos::create_resource(move || !source(), |x| async move 00:38:16 verbose #21129 > > { $0(x).await })"') 00:38:16 verbose #21130 > > 00:38:16 verbose #21131 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:16 verbose #21132 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:16 verbose #21133 > > │ ### create_action │ 00:38:16 verbose #21134 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:16 verbose #21135 > > 00:38:16 verbose #21136 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:16 verbose #21137 > > inl create_action forall t u. (action_fn : t -> async.future_pin u) : action t u 00:38:16 verbose #21138 > > = 00:38:16 verbose #21139 > > !\\(action_fn, $'"leptos::create_action(move |value: &std::sync::Arc<`t>| 00:38:16 verbose #21140 > > $0(value.clone()))"') 00:38:17 verbose #21141 > > 00:38:17 verbose #21142 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:17 verbose #21143 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:17 verbose #21144 > > │ ### action_dispatch │ 00:38:17 verbose #21145 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:17 verbose #21146 > > 00:38:17 verbose #21147 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:17 verbose #21148 > > inl action_dispatch forall t u. (value : heap t) (action : action (heap t) u) : 00:38:17 verbose #21149 > > () = 00:38:17 verbose #21150 > > (!\\((action, value), $'"true; leptos::Action::dispatch(&$0, $1.clone())"') 00:38:17 verbose #21151 > > : bool) |> ignore 00:38:17 verbose #21152 > > 00:38:17 verbose #21153 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:17 verbose #21154 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:17 verbose #21155 > > │ ### action_input │ 00:38:17 verbose #21156 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:17 verbose #21157 > > 00:38:17 verbose #21158 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:17 verbose #21159 > > inl action_input forall t u. (action : action (heap t) u) : rw_signal 00:38:17 verbose #21160 > > (optionm'.option' t) = 00:38:17 verbose #21161 > > !\\(action, $'"leptos::Action::input(&$0)"') 00:38:18 verbose #21162 > > 00:38:18 verbose #21163 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:18 verbose #21164 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:18 verbose #21165 > > │ ### action_pending │ 00:38:18 verbose #21166 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:18 verbose #21167 > > 00:38:18 verbose #21168 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:18 verbose #21169 > > inl action_pending forall t u. (action : action (heap t) u) : read_signal bool = 00:38:18 verbose #21170 > > !\\(action, $'"leptos::Action::pending(&$0)"') 00:38:18 verbose #21171 > > 00:38:18 verbose #21172 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:18 verbose #21173 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:18 verbose #21174 > > │ ### action_value │ 00:38:18 verbose #21175 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:18 verbose #21176 > > 00:38:18 verbose #21177 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:18 verbose #21178 > > inl action_value forall t u. (action : action (heap t) u) : rw_signal 00:38:18 verbose #21179 > > (optionm'.option' u) = 00:38:18 verbose #21180 > > !\\(action, $'"leptos::Action::value(&$0)"') 00:38:19 verbose #21181 > > 00:38:19 verbose #21182 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:19 verbose #21183 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:19 verbose #21184 > > │ ### use_context │ 00:38:19 verbose #21185 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:19 verbose #21186 > > 00:38:19 verbose #21187 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:19 verbose #21188 > > inl use_context forall t. () : optionm'.option' t = 00:38:19 verbose #21189 > > !\($'"leptos::use_context::<std::sync::Arc<`t>>()"') 00:38:19 verbose #21190 > > 00:38:19 verbose #21191 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:19 verbose #21192 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:19 verbose #21193 > > │ ### resource_loading │ 00:38:19 verbose #21194 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:19 verbose #21195 > > 00:38:19 verbose #21196 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:19 verbose #21197 > > inl resource_loading forall t u. (resource : resource t u) : signal bool = 00:38:19 verbose #21198 > > !\\(resource, $'$"leptos::Resource::loading(&$0)"') 00:38:19 verbose #21199 > > 00:38:19 verbose #21200 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:19 verbose #21201 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:19 verbose #21202 > > │ ### resource_get │ 00:38:19 verbose #21203 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:19 verbose #21204 > > 00:38:19 verbose #21205 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:19 verbose #21206 > > inl resource_get forall t u. (resource : resource t u) : optionm'.option' u = 00:38:19 verbose #21207 > > !\\(resource, $'$"leptos::SignalGet::get(&$0)"') 00:38:20 verbose #21208 > > 00:38:20 verbose #21209 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:20 verbose #21210 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:20 verbose #21211 > > │ ### resource_with │ 00:38:20 verbose #21212 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:20 verbose #21213 > > 00:38:20 verbose #21214 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:20 verbose #21215 > > inl resource_with forall t u v. (resource : resource t u) (fn : optionm'.option' 00:38:20 verbose #21216 > > u -> v) : v = 00:38:20 verbose #21217 > > !\\((resource, fn), $'$"leptos::SignalWith::with(&$0, |x| $1(x.clone()))"') 00:38:20 verbose #21218 > > 00:38:20 verbose #21219 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:20 verbose #21220 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:20 verbose #21221 > > │ ### create_effect │ 00:38:20 verbose #21222 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:20 verbose #21223 > > 00:38:20 verbose #21224 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:20 verbose #21225 > > inl create_effect (fn : () -> ()) : () = 00:38:20 verbose #21226 > > inl fn = fn |> rust.emit 00:38:20 verbose #21227 > > (!\($'"true; leptos::create_effect(move |_| { !fn(()) })"') : bool) |> 00:38:20 verbose #21228 > > ignore 00:38:21 verbose #21229 > > 00:38:21 verbose #21230 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:21 verbose #21231 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:21 verbose #21232 > > │ ### create_effect' │ 00:38:21 verbose #21233 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:21 verbose #21234 > > 00:38:21 verbose #21235 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:21 verbose #21236 > > inl create_effect' forall t. (fn : optionm'.option' t -> t) : () = 00:38:21 verbose #21237 > > (!\\(fn, $'"true; leptos::create_effect(move |x| { $0(x) })"') : bool) |> 00:38:21 verbose #21238 > > ignore 00:38:21 verbose #21239 > > 00:38:21 verbose #21240 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:21 verbose #21241 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:21 verbose #21242 > > │ ### interval_handle_clear │ 00:38:21 verbose #21243 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:21 verbose #21244 > > 00:38:21 verbose #21245 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:21 verbose #21246 > > inl interval_handle_clear (interval_handle : interval_handle) = 00:38:21 verbose #21247 > > (!\\(interval_handle, $'$"true; 00:38:21 verbose #21248 > > leptos::leptos_dom::helpers::IntervalHandle::clear(&$0)"') : bool) |> ignore 00:38:22 verbose #21249 > > 00:38:22 verbose #21250 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:22 verbose #21251 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:22 verbose #21252 > > │ ### set_interval_with_handle │ 00:38:22 verbose #21253 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:22 verbose #21254 > > 00:38:22 verbose #21255 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:22 verbose #21256 > > inl set_interval_with_handle 00:38:22 verbose #21257 > > (fn : () -> ()) 00:38:22 verbose #21258 > > (interval_millis : date_time.duration) 00:38:22 verbose #21259 > > : resultm.result' interval_handle wasm.js_value 00:38:22 verbose #21260 > > = 00:38:22 verbose #21261 > > !\\((fn, interval_millis), $'$"leptos::set_interval_with_handle(move || 00:38:22 verbose #21262 > > $0(), $1)"') 00:38:22 verbose #21263 > > 00:38:22 verbose #21264 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:22 verbose #21265 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:22 verbose #21266 > > │ ### create_memo │ 00:38:22 verbose #21267 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:22 verbose #21268 > > 00:38:22 verbose #21269 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:22 verbose #21270 > > inl create_memo forall t. (fn : () -> t) : memo t = 00:38:22 verbose #21271 > > inl fn = fn |> rust.emit 00:38:22 verbose #21272 > > !\($'"leptos::create_memo(move |_| { !fn(()) })"') 00:38:22 verbose #21273 > > 00:38:22 verbose #21274 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:22 verbose #21275 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:22 verbose #21276 > > │ ### window │ 00:38:22 verbose #21277 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:22 verbose #21278 > > 00:38:22 verbose #21279 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:22 verbose #21280 > > let window () : wasm.window = 00:38:22 verbose #21281 > > !\($'"leptos::leptos_dom::window()"') 00:38:23 verbose #21282 > > 00:38:23 verbose #21283 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:23 verbose #21284 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:23 verbose #21285 > > │ ### bool_prop │ 00:38:23 verbose #21286 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:23 verbose #21287 > > 00:38:23 verbose #21288 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:23 verbose #21289 > > inl bool_prop (prop : string) (fn : () -> bool) : string = 00:38:23 verbose #21290 > > inl fn = join fn 00:38:23 verbose #21291 > > $'"" + !prop + "={move || !fn()}"' 00:38:23 verbose #21292 > > 00:38:23 verbose #21293 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:23 verbose #21294 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:23 verbose #21295 > > │ ### concat_props │ 00:38:23 verbose #21296 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:23 verbose #21297 > > 00:38:23 verbose #21298 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:23 verbose #21299 > > inl concat_props props = 00:38:23 verbose #21300 > > ("", props) 00:38:23 verbose #21301 > > ||> listm.fold fun acc (x : string) => 00:38:23 verbose #21302 > > $'" " + !x + !acc + ""' 00:38:24 verbose #21303 > > 00:38:24 verbose #21304 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:24 verbose #21305 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:24 verbose #21306 > > │ ### move_to_fragment │ 00:38:24 verbose #21307 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:24 verbose #21308 > > 00:38:24 verbose #21309 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:24 verbose #21310 > > inl move_to_fragment fn = 00:38:24 verbose #21311 > > rust.move fn 00:38:24 verbose #21312 > > |> closure_to_fragment 00:38:24 verbose #21313 > > 00:38:24 verbose #21314 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:24 verbose #21315 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:24 verbose #21316 > > │ ### tag_raw │ 00:38:24 verbose #21317 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:24 verbose #21318 > > 00:38:24 verbose #21319 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:24 verbose #21320 > > inl tag_raw tag props children = 00:38:24 verbose #21321 > > inl tag : string = tag 00:38:24 verbose #21322 > > inl props = props |> concat_props 00:38:24 verbose #21323 > > inl children = join children 00:38:24 verbose #21324 > > inl children = fun () => children |> move_to_fragment 00:38:24 verbose #21325 > > inl children : () -> fragment = join children 00:38:24 verbose #21326 > > $'"<" + !tag + " " + !props + ">{!children()}</" + !tag + ">"' 00:38:25 verbose #21327 > > 00:38:25 verbose #21328 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:25 verbose #21329 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:25 verbose #21330 > > │ ### tag_element │ 00:38:25 verbose #21331 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:25 verbose #21332 > > 00:38:25 verbose #21333 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:25 verbose #21334 > > inl tag_element tag props children : html_element _ = 00:38:25 verbose #21335 > > inl children = join children 00:38:25 verbose #21336 > > tag_raw tag props children 00:38:25 verbose #21337 > > |> macro_to_element 00:38:25 verbose #21338 > > 00:38:25 verbose #21339 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:25 verbose #21340 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:25 verbose #21341 > > │ ### tag_closed_raw │ 00:38:25 verbose #21342 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:25 verbose #21343 > > 00:38:25 verbose #21344 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:25 verbose #21345 > > inl tag_closed_raw tag props = 00:38:25 verbose #21346 > > inl tag : string = tag 00:38:25 verbose #21347 > > inl props = props |> concat_props 00:38:25 verbose #21348 > > $'"<" + !tag + " " + !props + " />"' 00:38:26 verbose #21349 > > 00:38:26 verbose #21350 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:26 verbose #21351 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:26 verbose #21352 > > │ ### tag_closed │ 00:38:26 verbose #21353 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:26 verbose #21354 > > 00:38:26 verbose #21355 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:26 verbose #21356 > > inl tag_closed tag props : html_element _ = 00:38:26 verbose #21357 > > tag_closed_raw tag props 00:38:26 verbose #21358 > > |> macro_to_element 00:38:26 verbose #21359 > > 00:38:26 verbose #21360 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:26 verbose #21361 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:26 verbose #21362 > > │ ### for │ 00:38:26 verbose #21363 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:26 verbose #21364 > > 00:38:26 verbose #21365 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:26 verbose #21366 > > inl for props : view = 00:38:26 verbose #21367 > > tag_closed_raw "leptos::For" props 00:38:26 verbose #21368 > > |> macro_to_view 00:38:26 verbose #21369 > > 00:38:26 verbose #21370 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:26 verbose #21371 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:26 verbose #21372 > > │ ### for │ 00:38:26 verbose #21373 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:26 verbose #21374 > > 00:38:26 verbose #21375 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:26 verbose #21376 > > inl for forall t u (signal : * -> *). 00:38:26 verbose #21377 > > (signal : signal (am'.vec t)) 00:38:26 verbose #21378 > > (key_fn : t -> u) 00:38:26 verbose #21379 > > (children' : t -> fragment) 00:38:26 verbose #21380 > > : view 00:38:26 verbose #21381 > > = 00:38:26 verbose #21382 > > inl signal = join signal 00:38:26 verbose #21383 > > signal |> typecheck_signal 00:38:26 verbose #21384 > > inl key_fn = join key_fn 00:38:26 verbose #21385 > > inl children' = join children' 00:38:26 verbose #21386 > > for [[ 00:38:26 verbose #21387 > > $'"each=!signal"' 00:38:26 verbose #21388 > > $'"key=move |x| !key_fn(x.to_owned())"' 00:38:26 verbose #21389 > > $'"let:x"' 00:38:26 verbose #21390 > > $'"children=move |x| !children'(x)"' 00:38:26 verbose #21391 > > ]] 00:38:27 verbose #21392 > > 00:38:27 verbose #21393 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:27 verbose #21394 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:27 verbose #21395 > > │ ### show │ 00:38:27 verbose #21396 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:27 verbose #21397 > > 00:38:27 verbose #21398 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:27 verbose #21399 > > inl show props : view = 00:38:27 verbose #21400 > > tag_closed_raw "leptos::Show" props 00:38:27 verbose #21401 > > |> macro_to_view 00:38:27 verbose #21402 > > 00:38:27 verbose #21403 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:27 verbose #21404 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:27 verbose #21405 > > │ ### show │ 00:38:27 verbose #21406 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:27 verbose #21407 > > 00:38:27 verbose #21408 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:27 verbose #21409 > > inl show (when_fn : () -> bool) (fallback : () -> view) (children : () -> 00:38:27 verbose #21410 > > fragment) : view = 00:38:27 verbose #21411 > > inl when_fn = join when_fn 00:38:27 verbose #21412 > > inl when_fn = join when_fn 00:38:27 verbose #21413 > > inl fallback = join fallback 00:38:27 verbose #21414 > > inl children = join children 00:38:27 verbose #21415 > > show [[ 00:38:27 verbose #21416 > > $'"when=move || !when_fn()"' 00:38:27 verbose #21417 > > $'"fallback=move || !fallback()"' 00:38:27 verbose #21418 > > $'"children=std::rc::Rc::new(move || !children())"' 00:38:27 verbose #21419 > > ]] 00:38:28 verbose #21420 > > 00:38:28 verbose #21421 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:28 verbose #21422 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:28 verbose #21423 > > │ ### use_location │ 00:38:28 verbose #21424 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:28 verbose #21425 > > 00:38:28 verbose #21426 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:28 verbose #21427 > > inl use_location () : location = 00:38:28 verbose #21428 > > !\($'"leptos_router::use_location()"') 00:38:28 verbose #21429 > > 00:38:28 verbose #21430 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:28 verbose #21431 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:28 verbose #21432 > > │ ### use_navigate │ 00:38:28 verbose #21433 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:28 verbose #21434 > > 00:38:28 verbose #21435 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:28 verbose #21436 > > inl use_navigate () : string -> () = 00:38:28 verbose #21437 > > inl navigate : threading.arc (rust.dyn' (rust.action_fn2 (rust.ref sm'.str) 00:38:28 verbose #21438 > > navigate_options)) = 00:38:28 verbose #21439 > > !\($'"std::sync::Arc::new(leptos_router::use_navigate())"') 00:38:28 verbose #21440 > > fun url => 00:38:28 verbose #21441 > > inl url = url |> sm'.as_str 00:38:28 verbose #21442 > > !\\((navigate, url), $'"$0($1, Default::default())"') 00:38:29 verbose #21443 > > 00:38:29 verbose #21444 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:29 verbose #21445 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:29 verbose #21446 > > │ ### location_hash │ 00:38:29 verbose #21447 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:29 verbose #21448 > > 00:38:29 verbose #21449 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:29 verbose #21450 > > inl location_hash (location : location) : memo sm'.std_string = 00:38:29 verbose #21451 > > !\\(location, $'"$0.hash"') 00:38:29 verbose #21452 > > 00:38:29 verbose #21453 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:29 verbose #21454 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:29 verbose #21455 > > │ ### location_pathname │ 00:38:29 verbose #21456 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:29 verbose #21457 > > 00:38:29 verbose #21458 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:29 verbose #21459 > > inl location_pathname (location : location) : memo sm'.std_string = 00:38:29 verbose #21460 > > !\\(location, $'"$0.pathname"') 00:38:30 verbose #21461 > > 00:38:30 verbose #21462 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:30 verbose #21463 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:30 verbose #21464 > > │ ### location_search │ 00:38:30 verbose #21465 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:30 verbose #21466 > > 00:38:30 verbose #21467 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:30 verbose #21468 > > inl location_search (location : location) : memo sm'.std_string = 00:38:30 verbose #21469 > > !\\(location, $'"$0.search"') 00:38:30 verbose #21470 > > 00:38:30 verbose #21471 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:30 verbose #21472 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:30 verbose #21473 > > │ ### url_try_from │ 00:38:30 verbose #21474 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:30 verbose #21475 > > 00:38:30 verbose #21476 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:30 verbose #21477 > > inl url_try_from (s : rust.ref sm'.str) : resultm.result' url sm'.std_string = 00:38:30 verbose #21478 > > !\\(s, $'"leptos_router::Url::try_from($0)"') 00:38:30 verbose #21479 > > 00:38:30 verbose #21480 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:30 verbose #21481 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:30 verbose #21482 > > │ ### url_pathname │ 00:38:30 verbose #21483 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:30 verbose #21484 > > 00:38:30 verbose #21485 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:30 verbose #21486 > > inl url_pathname (url : url) : sm'.std_string = 00:38:30 verbose #21487 > > !\\(url, $'"$0.pathname"') 00:38:31 verbose #21488 > > 00:38:31 verbose #21489 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:31 verbose #21490 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:31 verbose #21491 > > │ ### use_url │ 00:38:31 verbose #21492 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:31 verbose #21493 > > 00:38:31 verbose #21494 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:31 verbose #21495 > > inl use_url () = 00:38:31 verbose #21496 > > inl location = use_location () 00:38:31 verbose #21497 > > 00:38:31 verbose #21498 > > create_memo fun () => 00:38:31 verbose #21499 > > inl url_pathname = location |> location_pathname |> signal_get |> 00:38:31 verbose #21500 > > sm'.from_std_string 00:38:31 verbose #21501 > > inl url_search = location |> location_search |> signal_get |> 00:38:31 verbose #21502 > > sm'.from_std_string 00:38:31 verbose #21503 > > inl url_search = 00:38:31 verbose #21504 > > if url_search = "" 00:38:31 verbose #21505 > > then "" 00:38:31 verbose #21506 > > else $'$"?{!url_search}"' 00:38:31 verbose #21507 > > url_pathname +. url_search 00:38:31 verbose #21508 > > 00:38:31 verbose #21509 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:31 verbose #21510 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:31 verbose #21511 > > │ ### route │ 00:38:31 verbose #21512 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:31 verbose #21513 > > 00:38:31 verbose #21514 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:31 verbose #21515 > > inl route path view children : view = 00:38:31 verbose #21516 > > inl path = path |> sm'.to_std_string 00:38:31 verbose #21517 > > inl path = join path 00:38:31 verbose #21518 > > inl view : () -> fragment = join view 00:38:31 verbose #21519 > > inl children : () -> fragment = join children 00:38:31 verbose #21520 > > tag_closed_raw "leptos_router::Route" [[ 00:38:31 verbose #21521 > > $'"path=!path"' 00:38:31 verbose #21522 > > $'"view=move || !view()"' 00:38:31 verbose #21523 > > $'"children=Box::new(move || !children())"' 00:38:31 verbose #21524 > > ]] 00:38:31 verbose #21525 > > |> macro_to_view 00:38:32 verbose #21526 > > 00:38:32 verbose #21527 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:32 verbose #21528 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:32 verbose #21529 > > │ ### router │ 00:38:32 verbose #21530 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:32 verbose #21531 > > 00:38:32 verbose #21532 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:32 verbose #21533 > > inl router children : view = 00:38:32 verbose #21534 > > inl children () = 00:38:32 verbose #21535 > > children () 00:38:32 verbose #21536 > > inl children : () -> fragment = join children 00:38:32 verbose #21537 > > tag_closed_raw "leptos_router::Router" [[ 00:38:32 verbose #21538 > > $'"children=Box::new(move || !children())"' 00:38:32 verbose #21539 > > ]] 00:38:32 verbose #21540 > > |> macro_to_view 00:38:32 verbose #21541 > > 00:38:32 verbose #21542 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:32 verbose #21543 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:32 verbose #21544 > > │ ### routes │ 00:38:32 verbose #21545 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:32 verbose #21546 > > 00:38:32 verbose #21547 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:32 verbose #21548 > > inl routes children : view = 00:38:32 verbose #21549 > > inl children : () -> fragment = children |> rust.emit 00:38:32 verbose #21550 > > tag_closed_raw "leptos_router::Routes" [[ 00:38:32 verbose #21551 > > $'"children=Box::new(move || !children(()))"' 00:38:32 verbose #21552 > > ]] 00:38:32 verbose #21553 > > |> macro_to_view 00:38:33 verbose #21554 > > 00:38:33 verbose #21555 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:33 verbose #21556 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:33 verbose #21557 > > │ ### a' │ 00:38:33 verbose #21558 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:33 verbose #21559 > > 00:38:33 verbose #21560 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:33 verbose #21561 > > inl a' props children : _ a' = 00:38:33 verbose #21562 > > tag_element "a" props children 00:38:33 verbose #21563 > > 00:38:33 verbose #21564 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:33 verbose #21565 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:33 verbose #21566 > > │ ### button │ 00:38:33 verbose #21567 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:33 verbose #21568 > > 00:38:33 verbose #21569 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:33 verbose #21570 > > inl button props children : _ button = 00:38:33 verbose #21571 > > tag_element "button" props children 00:38:33 verbose #21572 > > 00:38:33 verbose #21573 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:33 verbose #21574 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:33 verbose #21575 > > │ ### details │ 00:38:33 verbose #21576 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:33 verbose #21577 > > 00:38:33 verbose #21578 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:33 verbose #21579 > > inl details props children : _ details = 00:38:33 verbose #21580 > > tag_element "details" props children 00:38:34 verbose #21581 > > 00:38:34 verbose #21582 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:34 verbose #21583 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:34 verbose #21584 > > │ ### div │ 00:38:34 verbose #21585 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:34 verbose #21586 > > 00:38:34 verbose #21587 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:34 verbose #21588 > > inl div props children : _ div = 00:38:34 verbose #21589 > > tag_element "div" props children 00:38:34 verbose #21590 > > 00:38:34 verbose #21591 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:34 verbose #21592 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:34 verbose #21593 > > │ ### footer │ 00:38:34 verbose #21594 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:34 verbose #21595 > > 00:38:34 verbose #21596 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:34 verbose #21597 > > inl footer props children : _ footer = 00:38:34 verbose #21598 > > tag_element "footer" props children 00:38:35 verbose #21599 > > 00:38:35 verbose #21600 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:35 verbose #21601 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:35 verbose #21602 > > │ ### header │ 00:38:35 verbose #21603 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:35 verbose #21604 > > 00:38:35 verbose #21605 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:35 verbose #21606 > > inl header props children : _ header = 00:38:35 verbose #21607 > > tag_element "header" props children 00:38:35 verbose #21608 > > 00:38:35 verbose #21609 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:35 verbose #21610 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:35 verbose #21611 > > │ ### label │ 00:38:35 verbose #21612 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:35 verbose #21613 > > 00:38:35 verbose #21614 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:35 verbose #21615 > > inl label props children : _ label = 00:38:35 verbose #21616 > > tag_element "label" props children 00:38:36 verbose #21617 > > 00:38:36 verbose #21618 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:36 verbose #21619 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:36 verbose #21620 > > │ ### main │ 00:38:36 verbose #21621 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:36 verbose #21622 > > 00:38:36 verbose #21623 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:36 verbose #21624 > > inl main props children : _ main = 00:38:36 verbose #21625 > > tag_element "main" props children 00:38:36 verbose #21626 > > 00:38:36 verbose #21627 > > inl main' () = () 00:38:36 verbose #21628 > > 00:38:36 verbose #21629 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:36 verbose #21630 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:36 verbose #21631 > > │ ### nav │ 00:38:36 verbose #21632 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:36 verbose #21633 > > 00:38:36 verbose #21634 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:36 verbose #21635 > > inl nav props children : _ nav = 00:38:36 verbose #21636 > > tag_element "nav" props children 00:38:36 verbose #21637 > > 00:38:36 verbose #21638 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:36 verbose #21639 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:36 verbose #21640 > > │ ### option' │ 00:38:36 verbose #21641 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:36 verbose #21642 > > 00:38:36 verbose #21643 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:36 verbose #21644 > > inl option' props children : _ option' = 00:38:36 verbose #21645 > > tag_element "option" props children 00:38:37 verbose #21646 > > 00:38:37 verbose #21647 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:37 verbose #21648 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:37 verbose #21649 > > │ ### option' │ 00:38:37 verbose #21650 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:37 verbose #21651 > > 00:38:37 verbose #21652 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:37 verbose #21653 > > inl option' select children : _ option' = 00:38:37 verbose #21654 > > inl select : () -> bool = join select 00:38:37 verbose #21655 > > option' [[ 00:38:37 verbose #21656 > > $'"select=!select()"' 00:38:37 verbose #21657 > > 00:38:37 verbose #21658 > > ]] fun () => 00:38:37 verbose #21659 > > children |> new_text |> text_to_fragment 00:38:37 verbose #21660 > > 00:38:37 verbose #21661 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:37 verbose #21662 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:37 verbose #21663 > > │ ### pre │ 00:38:37 verbose #21664 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:37 verbose #21665 > > 00:38:37 verbose #21666 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:37 verbose #21667 > > inl pre props children : _ pre = 00:38:37 verbose #21668 > > tag_element "pre" props children 00:38:38 verbose #21669 > > 00:38:38 verbose #21670 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:38 verbose #21671 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:38 verbose #21672 > > │ ### select │ 00:38:38 verbose #21673 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:38 verbose #21674 > > 00:38:38 verbose #21675 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:38 verbose #21676 > > inl select props children : _ select = 00:38:38 verbose #21677 > > tag_element "select" props children 00:38:38 verbose #21678 > > 00:38:38 verbose #21679 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:38 verbose #21680 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:38 verbose #21681 > > │ ### span │ 00:38:38 verbose #21682 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:38 verbose #21683 > > 00:38:38 verbose #21684 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:38 verbose #21685 > > inl span props children : _ span = 00:38:38 verbose #21686 > > tag_element "span" props children 00:38:39 verbose #21687 > > 00:38:39 verbose #21688 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:39 verbose #21689 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:39 verbose #21690 > > │ ### summary │ 00:38:39 verbose #21691 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:39 verbose #21692 > > 00:38:39 verbose #21693 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:39 verbose #21694 > > inl summary props children : _ summary = 00:38:39 verbose #21695 > > tag_element "summary" props children 00:38:39 verbose #21696 > > 00:38:39 verbose #21697 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:39 verbose #21698 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:39 verbose #21699 > > │ ### table │ 00:38:39 verbose #21700 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:39 verbose #21701 > > 00:38:39 verbose #21702 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:39 verbose #21703 > > inl table props children : _ table = 00:38:39 verbose #21704 > > tag_element "table" props children 00:38:39 verbose #21705 > > 00:38:39 verbose #21706 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:39 verbose #21707 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:39 verbose #21708 > > │ ### thead │ 00:38:39 verbose #21709 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:39 verbose #21710 > > 00:38:39 verbose #21711 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:39 verbose #21712 > > inl thead props children : _ thead = 00:38:39 verbose #21713 > > tag_element "thead" props children 00:38:40 verbose #21714 > > 00:38:40 verbose #21715 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:40 verbose #21716 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:40 verbose #21717 > > │ ### tbody │ 00:38:40 verbose #21718 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:40 verbose #21719 > > 00:38:40 verbose #21720 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:40 verbose #21721 > > inl tbody props children : _ tbody = 00:38:40 verbose #21722 > > tag_element "tbody" props children 00:38:40 verbose #21723 > > 00:38:40 verbose #21724 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:40 verbose #21725 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:40 verbose #21726 > > │ ### tr │ 00:38:40 verbose #21727 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:40 verbose #21728 > > 00:38:40 verbose #21729 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:40 verbose #21730 > > inl tr props children : _ tr = 00:38:40 verbose #21731 > > tag_element "tr" props children 00:38:41 verbose #21732 > > 00:38:41 verbose #21733 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:41 verbose #21734 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:41 verbose #21735 > > │ ### th │ 00:38:41 verbose #21736 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:41 verbose #21737 > > 00:38:41 verbose #21738 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:41 verbose #21739 > > inl th props children : _ th = 00:38:41 verbose #21740 > > tag_element "th" props children 00:38:41 verbose #21741 > > 00:38:41 verbose #21742 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:41 verbose #21743 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:41 verbose #21744 > > │ ### td │ 00:38:41 verbose #21745 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:41 verbose #21746 > > 00:38:41 verbose #21747 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:41 verbose #21748 > > inl td props children : _ td = 00:38:41 verbose #21749 > > tag_element "td" props children 00:38:42 verbose #21750 > > 00:38:42 verbose #21751 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:42 verbose #21752 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:42 verbose #21753 > > │ ### svg │ 00:38:42 verbose #21754 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:42 verbose #21755 > > 00:38:42 verbose #21756 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:42 verbose #21757 > > inl svg props children : _ svg = 00:38:42 verbose #21758 > > tag_element "svg" props children 00:38:42 verbose #21759 > > 00:38:42 verbose #21760 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:42 verbose #21761 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:42 verbose #21762 > > │ ### path │ 00:38:42 verbose #21763 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:42 verbose #21764 > > 00:38:42 verbose #21765 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:42 verbose #21766 > > inl path props : _ path = 00:38:42 verbose #21767 > > tag_element "path" props (fun () => ;[[]] |> view_array_to_fragment) 00:38:43 verbose #21768 > > 00:38:43 verbose #21769 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:43 verbose #21770 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:43 verbose #21771 > > │ ### circle │ 00:38:43 verbose #21772 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:43 verbose #21773 > > 00:38:43 verbose #21774 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:43 verbose #21775 > > inl circle props : _ circle = 00:38:43 verbose #21776 > > tag_element "circle" props (fun () => ;[[]] |> view_array_to_fragment) 00:38:43 verbose #21777 > > 00:38:43 verbose #21778 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:43 verbose #21779 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:43 verbose #21780 > > │ ### rect │ 00:38:43 verbose #21781 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:43 verbose #21782 > > 00:38:43 verbose #21783 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:43 verbose #21784 > > inl rect props children : _ rect = 00:38:43 verbose #21785 > > tag_element "rect" props children 00:38:44 verbose #21786 > > 00:38:44 verbose #21787 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:44 verbose #21788 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:44 verbose #21789 > > │ ### animate │ 00:38:44 verbose #21790 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:44 verbose #21791 > > 00:38:44 verbose #21792 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:44 verbose #21793 > > inl animate props : _ animate = 00:38:44 verbose #21794 > > tag_element "animate" props (fun () => ;[[]] |> view_array_to_fragment) 00:38:44 verbose #21795 > > 00:38:44 verbose #21796 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:44 verbose #21797 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:44 verbose #21798 > > │ ### input │ 00:38:44 verbose #21799 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:44 verbose #21800 > > 00:38:44 verbose #21801 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:44 verbose #21802 > > inl input props : _ input = 00:38:44 verbose #21803 > > tag_closed "input" props 00:38:44 verbose #21804 > > 00:38:44 verbose #21805 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:44 verbose #21806 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:44 verbose #21807 > > │ ### dd │ 00:38:44 verbose #21808 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:44 verbose #21809 > > 00:38:44 verbose #21810 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:44 verbose #21811 > > inl dd props children : _ dd = 00:38:44 verbose #21812 > > tag_element "dd" props children 00:38:45 verbose #21813 > > 00:38:45 verbose #21814 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:45 verbose #21815 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:45 verbose #21816 > > │ ### dl │ 00:38:45 verbose #21817 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:45 verbose #21818 > > 00:38:45 verbose #21819 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:45 verbose #21820 > > inl dl props children : _ dl = 00:38:45 verbose #21821 > > tag_element "dl" props children 00:38:45 verbose #21822 > > 00:38:45 verbose #21823 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:45 verbose #21824 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:45 verbose #21825 > > │ ### dt │ 00:38:45 verbose #21826 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:45 verbose #21827 > > 00:38:45 verbose #21828 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:45 verbose #21829 > > inl dt props children : _ dt = 00:38:45 verbose #21830 > > tag_element "dt" props children 00:38:46 verbose #21831 > 00:01:29 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 106732 } 00:38:46 verbose #21832 > 00:01:29 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:38:46 verbose #21833 > "nbconvert", 00:38:46 verbose #21834 > "c:/home/git/polyglot/lib/spiral/leptos/leptos.dib.ipynb", 00:38:46 verbose #21835 > "--to", 00:38:46 verbose #21836 > "html", 00:38:46 verbose #21837 > "--HTMLExporter.theme=dark", 00:38:46 verbose #21838 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/leptos/leptos.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:38:48 verbose #21839 > 00:01:30 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/leptos/leptos.dib.ipynb to html 00:38:48 verbose #21840 > 00:01:30 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:38:48 verbose #21841 > 00:01:30 verbose #7 ! validate(nb) 00:38:51 verbose #21842 > 00:01:34 verbose #8 ! [NbConvertApp] Writing 593116 bytes to c:\home\git\polyglot\lib\spiral\leptos\leptos.dib.html 00:38:52 verbose #21843 > 00:01:34 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 657 } 00:38:52 verbose #21844 > 00:01:34 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 657 } 00:38:52 verbose #21845 > 00:01:34 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:38:52 verbose #21846 > "-c", 00:38:52 verbose #21847 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/leptos/leptos.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:38:52 verbose #21848 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/leptos/leptos.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:38:52 verbose #21849 > 00:01:35 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:38:52 verbose #21850 > 00:01:35 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:38:52 verbose #21851 > 00:01:35 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 107448 } 00:38:52 debug #21852 runtime.execute_with_options_async / { exit_code = 0; output_length = 114505 } 00:38:52 debug #26 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path leptos/leptos.dib --retries 3 00:38:52 debug #21853 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path util.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:38:52 verbose #21854 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "util.dib", "--retries", "3"])) } 00:38:52 verbose #21855 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:38:52 verbose #21856 > "repl", 00:38:52 verbose #21857 > "--exit-after-run", 00:38:52 verbose #21858 > "--run", 00:38:52 verbose #21859 > "c:/home/git/polyglot/lib/spiral/util.dib", 00:38:52 verbose #21860 > "--output-path", 00:38:52 verbose #21861 > "c:/home/git/polyglot/lib/spiral/util.dib.ipynb", 00:38:52 verbose #21862 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/util.dib" --output-path "c:/home/git/polyglot/lib/spiral/util.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:38:54 verbose #21863 > > 00:38:54 verbose #21864 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:54 verbose #21865 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:54 verbose #21866 > > │ # util │ 00:38:54 verbose #21867 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:58 verbose #21868 > > 00:38:58 verbose #21869 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:58 verbose #21870 > > //// test 00:38:58 verbose #21871 > > 00:38:58 verbose #21872 > > open testing 00:38:59 verbose #21873 > > 00:38:59 verbose #21874 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:38:59 verbose #21875 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:38:59 verbose #21876 > > │ ### ski │ 00:38:59 verbose #21877 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:38:59 verbose #21878 > > 00:38:59 verbose #21879 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:59 verbose #21880 > > union rec ski = 00:38:59 verbose #21881 > > | I 00:38:59 verbose #21882 > > | K 00:38:59 verbose #21883 > > | S 00:38:59 verbose #21884 > > | App : ski * ski 00:38:59 verbose #21885 > > 00:38:59 verbose #21886 > > inl rec eval ski = 00:38:59 verbose #21887 > > match ski with 00:38:59 verbose #21888 > > | App (App (K, x), y) => x |> eval 00:38:59 verbose #21889 > > | App (App (App (S, x), y), z) => App (App (x, z), App (y, z)) |> eval 00:38:59 verbose #21890 > > | App (I, x) => x |> eval 00:38:59 verbose #21891 > > | App (K, x) => App (K, eval x) 00:38:59 verbose #21892 > > | App (f, x) => App (eval f, x) |> eval 00:38:59 verbose #21893 > > | _ => ski 00:38:59 verbose #21894 > > 00:38:59 verbose #21895 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:38:59 verbose #21896 > > //// test 00:38:59 verbose #21897 > > 00:38:59 verbose #21898 > > eval I 00:38:59 verbose #21899 > > |> _assert_eq I 00:38:59 verbose #21900 > > 00:38:59 verbose #21901 > > App (I, I) 00:38:59 verbose #21902 > > |> eval 00:38:59 verbose #21903 > > |> _assert_eq I 00:38:59 verbose #21904 > > 00:38:59 verbose #21905 > > App (I, App (I, I)) 00:38:59 verbose #21906 > > |> eval 00:38:59 verbose #21907 > > |> _assert_eq I 00:38:59 verbose #21908 > > 00:38:59 verbose #21909 > > App (App (I, I), I) 00:38:59 verbose #21910 > > |> eval 00:38:59 verbose #21911 > > |> _assert_eq I 00:38:59 verbose #21912 > > 00:38:59 verbose #21913 > > App (App (App (I, I), I), I) 00:38:59 verbose #21914 > > |> eval 00:38:59 verbose #21915 > > |> _assert_eq I 00:38:59 verbose #21916 > > 00:38:59 verbose #21917 > > eval K 00:38:59 verbose #21918 > > |> _assert_eq K 00:38:59 verbose #21919 > > 00:38:59 verbose #21920 > > App (K, I) 00:38:59 verbose #21921 > > |> eval 00:38:59 verbose #21922 > > |> _assert_eq (App (K, I)) 00:38:59 verbose #21923 > > 00:38:59 verbose #21924 > > App (K, K) 00:38:59 verbose #21925 > > |> eval 00:38:59 verbose #21926 > > |> _assert_eq (App (K, K)) 00:38:59 verbose #21927 > > 00:38:59 verbose #21928 > > App (App (K, I), K) 00:38:59 verbose #21929 > > |> eval 00:38:59 verbose #21930 > > |> _assert_eq I 00:38:59 verbose #21931 > > 00:38:59 verbose #21932 > > App (App (K, K), I) 00:38:59 verbose #21933 > > |> eval 00:38:59 verbose #21934 > > |> _assert_eq K 00:38:59 verbose #21935 > > 00:38:59 verbose #21936 > > App (App (App (App (K, K), I), S), K) 00:38:59 verbose #21937 > > |> eval 00:38:59 verbose #21938 > > |> _assert_eq S 00:38:59 verbose #21939 > > 00:38:59 verbose #21940 > > eval S 00:38:59 verbose #21941 > > |> _assert_eq S 00:38:59 verbose #21942 > > 00:38:59 verbose #21943 > > App (App (App (S, I), I), I) 00:38:59 verbose #21944 > > |> eval 00:38:59 verbose #21945 > > |> _assert_eq I 00:38:59 verbose #21946 > > 00:38:59 verbose #21947 > > App (App (App (S, K), K), I) 00:38:59 verbose #21948 > > |> eval 00:38:59 verbose #21949 > > |> _assert_eq I 00:38:59 verbose #21950 > > 00:38:59 verbose #21951 > > App (App (App (S, K), I), (App (App (K, I), S))) 00:38:59 verbose #21952 > > |> eval 00:38:59 verbose #21953 > > |> _assert_eq I 00:38:59 verbose #21954 > > 00:38:59 verbose #21955 > > App (App (K, S), App (I, App (App (App (S, K), S), I))) 00:38:59 verbose #21956 > > |> eval 00:38:59 verbose #21957 > > |> _assert_eq S 00:38:59 verbose #21958 > > 00:38:59 verbose #21959 > > App (App (App (S, K), I), K) 00:38:59 verbose #21960 > > |> eval 00:38:59 verbose #21961 > > |> _assert_eq K 00:39:01 verbose #21962 > > 00:39:01 verbose #21963 > > ╭─[ 1.62s - stdout ]───────────────────────────────────────────────────────────╮ 00:39:01 verbose #21964 > > │ __assert_eq / actual: UH0_0 / expected: UH0_0 │ 00:39:01 verbose #21965 > > │ __assert_eq / actual: UH0_0 / expected: UH0_0 │ 00:39:01 verbose #21966 > > │ __assert_eq / actual: UH0_0 / expected: UH0_0 │ 00:39:01 verbose #21967 > > │ __assert_eq / actual: UH0_0 / expected: UH0_0 │ 00:39:01 verbose #21968 > > │ __assert_eq / actual: UH0_0 / expected: UH0_0 │ 00:39:01 verbose #21969 > > │ __assert_eq / actual: UH0_1 / expected: UH0_1 │ 00:39:01 verbose #21970 > > │ __assert_eq / actual: UH0_3 (UH0_1, UH0_0) / expected: UH0_3 (UH0_1, UH0_0) │ 00:39:01 verbose #21971 > > │ __assert_eq / actual: UH0_3 (UH0_1, UH0_1) / expected: UH0_3 (UH0_1, UH0_1) │ 00:39:01 verbose #21972 > > │ __assert_eq / actual: UH0_0 / expected: UH0_0 │ 00:39:01 verbose #21973 > > │ __assert_eq / actual: UH0_1 / expected: UH0_1 │ 00:39:01 verbose #21974 > > │ __assert_eq / actual: UH0_2 / expected: UH0_2 │ 00:39:01 verbose #21975 > > │ __assert_eq / actual: UH0_2 / expected: UH0_2 │ 00:39:01 verbose #21976 > > │ __assert_eq / actual: UH0_0 / expected: UH0_0 │ 00:39:01 verbose #21977 > > │ __assert_eq / actual: UH0_0 / expected: UH0_0 │ 00:39:01 verbose #21978 > > │ __assert_eq / actual: UH0_0 / expected: UH0_0 │ 00:39:01 verbose #21979 > > │ __assert_eq / actual: UH0_2 / expected: UH0_2 │ 00:39:01 verbose #21980 > > │ __assert_eq / actual: UH0_1 / expected: UH0_1 │ 00:39:01 verbose #21981 > > │ │ 00:39:01 verbose #21982 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:01 verbose #21983 > 00:00:08 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 3706 } 00:39:01 verbose #21984 > 00:00:08 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:39:01 verbose #21985 > "nbconvert", 00:39:01 verbose #21986 > "c:/home/git/polyglot/lib/spiral/util.dib.ipynb", 00:39:01 verbose #21987 > "--to", 00:39:01 verbose #21988 > "html", 00:39:01 verbose #21989 > "--HTMLExporter.theme=dark", 00:39:01 verbose #21990 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/util.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:39:03 verbose #21991 > 00:00:10 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/util.dib.ipynb to html 00:39:03 verbose #21992 > 00:00:10 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:39:03 verbose #21993 > 00:00:10 verbose #7 ! validate(nb) 00:39:04 verbose #21994 > 00:00:12 verbose #8 ! [NbConvertApp] Writing 284347 bytes to c:\home\git\polyglot\lib\spiral\util.dib.html 00:39:04 verbose #21995 > 00:00:12 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 639 } 00:39:04 verbose #21996 > 00:00:12 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 639 } 00:39:04 verbose #21997 > 00:00:12 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:39:04 verbose #21998 > "-c", 00:39:04 verbose #21999 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/util.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:39:04 verbose #22000 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/util.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:39:05 verbose #22001 > 00:00:12 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:39:05 verbose #22002 > 00:00:12 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:39:05 verbose #22003 > 00:00:12 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 4404 } 00:39:05 debug #22004 runtime.execute_with_options_async / { exit_code = 0; output_length = 7302 } 00:39:05 debug #27 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path util.dib --retries 3 00:39:05 debug #22005 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path platform.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:39:05 verbose #22006 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "platform.dib", "--retries", "3"])) } 00:39:05 verbose #22007 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:39:05 verbose #22008 > "repl", 00:39:05 verbose #22009 > "--exit-after-run", 00:39:05 verbose #22010 > "--run", 00:39:05 verbose #22011 > "c:/home/git/polyglot/lib/spiral/platform.dib", 00:39:05 verbose #22012 > "--output-path", 00:39:05 verbose #22013 > "c:/home/git/polyglot/lib/spiral/platform.dib.ipynb", 00:39:05 verbose #22014 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/platform.dib" --output-path "c:/home/git/polyglot/lib/spiral/platform.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:39:07 verbose #22015 > > 00:39:07 verbose #22016 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:07 verbose #22017 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:07 verbose #22018 > > │ # platform │ 00:39:07 verbose #22019 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:11 verbose #22020 > > 00:39:11 verbose #22021 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:11 verbose #22022 > > open rust.rust_operators 00:39:12 verbose #22023 > > 00:39:12 verbose #22024 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:12 verbose #22025 > > //// test 00:39:12 verbose #22026 > > 00:39:12 verbose #22027 > > open testing 00:39:12 verbose #22028 > > 00:39:12 verbose #22029 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:12 verbose #22030 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:12 verbose #22031 > > │ ## fsharp │ 00:39:12 verbose #22032 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:12 verbose #22033 > > 00:39:12 verbose #22034 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:12 verbose #22035 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:12 verbose #22036 > > │ ### os_platform │ 00:39:12 verbose #22037 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:12 verbose #22038 > > 00:39:12 verbose #22039 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:12 verbose #22040 > > nominal os_platform' = $'System.Runtime.InteropServices.OSPlatform' 00:39:12 verbose #22041 > > 00:39:12 verbose #22042 > > union os_platform = 00:39:12 verbose #22043 > > | FreeBSD 00:39:12 verbose #22044 > > | Linux 00:39:12 verbose #22045 > > | OSX 00:39:12 verbose #22046 > > | Windows 00:39:12 verbose #22047 > > 00:39:12 verbose #22048 > > inl os_platform = function 00:39:12 verbose #22049 > > | FreeBSD => $'`os_platform'.FreeBSD' : os_platform' 00:39:12 verbose #22050 > > | Linux => $'`os_platform'.Linux' : os_platform' 00:39:12 verbose #22051 > > | OSX => $'`os_platform'.OSX' : os_platform' 00:39:12 verbose #22052 > > | Windows => $'`os_platform'.Windows' : os_platform' 00:39:13 verbose #22053 > > 00:39:13 verbose #22054 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:13 verbose #22055 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:13 verbose #22056 > > │ ### run_platform │ 00:39:13 verbose #22057 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:13 verbose #22058 > > 00:39:13 verbose #22059 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:13 verbose #22060 > > inl run_platform forall t. (fn : os_platform -> (() -> t)) : t = 00:39:13 verbose #22061 > > inl result = dyn true 00:39:13 verbose #22062 > > $'let mutable _!result : `t option = None ' 00:39:13 verbose #22063 > > $'\n#if _FREEBSD' 00:39:13 verbose #22064 > > fn FreeBSD () |> emit_unit 00:39:13 verbose #22065 > > $'#endif\n#if _LINUX' 00:39:13 verbose #22066 > > fn Linux () |> emit_unit 00:39:13 verbose #22067 > > $'#endif\n#if _OSX' 00:39:13 verbose #22068 > > fn OSX () |> emit_unit 00:39:13 verbose #22069 > > $'#endif\n#if _WINDOWS' 00:39:13 verbose #22070 > > fn Windows () |> emit_unit 00:39:13 verbose #22071 > > $'#endif' 00:39:13 verbose #22072 > > $'|> fun x -> _!result <- Some x' 00:39:13 verbose #22073 > > $'match _!result with Some x -> x | None -> failwith "runtime.run_platform 00:39:13 verbose #22074 > > _!result=None"' 00:39:13 verbose #22075 > > 00:39:13 verbose #22076 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:13 verbose #22077 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:13 verbose #22078 > > │ ### is_os_platform │ 00:39:13 verbose #22079 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:13 verbose #22080 > > 00:39:13 verbose #22081 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:13 verbose #22082 > > inl is_os_platform (x : os_platform') : bool = 00:39:13 verbose #22083 > > x |> $'System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform' 00:39:14 verbose #22084 > > 00:39:14 verbose #22085 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:14 verbose #22086 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:14 verbose #22087 > > │ ### is_windows' │ 00:39:14 verbose #22088 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:14 verbose #22089 > > 00:39:14 verbose #22090 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:14 verbose #22091 > > inl is_windows' () : bool = 00:39:14 verbose #22092 > > run_platform function 00:39:14 verbose #22093 > > | Windows => fun () => true 00:39:14 verbose #22094 > > | _ => fun () => false 00:39:14 verbose #22095 > > 00:39:14 verbose #22096 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:14 verbose #22097 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:14 verbose #22098 > > │ ## platform │ 00:39:14 verbose #22099 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:14 verbose #22100 > > 00:39:14 verbose #22101 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:14 verbose #22102 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:14 verbose #22103 > > │ ### is_windows │ 00:39:14 verbose #22104 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:14 verbose #22105 > > 00:39:14 verbose #22106 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:14 verbose #22107 > > inl is_windows () : bool = 00:39:14 verbose #22108 > > run_target function 00:39:14 verbose #22109 > > | Rust _ => fun () => 00:39:14 verbose #22110 > > !\($'"cfg\!(windows)"') 00:39:14 verbose #22111 > > | Fsharp _ => fun () => 00:39:14 verbose #22112 > > Windows |> os_platform |> is_os_platform 00:39:14 verbose #22113 > > | target => fun () => failwith $'$"platform.is_windows / target: 00:39:14 verbose #22114 > > {!target}"' 00:39:14 verbose #22115 > > 00:39:14 verbose #22116 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:14 verbose #22117 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:14 verbose #22118 > > │ ### get_executable_suffix │ 00:39:14 verbose #22119 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:14 verbose #22120 > > 00:39:14 verbose #22121 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:14 verbose #22122 > > inl get_executable_suffix () = 00:39:14 verbose #22123 > > if is_windows () 00:39:14 verbose #22124 > > then ".exe" 00:39:14 verbose #22125 > > else "" 00:39:15 verbose #22126 > > 00:39:15 verbose #22127 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:15 verbose #22128 > > //// test 00:39:15 verbose #22129 > > 00:39:15 verbose #22130 > > get_executable_suffix () 00:39:16 verbose #22131 > > 00:39:16 verbose #22132 > > ╭─[ 1.49s - return value ]─────────────────────────────────────────────────────╮ 00:39:16 verbose #22133 > > │ .exe │ 00:39:16 verbose #22134 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:16 verbose #22135 > > 00:39:16 verbose #22136 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:16 verbose #22137 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:16 verbose #22138 > > │ ## main │ 00:39:16 verbose #22139 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:16 verbose #22140 > > 00:39:16 verbose #22141 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:16 verbose #22142 > > inl main () = 00:39:16 verbose #22143 > > $'let is_windows () = !is_windows ()' : () 00:39:16 verbose #22144 > > $'let get_executable_suffix () = !get_executable_suffix ()' : () 00:39:17 verbose #22145 > 00:00:12 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 6028 } 00:39:17 verbose #22146 > 00:00:12 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:39:17 verbose #22147 > "nbconvert", 00:39:17 verbose #22148 > "c:/home/git/polyglot/lib/spiral/platform.dib.ipynb", 00:39:17 verbose #22149 > "--to", 00:39:17 verbose #22150 > "html", 00:39:17 verbose #22151 > "--HTMLExporter.theme=dark", 00:39:17 verbose #22152 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/platform.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:39:19 verbose #22153 > 00:00:14 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/platform.dib.ipynb to html 00:39:19 verbose #22154 > 00:00:14 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:39:19 verbose #22155 > 00:00:14 verbose #7 ! validate(nb) 00:39:20 verbose #22156 > 00:00:15 verbose #8 ! [NbConvertApp] Writing 288002 bytes to c:\home\git\polyglot\lib\spiral\platform.dib.html 00:39:20 verbose #22157 > 00:00:15 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 647 } 00:39:20 verbose #22158 > 00:00:15 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 647 } 00:39:20 verbose #22159 > 00:00:15 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:39:20 verbose #22160 > "-c", 00:39:20 verbose #22161 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/platform.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:39:20 verbose #22162 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/platform.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:39:21 verbose #22163 > 00:00:16 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:39:21 verbose #22164 > 00:00:16 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:39:21 verbose #22165 > 00:00:16 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 6734 } 00:39:21 debug #22166 runtime.execute_with_options_async / { exit_code = 0; output_length = 9688 } 00:39:21 debug #28 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path platform.dib --retries 3 00:39:21 debug #22167 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path stream.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:39:21 verbose #22168 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "stream.dib", "--retries", "3"])) } 00:39:21 verbose #22169 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:39:21 verbose #22170 > "repl", 00:39:21 verbose #22171 > "--exit-after-run", 00:39:21 verbose #22172 > "--run", 00:39:21 verbose #22173 > "c:/home/git/polyglot/lib/spiral/stream.dib", 00:39:21 verbose #22174 > "--output-path", 00:39:21 verbose #22175 > "c:/home/git/polyglot/lib/spiral/stream.dib.ipynb", 00:39:21 verbose #22176 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/stream.dib" --output-path "c:/home/git/polyglot/lib/spiral/stream.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:39:23 verbose #22177 > > 00:39:23 verbose #22178 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:23 verbose #22179 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:23 verbose #22180 > > │ # stream │ 00:39:23 verbose #22181 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:26 verbose #22182 > > 00:39:26 verbose #22183 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:26 verbose #22184 > > open rust.rust_operators 00:39:28 verbose #22185 > > 00:39:28 verbose #22186 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:28 verbose #22187 > > //// test 00:39:28 verbose #22188 > > 00:39:28 verbose #22189 > > open testing 00:39:28 verbose #22190 > > 00:39:28 verbose #22191 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:28 verbose #22192 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:28 verbose #22193 > > │ ## stream │ 00:39:28 verbose #22194 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:28 verbose #22195 > > 00:39:28 verbose #22196 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:28 verbose #22197 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:28 verbose #22198 > > │ ### stream │ 00:39:28 verbose #22199 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:28 verbose #22200 > > 00:39:28 verbose #22201 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:28 verbose #22202 > > union rec stream t = 00:39:28 verbose #22203 > > | StreamCons : t * (() -> stream t) 00:39:28 verbose #22204 > > | StreamNil 00:39:28 verbose #22205 > > 00:39:28 verbose #22206 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:28 verbose #22207 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:28 verbose #22208 > > │ ### fold │ 00:39:28 verbose #22209 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:28 verbose #22210 > > 00:39:28 verbose #22211 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:28 verbose #22212 > > inl fold fn init s = 00:39:28 verbose #22213 > > inl rec body acc = function 00:39:28 verbose #22214 > > | StreamCons (st, fn') => loop (fn acc st) (fn' ()) 00:39:28 verbose #22215 > > | StreamNil => acc 00:39:28 verbose #22216 > > and inl loop acc = join_body body acc 00:39:28 verbose #22217 > > loop init s 00:39:29 verbose #22218 > > 00:39:29 verbose #22219 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:29 verbose #22220 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:29 verbose #22221 > > │ ### fold_back │ 00:39:29 verbose #22222 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:29 verbose #22223 > > 00:39:29 verbose #22224 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:29 verbose #22225 > > inl fold_back fn s init = 00:39:29 verbose #22226 > > inl rec body acc = function 00:39:29 verbose #22227 > > | StreamCons (st, fn') => fn st (loop acc (fn' ())) 00:39:29 verbose #22228 > > | StreamNil => acc 00:39:29 verbose #22229 > > and inl loop acc = join_body body acc 00:39:29 verbose #22230 > > loop init s 00:39:29 verbose #22231 > > 00:39:29 verbose #22232 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:29 verbose #22233 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:29 verbose #22234 > > │ ### to_list │ 00:39:29 verbose #22235 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:29 verbose #22236 > > 00:39:29 verbose #22237 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:29 verbose #22238 > > inl to_list s = 00:39:29 verbose #22239 > > (s, [[]]) 00:39:29 verbose #22240 > > ||> fold_back fun x acc => 00:39:29 verbose #22241 > > x :: acc 00:39:30 verbose #22242 > > 00:39:30 verbose #22243 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:30 verbose #22244 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:30 verbose #22245 > > │ ### rev │ 00:39:30 verbose #22246 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:30 verbose #22247 > > 00:39:30 verbose #22248 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:30 verbose #22249 > > inl rev s = 00:39:30 verbose #22250 > > (StreamNil, s) 00:39:30 verbose #22251 > > ||> fold fun s x => 00:39:30 verbose #22252 > > StreamCons (x, fun () => s) 00:39:30 verbose #22253 > > 00:39:30 verbose #22254 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:30 verbose #22255 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:30 verbose #22256 > > │ ### from_list │ 00:39:30 verbose #22257 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:30 verbose #22258 > > 00:39:30 verbose #22259 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:30 verbose #22260 > > inl from_list list = 00:39:30 verbose #22261 > > (list, StreamNil) 00:39:30 verbose #22262 > > ||> listm.foldBack fun x acc => 00:39:30 verbose #22263 > > StreamCons (x, fun () => acc) 00:39:31 verbose #22264 > > 00:39:31 verbose #22265 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:31 verbose #22266 > > //// test 00:39:31 verbose #22267 > > 00:39:31 verbose #22268 > > listm.init 3i32 id 00:39:31 verbose #22269 > > |> from_list 00:39:31 verbose #22270 > > |> rev 00:39:31 verbose #22271 > > |> to_list 00:39:31 verbose #22272 > > |> _assert_eq [[ 2; 1; 0 ]] 00:39:32 verbose #22273 > > 00:39:32 verbose #22274 > > ╭─[ 1.60s - stdout ]───────────────────────────────────────────────────────────╮ 00:39:32 verbose #22275 > > │ __assert_eq / actual: UH0_1 (2, UH0_1 (1, UH0_1 (0, UH0_0))) / expected: │ 00:39:32 verbose #22276 > > │ UH0_1 (2, UH0_1 (1, UH0_1 (0, UH0_0))) │ 00:39:32 verbose #22277 > > │ │ 00:39:32 verbose #22278 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:32 verbose #22279 > > 00:39:32 verbose #22280 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:32 verbose #22281 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:32 verbose #22282 > > │ ### try_item │ 00:39:32 verbose #22283 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:32 verbose #22284 > > 00:39:32 verbose #22285 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:32 verbose #22286 > > inl try_item i s = 00:39:32 verbose #22287 > > inl rec body i = function 00:39:32 verbose #22288 > > | StreamCons (x, _) when i <= 0 => Some x 00:39:32 verbose #22289 > > | StreamCons (_, fn) => loop (i - 1) (fn ()) 00:39:32 verbose #22290 > > | StreamNil => None 00:39:32 verbose #22291 > > and inl loop acc s' = 00:39:32 verbose #22292 > > match var_is acc, var_is s' with 00:39:32 verbose #22293 > > | false, false => body acc s' 00:39:32 verbose #22294 > > | _ => 00:39:32 verbose #22295 > > inl acc = dyn acc 00:39:32 verbose #22296 > > inl s' = dyn s' 00:39:32 verbose #22297 > > join body acc s' 00:39:32 verbose #22298 > > loop i s 00:39:32 verbose #22299 > > 00:39:32 verbose #22300 > > inl item i = 00:39:32 verbose #22301 > > try_item i >> optionm.value 00:39:33 verbose #22302 > > 00:39:33 verbose #22303 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:33 verbose #22304 > > //// test 00:39:33 verbose #22305 > > 00:39:33 verbose #22306 > > listm.init 10i32 id 00:39:33 verbose #22307 > > |> from_list 00:39:33 verbose #22308 > > |> item 9i32 00:39:33 verbose #22309 > > |> _assert_eq 9 00:39:33 verbose #22310 > > 00:39:33 verbose #22311 > > ╭─[ 390.28ms - stdout ]────────────────────────────────────────────────────────╮ 00:39:33 verbose #22312 > > │ __assert_eq / actual: 9 / expected: 9 │ 00:39:33 verbose #22313 > > │ │ 00:39:33 verbose #22314 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:33 verbose #22315 > > 00:39:33 verbose #22316 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:33 verbose #22317 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:33 verbose #22318 > > │ ### new_infinite_stream │ 00:39:33 verbose #22319 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:33 verbose #22320 > > 00:39:33 verbose #22321 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:33 verbose #22322 > > inl new_infinite_stream fn = 00:39:33 verbose #22323 > > inl rec loop n = 00:39:33 verbose #22324 > > StreamCons (fn n, fun () => loop (n + 1)) 00:39:33 verbose #22325 > > loop 0 00:39:33 verbose #22326 > > 00:39:33 verbose #22327 > > inl new_infinite_stream_ fn = 00:39:33 verbose #22328 > > let rec loop n = 00:39:33 verbose #22329 > > StreamCons (fn n, fun () => loop (n + 1)) 00:39:33 verbose #22330 > > loop 0 00:39:33 verbose #22331 > > 00:39:33 verbose #22332 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:33 verbose #22333 > > //// test 00:39:33 verbose #22334 > > 00:39:33 verbose #22335 > > new_infinite_stream print_and_return 00:39:33 verbose #22336 > > |> item 4i32 00:39:33 verbose #22337 > > |> _assert_eq 4i32 00:39:34 verbose #22338 > > 00:39:34 verbose #22339 > > ╭─[ 428.39ms - stdout ]────────────────────────────────────────────────────────╮ 00:39:34 verbose #22340 > > │ print_and_return / x: 0 │ 00:39:34 verbose #22341 > > │ print_and_return / x: 1 │ 00:39:34 verbose #22342 > > │ print_and_return / x: 2 │ 00:39:34 verbose #22343 > > │ print_and_return / x: 3 │ 00:39:34 verbose #22344 > > │ print_and_return / x: 4 │ 00:39:34 verbose #22345 > > │ __assert_eq / actual: 4 / expected: 4 │ 00:39:34 verbose #22346 > > │ │ 00:39:34 verbose #22347 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:34 verbose #22348 > > 00:39:34 verbose #22349 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:34 verbose #22350 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:34 verbose #22351 > > │ ### new_finite_stream │ 00:39:34 verbose #22352 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:34 verbose #22353 > > 00:39:34 verbose #22354 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:34 verbose #22355 > > inl new_finite_stream fn max = 00:39:34 verbose #22356 > > inl rec loop n = 00:39:34 verbose #22357 > > if n >= max 00:39:34 verbose #22358 > > then StreamNil 00:39:34 verbose #22359 > > else StreamCons (fn n, fun () => loop (n + 1)) 00:39:34 verbose #22360 > > loop 0 00:39:34 verbose #22361 > > 00:39:34 verbose #22362 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:34 verbose #22363 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:34 verbose #22364 > > │ ### memoize │ 00:39:34 verbose #22365 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:34 verbose #22366 > > 00:39:34 verbose #22367 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:34 verbose #22368 > > union memoized_stream t = 00:39:34 verbose #22369 > > | NotComputed : () -> stream t 00:39:34 verbose #22370 > > | Computed : stream t 00:39:34 verbose #22371 > > 00:39:34 verbose #22372 > > inl memoize s = 00:39:34 verbose #22373 > > inl rec body s = 00:39:34 verbose #22374 > > inl state = mut (NotComputed s) 00:39:34 verbose #22375 > > fun () => 00:39:34 verbose #22376 > > match *state with 00:39:34 verbose #22377 > > | Computed x => x 00:39:34 verbose #22378 > > | NotComputed fn => 00:39:34 verbose #22379 > > inl new_state = 00:39:34 verbose #22380 > > match fn () with 00:39:34 verbose #22381 > > | StreamNil => StreamNil 00:39:34 verbose #22382 > > | StreamCons (x, fn) => StreamCons (x, loop fn) 00:39:34 verbose #22383 > > state <- Computed new_state 00:39:34 verbose #22384 > > new_state 00:39:34 verbose #22385 > > and inl loop s' = join_body_unit body s s' 00:39:34 verbose #22386 > > loop (fun () => s) 00:39:35 verbose #22387 > > 00:39:35 verbose #22388 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:35 verbose #22389 > > //// test 00:39:35 verbose #22390 > > 00:39:35 verbose #22391 > > inl memo_stream = new_finite_stream print_and_return 10 |> memoize 00:39:35 verbose #22392 > > 00:39:35 verbose #22393 > > memo_stream () 00:39:35 verbose #22394 > > |> item 3i32 00:39:35 verbose #22395 > > |> _assert_eq 3i32 00:39:35 verbose #22396 > > 00:39:35 verbose #22397 > > memo_stream () 00:39:35 verbose #22398 > > |> item 5i32 00:39:35 verbose #22399 > > |> _assert_eq 5i32 00:39:36 verbose #22400 > > 00:39:36 verbose #22401 > > ╭─[ 862.86ms - stdout ]────────────────────────────────────────────────────────╮ 00:39:36 verbose #22402 > > │ print_and_return / x: 0 │ 00:39:36 verbose #22403 > > │ print_and_return / x: 1 │ 00:39:36 verbose #22404 > > │ print_and_return / x: 2 │ 00:39:36 verbose #22405 > > │ print_and_return / x: 3 │ 00:39:36 verbose #22406 > > │ __assert_eq / actual: 3 / expected: 3 │ 00:39:36 verbose #22407 > > │ print_and_return / x: 4 │ 00:39:36 verbose #22408 > > │ print_and_return / x: 5 │ 00:39:36 verbose #22409 > > │ __assert_eq / actual: 5 / expected: 5 │ 00:39:36 verbose #22410 > > │ │ 00:39:36 verbose #22411 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:36 verbose #22412 > > 00:39:36 verbose #22413 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:36 verbose #22414 > > //// test 00:39:36 verbose #22415 > > 00:39:36 verbose #22416 > > inl memo_stream = new_infinite_stream_ print_and_return |> memoize 00:39:36 verbose #22417 > > 00:39:36 verbose #22418 > > memo_stream () 00:39:36 verbose #22419 > > |> item 3i32 00:39:36 verbose #22420 > > |> _assert_eq 3i32 00:39:36 verbose #22421 > > 00:39:36 verbose #22422 > > memo_stream () 00:39:36 verbose #22423 > > |> item 5i32 00:39:36 verbose #22424 > > |> _assert_eq 5i32 00:39:36 verbose #22425 > > 00:39:36 verbose #22426 > > ╭─[ 483.80ms - stdout ]────────────────────────────────────────────────────────╮ 00:39:36 verbose #22427 > > │ print_and_return / x: 0 │ 00:39:36 verbose #22428 > > │ print_and_return / x: 1 │ 00:39:36 verbose #22429 > > │ print_and_return / x: 2 │ 00:39:36 verbose #22430 > > │ print_and_return / x: 3 │ 00:39:36 verbose #22431 > > │ __assert_eq / actual: 3 / expected: 3 │ 00:39:36 verbose #22432 > > │ print_and_return / x: 4 │ 00:39:36 verbose #22433 > > │ print_and_return / x: 5 │ 00:39:36 verbose #22434 > > │ __assert_eq / actual: 5 / expected: 5 │ 00:39:36 verbose #22435 > > │ │ 00:39:36 verbose #22436 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:36 verbose #22437 > > 00:39:36 verbose #22438 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:36 verbose #22439 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:36 verbose #22440 > > │ ### unfold │ 00:39:36 verbose #22441 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:36 verbose #22442 > > 00:39:36 verbose #22443 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:36 verbose #22444 > > inl unfold f x0 = 00:39:36 verbose #22445 > > inl rec body x = 00:39:36 verbose #22446 > > match f x with 00:39:36 verbose #22447 > > | Some (x', y) => StreamCons (x', fun () => loop y) 00:39:36 verbose #22448 > > | None => StreamNil 00:39:36 verbose #22449 > > and inl loop x = join_body_unit body x0 x 00:39:36 verbose #22450 > > loop x0 00:39:37 verbose #22451 > > 00:39:37 verbose #22452 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:37 verbose #22453 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:37 verbose #22454 > > │ ### iterate │ 00:39:37 verbose #22455 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:37 verbose #22456 > > 00:39:37 verbose #22457 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:37 verbose #22458 > > inl iterate f = 00:39:37 verbose #22459 > > fun x => Some (x, f x) 00:39:37 verbose #22460 > > |> unfold 00:39:37 verbose #22461 > > 00:39:37 verbose #22462 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:37 verbose #22463 > > //// test 00:39:37 verbose #22464 > > 00:39:37 verbose #22465 > > iterate ((*) 2) 1i32 00:39:37 verbose #22466 > > |> item 10i32 00:39:37 verbose #22467 > > |> _assert_eq 1024 00:39:38 verbose #22468 > > 00:39:38 verbose #22469 > > ╭─[ 426.05ms - stdout ]────────────────────────────────────────────────────────╮ 00:39:38 verbose #22470 > > │ __assert_eq / actual: 1024 / expected: 1024 │ 00:39:38 verbose #22471 > > │ │ 00:39:38 verbose #22472 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:38 verbose #22473 > > 00:39:38 verbose #22474 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:38 verbose #22475 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:38 verbose #22476 > > │ ### iterate' │ 00:39:38 verbose #22477 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:38 verbose #22478 > > 00:39:38 verbose #22479 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:38 verbose #22480 > > inl iterate_map f m = 00:39:38 verbose #22481 > > fun x => 00:39:38 verbose #22482 > > m x 00:39:38 verbose #22483 > > |> optionm.map fun x => 00:39:38 verbose #22484 > > x, f x 00:39:38 verbose #22485 > > |> unfold 00:39:38 verbose #22486 > > 00:39:38 verbose #22487 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:38 verbose #22488 > > //// test 00:39:38 verbose #22489 > > 00:39:38 verbose #22490 > > iterate_map ((*) 2) Some 1i32 00:39:38 verbose #22491 > > |> item 10i32 00:39:38 verbose #22492 > > |> _assert_eq 1024 00:39:38 verbose #22493 > > 00:39:38 verbose #22494 > > ╭─[ 464.26ms - stdout ]────────────────────────────────────────────────────────╮ 00:39:38 verbose #22495 > > │ __assert_eq / actual: 1024 / expected: 1024 │ 00:39:38 verbose #22496 > > │ │ 00:39:38 verbose #22497 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:38 verbose #22498 > > 00:39:38 verbose #22499 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:38 verbose #22500 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:38 verbose #22501 > > │ ### take_while │ 00:39:38 verbose #22502 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:38 verbose #22503 > > 00:39:38 verbose #22504 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:38 verbose #22505 > > inl take_while cond s = 00:39:38 verbose #22506 > > inl rec body i = function 00:39:38 verbose #22507 > > | StreamCons (st, fn) when cond st i => StreamCons (st, fun () => loop 00:39:38 verbose #22508 > > (i + 1) (fn ())) 00:39:38 verbose #22509 > > | _ => StreamNil 00:39:38 verbose #22510 > > and inl loop i = join_body body i 00:39:38 verbose #22511 > > loop 0 s 00:39:39 verbose #22512 > > 00:39:39 verbose #22513 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:39 verbose #22514 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:39 verbose #22515 > > │ ### sum │ 00:39:39 verbose #22516 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:39 verbose #22517 > > 00:39:39 verbose #22518 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:39 verbose #22519 > > inl sum seq = 00:39:39 verbose #22520 > > seq |> fold (+) 0 00:39:39 verbose #22521 > > 00:39:39 verbose #22522 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:39 verbose #22523 > > //// test 00:39:39 verbose #22524 > > 00:39:39 verbose #22525 > > listm.init 10i32 id 00:39:39 verbose #22526 > > |> from_list 00:39:39 verbose #22527 > > |> sum 00:39:39 verbose #22528 > > |> _assert_eq 45 00:39:40 verbose #22529 > > 00:39:40 verbose #22530 > > ╭─[ 518.76ms - stdout ]────────────────────────────────────────────────────────╮ 00:39:40 verbose #22531 > > │ __assert_eq / actual: 45 / expected: 45 │ 00:39:40 verbose #22532 > > │ │ 00:39:40 verbose #22533 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:40 verbose #22534 > > 00:39:40 verbose #22535 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:40 verbose #22536 > > //// test 00:39:40 verbose #22537 > > 00:39:40 verbose #22538 > > new_finite_stream print_and_return 10i32 00:39:40 verbose #22539 > > |> take_while (fun n (_ : i32) => n < 5) 00:39:40 verbose #22540 > > |> sum 00:39:40 verbose #22541 > > |> _assert_eq 10 00:39:40 verbose #22542 > > 00:39:40 verbose #22543 > > ╭─[ 495.17ms - stdout ]────────────────────────────────────────────────────────╮ 00:39:40 verbose #22544 > > │ print_and_return / x: 0 │ 00:39:40 verbose #22545 > > │ print_and_return / x: 1 │ 00:39:40 verbose #22546 > > │ print_and_return / x: 2 │ 00:39:40 verbose #22547 > > │ print_and_return / x: 3 │ 00:39:40 verbose #22548 > > │ print_and_return / x: 4 │ 00:39:40 verbose #22549 > > │ print_and_return / x: 5 │ 00:39:40 verbose #22550 > > │ __assert_eq / actual: 10 / expected: 10 │ 00:39:40 verbose #22551 > > │ │ 00:39:40 verbose #22552 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:40 verbose #22553 > > 00:39:40 verbose #22554 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:40 verbose #22555 > > //// test 00:39:40 verbose #22556 > > 00:39:40 verbose #22557 > > new_infinite_stream print_and_return 00:39:40 verbose #22558 > > |> take_while (fun n (_ : i32) => n < 5i32) 00:39:40 verbose #22559 > > |> sum 00:39:40 verbose #22560 > > |> _assert_eq 10 00:39:41 verbose #22561 > > 00:39:41 verbose #22562 > > ╭─[ 423.05ms - stdout ]────────────────────────────────────────────────────────╮ 00:39:41 verbose #22563 > > │ print_and_return / x: 0 │ 00:39:41 verbose #22564 > > │ print_and_return / x: 1 │ 00:39:41 verbose #22565 > > │ print_and_return / x: 2 │ 00:39:41 verbose #22566 > > │ print_and_return / x: 3 │ 00:39:41 verbose #22567 > > │ print_and_return / x: 4 │ 00:39:41 verbose #22568 > > │ print_and_return / x: 5 │ 00:39:41 verbose #22569 > > │ __assert_eq / actual: 10 / expected: 10 │ 00:39:41 verbose #22570 > > │ │ 00:39:41 verbose #22571 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:41 verbose #22572 > > 00:39:41 verbose #22573 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:41 verbose #22574 > > //// test 00:39:41 verbose #22575 > > 00:39:41 verbose #22576 > > iterate ((*) 6) 1i32 00:39:41 verbose #22577 > > |> take_while (fun _ i => i <= 7i32) 00:39:41 verbose #22578 > > |> to_list 00:39:41 verbose #22579 > > |> _assert_eq [[ 1i32; 6; 36; 216; 1296; 7776; 46656; 279936 ]] 00:39:41 verbose #22580 > > 00:39:41 verbose #22581 > > ╭─[ 518.63ms - stdout ]────────────────────────────────────────────────────────╮ 00:39:41 verbose #22582 > > │ __assert_eq / actual: UH0_1 │ 00:39:41 verbose #22583 > > │ (1, │ 00:39:41 verbose #22584 > > │ UH0_1 │ 00:39:41 verbose #22585 > > │ (6, │ 00:39:41 verbose #22586 > > │ UH0_1 │ 00:39:41 verbose #22587 > > │ (36, │ 00:39:41 verbose #22588 > > │ UH0_1 │ 00:39:41 verbose #22589 > > │ (216, │ 00:39:41 verbose #22590 > > │ UH0_1 (1296, UH0_1 (7776, UH0_1 (46656, UH0_1 (279936, │ 00:39:41 verbose #22591 > > │ UH0_0)))))))) / expected: UH0_1 │ 00:39:41 verbose #22592 > > │ (1, │ 00:39:41 verbose #22593 > > │ UH0_1 │ 00:39:41 verbose #22594 > > │ (6, │ 00:39:41 verbose #22595 > > │ UH0_1 │ 00:39:41 verbose #22596 > > │ (36, │ 00:39:41 verbose #22597 > > │ UH0_1 │ 00:39:41 verbose #22598 > > │ (216, │ 00:39:41 verbose #22599 > > │ UH0_1 (1296, UH0_1 (7776, UH0_1 (46656, UH0_1 (279936, │ 00:39:41 verbose #22600 > > │ UH0_0)))))))) │ 00:39:41 verbose #22601 > > │ │ 00:39:41 verbose #22602 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:41 verbose #22603 > > 00:39:41 verbose #22604 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:41 verbose #22605 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:41 verbose #22606 > > │ ### indexed │ 00:39:41 verbose #22607 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:41 verbose #22608 > > 00:39:41 verbose #22609 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:41 verbose #22610 > > inl indexed s = 00:39:41 verbose #22611 > > ((StreamNil, 0), s) 00:39:41 verbose #22612 > > ||> fold fun (acc, i) x => 00:39:41 verbose #22613 > > StreamCons ((i, x), fun () => acc), i + 1 00:39:41 verbose #22614 > > |> fst 00:39:41 verbose #22615 > > |> rev 00:39:42 verbose #22616 > > 00:39:42 verbose #22617 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:42 verbose #22618 > > //// test 00:39:42 verbose #22619 > > 00:39:42 verbose #22620 > > listm.init 10i32 ((*) 2) 00:39:42 verbose #22621 > > |> from_list 00:39:42 verbose #22622 > > |> indexed 00:39:42 verbose #22623 > > |> item 5i32 00:39:42 verbose #22624 > > |> _assert_eq (5i32, 10i32) 00:39:42 verbose #22625 > > 00:39:42 verbose #22626 > > ╭─[ 497.18ms - stdout ]────────────────────────────────────────────────────────╮ 00:39:42 verbose #22627 > > │ __assert_eq / actual: struct (5, 10) / expected: struct (5, 10) │ 00:39:42 verbose #22628 > > │ │ 00:39:42 verbose #22629 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:42 verbose #22630 > > 00:39:42 verbose #22631 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:42 verbose #22632 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:42 verbose #22633 > > │ ### map │ 00:39:42 verbose #22634 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:42 verbose #22635 > > 00:39:42 verbose #22636 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:42 verbose #22637 > > inl map fn s = 00:39:42 verbose #22638 > > (s, StreamNil) 00:39:42 verbose #22639 > > ||> fold_back fun x acc => 00:39:42 verbose #22640 > > StreamCons (fn x, fun () => acc) 00:39:43 verbose #22641 > > 00:39:43 verbose #22642 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:43 verbose #22643 > > //// test 00:39:43 verbose #22644 > > 00:39:43 verbose #22645 > > listm.init 10i32 id 00:39:43 verbose #22646 > > |> from_list 00:39:43 verbose #22647 > > |> map ((*) 2) 00:39:43 verbose #22648 > > |> item 5i32 00:39:43 verbose #22649 > > |> _assert_eq 10i32 00:39:43 verbose #22650 > > 00:39:43 verbose #22651 > > ╭─[ 460.21ms - stdout ]────────────────────────────────────────────────────────╮ 00:39:43 verbose #22652 > > │ __assert_eq / actual: 10 / expected: 10 │ 00:39:43 verbose #22653 > > │ │ 00:39:43 verbose #22654 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:43 verbose #22655 > > 00:39:43 verbose #22656 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:43 verbose #22657 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:43 verbose #22658 > > │ ### zip_with │ 00:39:43 verbose #22659 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:43 verbose #22660 > > 00:39:43 verbose #22661 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:43 verbose #22662 > > inl zip_with fn s1 s2 = 00:39:43 verbose #22663 > > inl rec loop s1 s2 = 00:39:43 verbose #22664 > > match s1, s2 with 00:39:43 verbose #22665 > > | StreamCons (st1, fn1), StreamCons (st2, fn2) => 00:39:43 verbose #22666 > > StreamCons (fn st1 st2, fun () => loop (fn1 ()) (fn2 ())) 00:39:43 verbose #22667 > > | StreamNil, _ | _, StreamNil => StreamNil 00:39:43 verbose #22668 > > loop s1 s2 00:39:43 verbose #22669 > > 00:39:43 verbose #22670 > > inl zip_with_ fn s1 s2 = 00:39:43 verbose #22671 > > let rec loop s1 s2 = 00:39:43 verbose #22672 > > match s1, s2 with 00:39:43 verbose #22673 > > | StreamCons (st1, fn1), StreamCons (st2, fn2) => 00:39:43 verbose #22674 > > StreamCons (fn st1 st2, fun () => loop (fn1 ()) (fn2 ())) 00:39:43 verbose #22675 > > | StreamNil, _ | _, StreamNil => StreamNil 00:39:43 verbose #22676 > > loop s1 s2 00:39:44 verbose #22677 > > 00:39:44 verbose #22678 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:44 verbose #22679 > > //// test 00:39:44 verbose #22680 > > 00:39:44 verbose #22681 > > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list)) 00:39:44 verbose #22682 > > ||> zip_with (+) 00:39:44 verbose #22683 > > |> item 2i32 00:39:44 verbose #22684 > > |> _assert_eq 6 00:39:44 verbose #22685 > > 00:39:44 verbose #22686 > > ╭─[ 444.90ms - stdout ]────────────────────────────────────────────────────────╮ 00:39:44 verbose #22687 > > │ __assert_eq / actual: 6 / expected: 6 │ 00:39:44 verbose #22688 > > │ │ 00:39:44 verbose #22689 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:44 verbose #22690 > > 00:39:44 verbose #22691 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:44 verbose #22692 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:44 verbose #22693 > > │ ### zip │ 00:39:44 verbose #22694 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:44 verbose #22695 > > 00:39:44 verbose #22696 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:44 verbose #22697 > > inl zip s1 s2 = 00:39:44 verbose #22698 > > zip_with pair s1 s2 00:39:44 verbose #22699 > > 00:39:44 verbose #22700 > > inl zip_ s1 s2 = 00:39:44 verbose #22701 > > zip_with_ pair s1 s2 00:39:45 verbose #22702 > > 00:39:45 verbose #22703 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:45 verbose #22704 > > //// test 00:39:45 verbose #22705 > > 00:39:45 verbose #22706 > > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list)) 00:39:45 verbose #22707 > > ||> zip 00:39:45 verbose #22708 > > |> item 5i32 00:39:45 verbose #22709 > > |> _assert_eq (5, 10) 00:39:45 verbose #22710 > > 00:39:45 verbose #22711 > > ╭─[ 454.68ms - stdout ]────────────────────────────────────────────────────────╮ 00:39:45 verbose #22712 > > │ __assert_eq / actual: struct (5, 10) / expected: struct (5, 10) │ 00:39:45 verbose #22713 > > │ │ 00:39:45 verbose #22714 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:45 verbose #22715 > > 00:39:45 verbose #22716 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:45 verbose #22717 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:45 verbose #22718 > > │ ### unzip │ 00:39:45 verbose #22719 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:45 verbose #22720 > > 00:39:45 verbose #22721 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:45 verbose #22722 > > inl unzip s = 00:39:45 verbose #22723 > > inl rec body s = 00:39:45 verbose #22724 > > match s with 00:39:45 verbose #22725 > > | StreamCons ((x, y), fn) => 00:39:45 verbose #22726 > > inl xs, ys = loop (fn ()) 00:39:45 verbose #22727 > > StreamCons (x, fun () => xs), StreamCons (y, fun () => ys) 00:39:45 verbose #22728 > > | StreamNil => pair StreamNil StreamNil 00:39:45 verbose #22729 > > and inl loop x = 00:39:45 verbose #22730 > > if var_is x |> not 00:39:45 verbose #22731 > > then body x 00:39:45 verbose #22732 > > else 00:39:45 verbose #22733 > > inl x = dyn x 00:39:45 verbose #22734 > > join body x 00:39:45 verbose #22735 > > loop s 00:39:45 verbose #22736 > > 00:39:45 verbose #22737 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:45 verbose #22738 > > //// test 00:39:45 verbose #22739 > > 00:39:45 verbose #22740 > > listm.init 10i32 id 00:39:45 verbose #22741 > > |> listm.map (fun x => x, x) 00:39:45 verbose #22742 > > |> from_list 00:39:45 verbose #22743 > > |> unzip 00:39:45 verbose #22744 > > |> fun x, y => 00:39:45 verbose #22745 > > x |> sum 00:39:45 verbose #22746 > > |> _assert_eq 45 00:39:45 verbose #22747 > > 00:39:45 verbose #22748 > > y |> sum 00:39:45 verbose #22749 > > |> _assert_eq 45 00:39:46 verbose #22750 > > 00:39:46 verbose #22751 > > ╭─[ 451.10ms - stdout ]────────────────────────────────────────────────────────╮ 00:39:46 verbose #22752 > > │ __assert_eq / actual: 45 / expected: 45 │ 00:39:46 verbose #22753 > > │ __assert_eq / actual: 45 / expected: 45 │ 00:39:46 verbose #22754 > > │ │ 00:39:46 verbose #22755 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:46 verbose #22756 > > 00:39:46 verbose #22757 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:46 verbose #22758 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:46 verbose #22759 > > │ ## rust │ 00:39:46 verbose #22760 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:46 verbose #22761 > > 00:39:46 verbose #22762 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:46 verbose #22763 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:46 verbose #22764 > > │ ### io_error │ 00:39:46 verbose #22765 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:46 verbose #22766 > > 00:39:46 verbose #22767 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:46 verbose #22768 > > nominal io_error = 00:39:46 verbose #22769 > > `( 00:39:46 verbose #22770 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:39:46 verbose #22771 > > Fable.Core.Emit(\"std::io::Error\")>]]\ntype std_io_Error = class 00:39:46 verbose #22772 > > end\n#else\ntype std_io_Error = string\n#endif\n" 00:39:46 verbose #22773 > > $'' : $'std_io_Error' 00:39:46 verbose #22774 > > ) 00:39:46 verbose #22775 > > 00:39:46 verbose #22776 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:46 verbose #22777 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:46 verbose #22778 > > │ ### new_io_error │ 00:39:46 verbose #22779 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:46 verbose #22780 > > 00:39:46 verbose #22781 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:46 verbose #22782 > > inl new_io_error (text : string) : io_error = 00:39:46 verbose #22783 > > run_target_args (fun () => text) function 00:39:46 verbose #22784 > > | Rust _ => fun text => 00:39:46 verbose #22785 > > !\\(text, $'"std::io::Error::new(std::io::ErrorKind::Other, &*$0)"') 00:39:46 verbose #22786 > > | _ => fun text => text |> to 00:39:47 verbose #22787 > > 00:39:47 verbose #22788 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:47 verbose #22789 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:47 verbose #22790 > > │ ### buf_reader │ 00:39:47 verbose #22791 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:47 verbose #22792 > > 00:39:47 verbose #22793 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:47 verbose #22794 > > nominal buf_reader t = 00:39:47 verbose #22795 > > `( 00:39:47 verbose #22796 > > backend_switch `(()) `({}) { 00:39:47 verbose #22797 > > Fsharp = 00:39:47 verbose #22798 > > (fun () => 00:39:47 verbose #22799 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:39:47 verbose #22800 > > Fable.Core.Emit(\"std::io::BufReader<$0>\")>]]\n#endif\ntype 00:39:47 verbose #22801 > > std_io_BufReader<'T> = class end" 00:39:47 verbose #22802 > > ) : () -> () 00:39:47 verbose #22803 > > } 00:39:47 verbose #22804 > > $'' : $'std_io_BufReader<`t>' 00:39:47 verbose #22805 > > ) 00:39:47 verbose #22806 > > 00:39:47 verbose #22807 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:47 verbose #22808 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:47 verbose #22809 > > │ ### cursor │ 00:39:47 verbose #22810 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:47 verbose #22811 > > 00:39:47 verbose #22812 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:47 verbose #22813 > > nominal cursor t = 00:39:47 verbose #22814 > > `( 00:39:47 verbose #22815 > > backend_switch `(()) `({}) { 00:39:47 verbose #22816 > > Fsharp = 00:39:47 verbose #22817 > > (fun () => 00:39:47 verbose #22818 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:39:47 verbose #22819 > > Fable.Core.Emit(\"std::io::Cursor<$0>\")>]]\n#endif\ntype std_io_Cursor<'T> = 00:39:47 verbose #22820 > > class end" 00:39:47 verbose #22821 > > ) : () -> () 00:39:47 verbose #22822 > > } 00:39:47 verbose #22823 > > $'' : $'std_io_Cursor<`t>' 00:39:47 verbose #22824 > > ) 00:39:48 verbose #22825 > > 00:39:48 verbose #22826 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:48 verbose #22827 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:48 verbose #22828 > > │ ### async_buf_reader │ 00:39:48 verbose #22829 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:48 verbose #22830 > > 00:39:48 verbose #22831 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:48 verbose #22832 > > nominal async_buf_reader t = 00:39:48 verbose #22833 > > `( 00:39:48 verbose #22834 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:39:48 verbose #22835 > > Fable.Core.Emit(\"tokio::io::BufReader<$0>\")>]]\n#endif\ntype 00:39:48 verbose #22836 > > tokio_io_BufReader<'T> = class end" 00:39:48 verbose #22837 > > $'' : $'tokio_io_BufReader<`t>' 00:39:48 verbose #22838 > > ) 00:39:48 verbose #22839 > > 00:39:48 verbose #22840 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:48 verbose #22841 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:48 verbose #22842 > > │ ### new_buf_reader │ 00:39:48 verbose #22843 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:48 verbose #22844 > > 00:39:48 verbose #22845 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:48 verbose #22846 > > inl new_buf_reader forall t. (x : t) : buf_reader t = 00:39:48 verbose #22847 > > !\\(x, $'"std::io::BufReader::new($0)"') 00:39:49 verbose #22848 > > 00:39:49 verbose #22849 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:49 verbose #22850 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:49 verbose #22851 > > │ ### new_cursor │ 00:39:49 verbose #22852 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:49 verbose #22853 > > 00:39:49 verbose #22854 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:49 verbose #22855 > > inl new_cursor forall t. (x : t) : cursor t = 00:39:49 verbose #22856 > > !\($'"std::io::Cursor::new(!x)"') 00:39:49 verbose #22857 > > 00:39:49 verbose #22858 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:49 verbose #22859 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:49 verbose #22860 > > │ ### lines │ 00:39:49 verbose #22861 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:49 verbose #22862 > > 00:39:49 verbose #22863 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:49 verbose #22864 > > nominal lines t = 00:39:49 verbose #22865 > > `( 00:39:49 verbose #22866 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:39:49 verbose #22867 > > Fable.Core.Emit(\"std::io::Lines<$0>\")>]]\n#endif\ntype std_io_Lines<'T> = 00:39:49 verbose #22868 > > class end" 00:39:49 verbose #22869 > > $'' : $'std_io_Lines<`t>' 00:39:49 verbose #22870 > > ) 00:39:49 verbose #22871 > > 00:39:49 verbose #22872 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:49 verbose #22873 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:49 verbose #22874 > > │ ### buf_read_lines │ 00:39:49 verbose #22875 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:49 verbose #22876 > > 00:39:49 verbose #22877 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:49 verbose #22878 > > inl buf_read_lines forall t. (buf_reader : buf_reader t) : lines (buf_reader t) 00:39:49 verbose #22879 > > = 00:39:49 verbose #22880 > > !\($'"std::io::BufRead::lines(!buf_reader)"') 00:39:50 verbose #22881 > > 00:39:50 verbose #22882 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:50 verbose #22883 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:50 verbose #22884 > > │ ### decode_reader_bytes │ 00:39:50 verbose #22885 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:50 verbose #22886 > > 00:39:50 verbose #22887 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:50 verbose #22888 > > nominal decode_reader_bytes t u = 00:39:50 verbose #22889 > > `( 00:39:50 verbose #22890 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:39:50 verbose #22891 > > Fable.Core.Emit(\"encoding_rs_io::DecodeReaderBytes<$0, $1>\")>]]\n#endif\ntype 00:39:50 verbose #22892 > > encoding_rs_io_DecodeReaderBytes<'T, 'U> = class end" 00:39:50 verbose #22893 > > $'' : $'encoding_rs_io_DecodeReaderBytes<`t, `u>' 00:39:50 verbose #22894 > > ) 00:39:50 verbose #22895 > > 00:39:50 verbose #22896 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:50 verbose #22897 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:50 verbose #22898 > > │ ### decode_reader_bytes_build │ 00:39:50 verbose #22899 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:50 verbose #22900 > > 00:39:50 verbose #22901 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:50 verbose #22902 > > inl decode_reader_bytes_build forall t. (x : t) : decode_reader_bytes t (am'.vec 00:39:50 verbose #22903 > > u8) = 00:39:50 verbose #22904 > > 00:39:50 verbose #22905 > > !\($'"encoding_rs_io::DecodeReaderBytesBuilder::new().encoding(Some(encoding_rs: 00:39:50 verbose #22906 > > :UTF_8)).build(!x)"') 00:39:50 verbose #22907 > > 00:39:50 verbose #22908 > > !\($'"encoding_rs_io::DecodeReaderBytesBuilder::new().encoding(Some(encoding_rs: 00:39:50 verbose #22909 > > :UTF_8)).utf8_passthru(true).build(!x)"') 00:39:50 verbose #22910 > > !\\(x, 00:39:50 verbose #22911 > > $'"encoding_rs_io::DecodeReaderBytesBuilder::new().utf8_passthru(true).build($0) 00:39:50 verbose #22912 > > "') 00:39:50 verbose #22913 > > // !\($'"encoding_rs_io::DecodeReaderBytes::new(!x)"') 00:39:51 verbose #22914 > > 00:39:51 verbose #22915 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:51 verbose #22916 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:51 verbose #22917 > > │ ### buf_reader_read │ 00:39:51 verbose #22918 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:51 verbose #22919 > > 00:39:51 verbose #22920 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:51 verbose #22921 > > inl buf_reader_read forall el dim. (slice : am'.slice' el dim) (buf_reader : 00:39:51 verbose #22922 > > buf_reader el) : resultm.result' unativeint io_error = 00:39:51 verbose #22923 > > (!\($'"true; let mut !slice = !slice"') : bool) |> ignore 00:39:51 verbose #22924 > > !\($'"std::io::Read::read(&mut !buf_reader, &mut !slice)"') 00:39:51 verbose #22925 > > 00:39:51 verbose #22926 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:51 verbose #22927 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:51 verbose #22928 > > │ ### io_read_by_ref │ 00:39:51 verbose #22929 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:39:51 verbose #22930 > > 00:39:51 verbose #22931 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:39:51 verbose #22932 > > inl io_read_by_ref forall t. (lines : lines t) : lines t = 00:39:51 verbose #22933 > > !\\(lines, $'"std::io::Read::by_ref($0)"') 00:39:52 verbose #22934 > 00:00:30 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 34267 } 00:39:52 verbose #22935 > 00:00:30 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:39:52 verbose #22936 > "nbconvert", 00:39:52 verbose #22937 > "c:/home/git/polyglot/lib/spiral/stream.dib.ipynb", 00:39:52 verbose #22938 > "--to", 00:39:52 verbose #22939 > "html", 00:39:52 verbose #22940 > "--HTMLExporter.theme=dark", 00:39:52 verbose #22941 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/stream.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:39:54 verbose #22942 > 00:00:33 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/stream.dib.ipynb to html 00:39:54 verbose #22943 > 00:00:33 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:39:54 verbose #22944 > 00:00:33 verbose #7 ! validate(nb) 00:39:56 verbose #22945 > 00:00:35 verbose #8 ! [NbConvertApp] Writing 372099 bytes to c:\home\git\polyglot\lib\spiral\stream.dib.html 00:39:56 verbose #22946 > 00:00:35 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 643 } 00:39:56 verbose #22947 > 00:00:35 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 643 } 00:39:56 verbose #22948 > 00:00:35 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:39:56 verbose #22949 > "-c", 00:39:56 verbose #22950 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/stream.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:39:56 verbose #22951 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/stream.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:39:56 verbose #22952 > 00:00:35 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:39:56 verbose #22953 > 00:00:35 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:39:56 verbose #22954 > 00:00:35 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 34969 } 00:39:56 debug #22955 runtime.execute_with_options_async / { exit_code = 0; output_length = 39161 } 00:39:56 debug #29 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path stream.dib --retries 3 00:39:56 debug #22956 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path threading.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:39:57 verbose #22957 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "threading.dib", "--retries", "3"])) } 00:39:57 verbose #22958 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:39:57 verbose #22959 > "repl", 00:39:57 verbose #22960 > "--exit-after-run", 00:39:57 verbose #22961 > "--run", 00:39:57 verbose #22962 > "c:/home/git/polyglot/lib/spiral/threading.dib", 00:39:57 verbose #22963 > "--output-path", 00:39:57 verbose #22964 > "c:/home/git/polyglot/lib/spiral/threading.dib.ipynb", 00:39:57 verbose #22965 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/threading.dib" --output-path "c:/home/git/polyglot/lib/spiral/threading.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:39:59 verbose #22966 > > 00:39:59 verbose #22967 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:39:59 verbose #22968 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:39:59 verbose #22969 > > │ # threading │ 00:39:59 verbose #22970 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:02 verbose #22971 > > 00:40:02 verbose #22972 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:02 verbose #22973 > > open rust 00:40:02 verbose #22974 > > open rust_operators 00:40:04 verbose #22975 > > 00:40:04 verbose #22976 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:04 verbose #22977 > > //// test 00:40:04 verbose #22978 > > 00:40:04 verbose #22979 > > open testing 00:40:04 verbose #22980 > > 00:40:04 verbose #22981 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:04 verbose #22982 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:04 verbose #22983 > > │ ## rust │ 00:40:04 verbose #22984 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:04 verbose #22985 > > 00:40:04 verbose #22986 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:04 verbose #22987 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:04 verbose #22988 > > │ ### sleep │ 00:40:04 verbose #22989 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:04 verbose #22990 > > 00:40:04 verbose #22991 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:04 verbose #22992 > > inl sleep (duration : date_time.duration) : () = 00:40:04 verbose #22993 > > inl duration = join duration 00:40:04 verbose #22994 > > !\($'"std::thread::sleep(!duration)"') 00:40:04 verbose #22995 > > 00:40:04 verbose #22996 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:04 verbose #22997 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:04 verbose #22998 > > │ ### join_handle │ 00:40:04 verbose #22999 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:04 verbose #23000 > > 00:40:04 verbose #23001 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:04 verbose #23002 > > nominal join_handle t = 00:40:04 verbose #23003 > > `( 00:40:04 verbose #23004 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:40:04 verbose #23005 > > Fable.Core.Emit(\"std::thread::JoinHandle<$0>\")>]]\n#endif\ntype 00:40:04 verbose #23006 > > std_thread_JoinHandle<'T> = class end" 00:40:04 verbose #23007 > > $'' : $'std_thread_JoinHandle<`t>' 00:40:04 verbose #23008 > > ) 00:40:05 verbose #23009 > > 00:40:05 verbose #23010 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:05 verbose #23011 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:05 verbose #23012 > > │ ### spawn │ 00:40:05 verbose #23013 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:05 verbose #23014 > > 00:40:05 verbose #23015 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:05 verbose #23016 > > inl spawn forall t. depth flag (x : () -> t) : join_handle t = 00:40:05 verbose #23017 > > if flag = 1u8 00:40:05 verbose #23018 > > then (!\($'"true; let __spawn = std::thread::spawn(move || { //"') : bool) 00:40:05 verbose #23019 > > |> ignore 00:40:05 verbose #23020 > > else (!\($'"true; let __spawn = std::thread::spawn(|| { //"') : bool) |> 00:40:05 verbose #23021 > > ignore 00:40:05 verbose #23022 > > 00:40:05 verbose #23023 > > let x' = x () 00:40:05 verbose #23024 > > inl x' = join x' 00:40:05 verbose #23025 > > 00:40:05 verbose #23026 > > x' |> rust.fix_closure depth 00:40:05 verbose #23027 > > 00:40:05 verbose #23028 > > !\($'"__spawn"') 00:40:05 verbose #23029 > > 00:40:05 verbose #23030 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:05 verbose #23031 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:05 verbose #23032 > > │ ### join' │ 00:40:05 verbose #23033 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:05 verbose #23034 > > 00:40:05 verbose #23035 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:05 verbose #23036 > > inl join' forall t. 00:40:05 verbose #23037 > > (x : join_handle t) 00:40:05 verbose #23038 > > : resultm.result' 00:40:05 verbose #23039 > > t 00:40:05 verbose #23040 > > ( 00:40:05 verbose #23041 > > rust.box ( 00:40:05 verbose #23042 > > rust.lifetime_ref 00:40:05 verbose #23043 > > rust.dyn' 00:40:05 verbose #23044 > > ( 00:40:05 verbose #23045 > > rust.lifetime_join 00:40:05 verbose #23046 > > rust.any 00:40:05 verbose #23047 > > ( 00:40:05 verbose #23048 > > rust.lifetime_ref 00:40:05 verbose #23049 > > rust.send 00:40:05 verbose #23050 > > rust.static_lifetime 00:40:05 verbose #23051 > > ) 00:40:05 verbose #23052 > > ) 00:40:05 verbose #23053 > > ) 00:40:05 verbose #23054 > > ) = 00:40:05 verbose #23055 > > !\\(x, $'"std::thread::JoinHandle::join($0)"') 00:40:06 verbose #23056 > > 00:40:06 verbose #23057 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:06 verbose #23058 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:06 verbose #23059 > > │ ### arc │ 00:40:06 verbose #23060 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:06 verbose #23061 > > 00:40:06 verbose #23062 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:06 verbose #23063 > > nominal arc t = 00:40:06 verbose #23064 > > `( 00:40:06 verbose #23065 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:40:06 verbose #23066 > > Fable.Core.Emit(\"std::sync::Arc<$0>\")>]]\n#endif\ntype std_sync_Arc<'T> = 00:40:06 verbose #23067 > > class end" 00:40:06 verbose #23068 > > $'' : $'std_sync_Arc<`t>' 00:40:06 verbose #23069 > > ) 00:40:06 verbose #23070 > > 00:40:06 verbose #23071 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:06 verbose #23072 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:06 verbose #23073 > > │ ### new_arc │ 00:40:06 verbose #23074 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:06 verbose #23075 > > 00:40:06 verbose #23076 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:06 verbose #23077 > > inl new_arc forall t. (x : t) : arc t = 00:40:06 verbose #23078 > > !\\(x, $'"std::sync::Arc::new($0)"') 00:40:07 verbose #23079 > > 00:40:07 verbose #23080 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:07 verbose #23081 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:07 verbose #23082 > > │ ### mutex │ 00:40:07 verbose #23083 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:07 verbose #23084 > > 00:40:07 verbose #23085 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:07 verbose #23086 > > nominal mutex t = 00:40:07 verbose #23087 > > `( 00:40:07 verbose #23088 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:40:07 verbose #23089 > > Fable.Core.Emit(\"std::sync::Mutex<$0>\")>]]\n#endif\ntype std_sync_Mutex<'T> = 00:40:07 verbose #23090 > > class end" 00:40:07 verbose #23091 > > $'' : $'std_sync_Mutex<`t>' 00:40:07 verbose #23092 > > ) 00:40:07 verbose #23093 > > 00:40:07 verbose #23094 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:07 verbose #23095 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:07 verbose #23096 > > │ ### new_mutex │ 00:40:07 verbose #23097 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:07 verbose #23098 > > 00:40:07 verbose #23099 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:07 verbose #23100 > > inl new_mutex forall t. (x : t) : mutex t = 00:40:07 verbose #23101 > > !\\(x, $'"std::sync::Mutex::new($0)"') 00:40:07 verbose #23102 > > 00:40:07 verbose #23103 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:07 verbose #23104 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:07 verbose #23105 > > │ ### rw_lock │ 00:40:07 verbose #23106 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:07 verbose #23107 > > 00:40:07 verbose #23108 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:07 verbose #23109 > > nominal rw_lock t = 00:40:07 verbose #23110 > > `( 00:40:07 verbose #23111 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:40:07 verbose #23112 > > Fable.Core.Emit(\"std::sync::RwLock<$0>\")>]]\n#endif\ntype std_sync_RwLock<'T> 00:40:07 verbose #23113 > > = class end" 00:40:07 verbose #23114 > > $'' : $'std_sync_RwLock<`t>' 00:40:07 verbose #23115 > > ) 00:40:08 verbose #23116 > > 00:40:08 verbose #23117 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:08 verbose #23118 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:08 verbose #23119 > > │ ### new_rw_lock │ 00:40:08 verbose #23120 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:08 verbose #23121 > > 00:40:08 verbose #23122 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:08 verbose #23123 > > inl new_rw_lock forall t. (x : t) : rw_lock t = 00:40:08 verbose #23124 > > !\\(x, $'"std::sync::RwLock::new($0)"') 00:40:08 verbose #23125 > > 00:40:08 verbose #23126 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:08 verbose #23127 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:08 verbose #23128 > > │ ### new_arc_mutex │ 00:40:08 verbose #23129 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:08 verbose #23130 > > 00:40:08 verbose #23131 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:08 verbose #23132 > > inl new_arc_mutex forall t. (x : t) : arc (mutex t) = 00:40:08 verbose #23133 > > x |> new_mutex |> new_arc 00:40:09 verbose #23134 > > 00:40:09 verbose #23135 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:09 verbose #23136 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:09 verbose #23137 > > │ ### new_arc_rw_lock │ 00:40:09 verbose #23138 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:09 verbose #23139 > > 00:40:09 verbose #23140 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:09 verbose #23141 > > inl new_arc_rw_lock forall t. (x : t) : arc (rw_lock t) = 00:40:09 verbose #23142 > > x |> new_rw_lock |> new_arc 00:40:09 verbose #23143 > > 00:40:09 verbose #23144 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:09 verbose #23145 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:09 verbose #23146 > > │ ### arc_clone │ 00:40:09 verbose #23147 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:09 verbose #23148 > > 00:40:09 verbose #23149 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:09 verbose #23150 > > inl arc_clone forall t. (x : arc t) : arc t = 00:40:09 verbose #23151 > > inl x = join x 00:40:09 verbose #23152 > > !\($'"std::sync::Arc::clone(&!x)"') 00:40:10 verbose #23153 > > 00:40:10 verbose #23154 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:10 verbose #23155 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:10 verbose #23156 > > │ ### arc_ptr_eq │ 00:40:10 verbose #23157 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:10 verbose #23158 > > 00:40:10 verbose #23159 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:10 verbose #23160 > > inl arc_ptr_eq forall t. (a : rust.ref (arc t)) (b : rust.ref (arc t)) : bool = 00:40:10 verbose #23161 > > !\\((a, b), $'"std::sync::Arc::ptr_eq($0, $1)"') 00:40:10 verbose #23162 > > 00:40:10 verbose #23163 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:10 verbose #23164 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:10 verbose #23165 > > │ ### arc_try_unwrap │ 00:40:10 verbose #23166 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:10 verbose #23167 > > 00:40:10 verbose #23168 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:10 verbose #23169 > > inl arc_try_unwrap forall t. (x : arc t) : resultm.result' t (arc t) = 00:40:10 verbose #23170 > > !\\(x, $'"std::sync::Arc::try_unwrap($0)"') 00:40:10 verbose #23171 > > 00:40:10 verbose #23172 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:10 verbose #23173 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:10 verbose #23174 > > │ ### arc_into_raw │ 00:40:10 verbose #23175 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:10 verbose #23176 > > 00:40:10 verbose #23177 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:10 verbose #23178 > > inl arc_into_raw forall t. (x : arc t) : rust.ptr t = 00:40:10 verbose #23179 > > !\\(x, $'"std::sync::Arc::into_raw($0)"') 00:40:11 verbose #23180 > > 00:40:11 verbose #23181 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:11 verbose #23182 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:11 verbose #23183 > > │ ### arc_from_raw │ 00:40:11 verbose #23184 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:11 verbose #23185 > > 00:40:11 verbose #23186 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:11 verbose #23187 > > inl arc_from_raw forall t. (x : rust.ptr t) : arc t = 00:40:11 verbose #23188 > > !\\(x, $'"std::sync::Arc::from_raw($0)"') 00:40:11 verbose #23189 > > 00:40:11 verbose #23190 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:11 verbose #23191 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:11 verbose #23192 > > │ ### partial_eq_wrapper_arc_eq │ 00:40:11 verbose #23193 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:11 verbose #23194 > > 00:40:11 verbose #23195 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:11 verbose #23196 > > inl partial_eq_wrapper_arc_eq forall t. 00:40:11 verbose #23197 > > (self : rust.ref (rust.partial_eq_wrapper (arc t))) 00:40:11 verbose #23198 > > (other : rust.ref (rust.partial_eq_wrapper (arc t))) 00:40:11 verbose #23199 > > = 00:40:11 verbose #23200 > > self 00:40:11 verbose #23201 > > |> rust.unwrap_0_ref 00:40:11 verbose #23202 > > |> arc_ptr_eq ( 00:40:11 verbose #23203 > > other 00:40:11 verbose #23204 > > |> rust.unwrap_0_ref 00:40:11 verbose #23205 > > ) 00:40:12 verbose #23206 > > 00:40:12 verbose #23207 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:12 verbose #23208 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:12 verbose #23209 > > │ ### new_partial_eq_wrapper_arc │ 00:40:12 verbose #23210 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:12 verbose #23211 > > 00:40:12 verbose #23212 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:12 verbose #23213 > > inl new_partial_eq_wrapper_arc forall t. (x : arc t) : rust.partial_eq_wrapper 00:40:12 verbose #23214 > > (arc t) = 00:40:12 verbose #23215 > > x |> rust.new_partial_eq_wrapper partial_eq_wrapper_arc_eq 00:40:12 verbose #23216 > > 00:40:12 verbose #23217 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:12 verbose #23218 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:12 verbose #23219 > > │ ### mutex_guard │ 00:40:12 verbose #23220 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:12 verbose #23221 > > 00:40:12 verbose #23222 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:12 verbose #23223 > > nominal mutex_guard t = 00:40:12 verbose #23224 > > `( 00:40:12 verbose #23225 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:40:12 verbose #23226 > > Fable.Core.Emit(\"std::sync::MutexGuard<$0>\")>]]\n#endif\ntype 00:40:12 verbose #23227 > > std_sync_MutexGuard<'T> = class end" 00:40:12 verbose #23228 > > $'' : $'std_sync_MutexGuard<`t>' 00:40:12 verbose #23229 > > ) 00:40:13 verbose #23230 > > 00:40:13 verbose #23231 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:13 verbose #23232 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:13 verbose #23233 > > │ ### rw_lock_read_guard │ 00:40:13 verbose #23234 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:13 verbose #23235 > > 00:40:13 verbose #23236 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:13 verbose #23237 > > nominal rw_lock_read_guard t = 00:40:13 verbose #23238 > > `( 00:40:13 verbose #23239 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:40:13 verbose #23240 > > Fable.Core.Emit(\"std::sync::RwLockReadGuard<$0>\")>]]\n#endif\ntype 00:40:13 verbose #23241 > > std_sync_RwLockReadGuard<'T> = class end" 00:40:13 verbose #23242 > > $'' : $'std_sync_RwLockReadGuard<`t>' 00:40:13 verbose #23243 > > ) 00:40:13 verbose #23244 > > 00:40:13 verbose #23245 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:13 verbose #23246 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:13 verbose #23247 > > │ ### rw_lock_write_guard │ 00:40:13 verbose #23248 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:13 verbose #23249 > > 00:40:13 verbose #23250 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:13 verbose #23251 > > nominal rw_lock_write_guard t = 00:40:13 verbose #23252 > > `( 00:40:13 verbose #23253 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:40:13 verbose #23254 > > Fable.Core.Emit(\"std::sync::RwLockWriteGuard<$0>\")>]]\n#endif\ntype 00:40:13 verbose #23255 > > std_sync_RwLockWriteGuard<'T> = class end" 00:40:13 verbose #23256 > > $'' : $'std_sync_RwLockWriteGuard<`t>' 00:40:13 verbose #23257 > > ) 00:40:14 verbose #23258 > > 00:40:14 verbose #23259 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:14 verbose #23260 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:14 verbose #23261 > > │ ### poison_error │ 00:40:14 verbose #23262 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:14 verbose #23263 > > 00:40:14 verbose #23264 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:14 verbose #23265 > > nominal poison_error t = 00:40:14 verbose #23266 > > `( 00:40:14 verbose #23267 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:40:14 verbose #23268 > > Fable.Core.Emit(\"std::sync::PoisonError<$0>\")>]]\n#endif\ntype 00:40:14 verbose #23269 > > std_sync_PoisonError<'T> = class end" 00:40:14 verbose #23270 > > $'' : $'std_sync_PoisonError<`t>' 00:40:14 verbose #23271 > > ) 00:40:14 verbose #23272 > > 00:40:14 verbose #23273 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:14 verbose #23274 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:14 verbose #23275 > > │ ### try_lock_error │ 00:40:14 verbose #23276 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:14 verbose #23277 > > 00:40:14 verbose #23278 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:14 verbose #23279 > > nominal try_lock_error t = 00:40:14 verbose #23280 > > `( 00:40:14 verbose #23281 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:40:14 verbose #23282 > > Fable.Core.Emit(\"std::sync::TryLockError<$0>\")>]]\n#endif\ntype 00:40:14 verbose #23283 > > std_sync_TryLockError<'T> = class end" 00:40:14 verbose #23284 > > $'' : $'std_sync_TryLockError<`t>' 00:40:14 verbose #23285 > > ) 00:40:14 verbose #23286 > > 00:40:14 verbose #23287 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:14 verbose #23288 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:14 verbose #23289 > > │ ### arc_mutex_lock │ 00:40:14 verbose #23290 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:14 verbose #23291 > > 00:40:14 verbose #23292 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:14 verbose #23293 > > inl arc_mutex_lock forall t. (x : arc (mutex t)) : resultm.result' (mutex_guard 00:40:14 verbose #23294 > > t) (poison_error (mutex_guard t)) = 00:40:14 verbose #23295 > > inl x = x |> rust.emit 00:40:14 verbose #23296 > > !\($'"!x.lock()"') 00:40:15 verbose #23297 > > 00:40:15 verbose #23298 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:15 verbose #23299 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:15 verbose #23300 > > │ ### arc_rw_lock_read │ 00:40:15 verbose #23301 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:15 verbose #23302 > > 00:40:15 verbose #23303 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:15 verbose #23304 > > inl arc_rw_lock_read forall t. (x : arc (rw_lock t)) : resultm.result' 00:40:15 verbose #23305 > > (rw_lock_read_guard t) (poison_error (rw_lock_read_guard t)) = 00:40:15 verbose #23306 > > inl x = x |> rust.emit 00:40:15 verbose #23307 > > !\($'"!x.read()"') 00:40:15 verbose #23308 > > 00:40:15 verbose #23309 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:15 verbose #23310 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:15 verbose #23311 > > │ ### arc_rw_lock_write │ 00:40:15 verbose #23312 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:15 verbose #23313 > > 00:40:15 verbose #23314 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:15 verbose #23315 > > inl arc_rw_lock_write forall t. (x : arc (rw_lock t)) : resultm.result' 00:40:15 verbose #23316 > > (rw_lock_write_guard t) (poison_error (rw_lock_write_guard t)) = 00:40:15 verbose #23317 > > inl x = x |> rust.emit 00:40:15 verbose #23318 > > !\($'"!x.write()"') 00:40:16 verbose #23319 > > 00:40:16 verbose #23320 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:16 verbose #23321 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:16 verbose #23322 > > │ ### arc_rw_lock_try_read │ 00:40:16 verbose #23323 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:16 verbose #23324 > > 00:40:16 verbose #23325 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:16 verbose #23326 > > inl arc_rw_lock_try_read forall t. (x : arc (rw_lock t)) : resultm.result' 00:40:16 verbose #23327 > > (rw_lock_read_guard t) (try_lock_error (rw_lock_read_guard t)) = 00:40:16 verbose #23328 > > inl x = x |> rust.emit 00:40:16 verbose #23329 > > !\($'"!x.try_read()"') 00:40:16 verbose #23330 > > 00:40:16 verbose #23331 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:16 verbose #23332 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:16 verbose #23333 > > │ ### arc_rw_lock_try_write │ 00:40:16 verbose #23334 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:16 verbose #23335 > > 00:40:16 verbose #23336 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:16 verbose #23337 > > inl arc_rw_lock_try_write forall t. (x : arc (rw_lock t)) : resultm.result' 00:40:16 verbose #23338 > > (rw_lock_write_guard t) (try_lock_error (rw_lock_write_guard t)) = 00:40:16 verbose #23339 > > inl x = x |> rust.emit 00:40:16 verbose #23340 > > !\($'"!x.try_write()"') 00:40:17 verbose #23341 > > 00:40:17 verbose #23342 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:17 verbose #23343 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:17 verbose #23344 > > │ ### mutex_guard_ref │ 00:40:17 verbose #23345 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:17 verbose #23346 > > 00:40:17 verbose #23347 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:17 verbose #23348 > > inl mutex_guard_ref forall t. (x : mutex_guard t) : rust.ref t = 00:40:17 verbose #23349 > > !\\(x, $'"&$0"') 00:40:17 verbose #23350 > > 00:40:17 verbose #23351 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:17 verbose #23352 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:17 verbose #23353 > > │ ### rw_lock_read_guard_ref │ 00:40:17 verbose #23354 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:17 verbose #23355 > > 00:40:17 verbose #23356 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:17 verbose #23357 > > inl rw_lock_read_guard_ref forall t. (x : rw_lock_read_guard t) : rust.ref t = 00:40:17 verbose #23358 > > !\\(x, $'"&$0"') 00:40:17 verbose #23359 > > 00:40:17 verbose #23360 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:17 verbose #23361 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:17 verbose #23362 > > │ ### rw_lock_write_guard_ref │ 00:40:17 verbose #23363 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:17 verbose #23364 > > 00:40:17 verbose #23365 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:17 verbose #23366 > > inl rw_lock_write_guard_ref forall t. (x : rw_lock_write_guard t) : rust.ref t = 00:40:17 verbose #23367 > > !\\(x, $'"&$0"') 00:40:18 verbose #23368 > > 00:40:18 verbose #23369 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:18 verbose #23370 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:18 verbose #23371 > > │ ### mutex_guard_ref_mut │ 00:40:18 verbose #23372 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:18 verbose #23373 > > 00:40:18 verbose #23374 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:18 verbose #23375 > > inl mutex_guard_ref_mut forall t. (x : mutex_guard t) : rust.ref (rust.mut' t) = 00:40:18 verbose #23376 > > inl x = join x 00:40:18 verbose #23377 > > (!\($'"true; let mut !x = !x"') : bool) |> ignore 00:40:18 verbose #23378 > > !\\(x, $'"&mut $0"') 00:40:18 verbose #23379 > > 00:40:18 verbose #23380 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:18 verbose #23381 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:18 verbose #23382 > > │ ### mutex_guard_as_mut │ 00:40:18 verbose #23383 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:18 verbose #23384 > > 00:40:18 verbose #23385 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:18 verbose #23386 > > inl mutex_guard_as_mut forall (t : * -> *) u. (x : mutex_guard (t u)) : t 00:40:18 verbose #23387 > > (rust.ref (rust.mut' u)) = 00:40:18 verbose #23388 > > (!\($'"true; let mut !x = !x"') : bool) |> ignore 00:40:18 verbose #23389 > > !\\(x, $'"$0.as_mut()"') 00:40:19 verbose #23390 > > 00:40:19 verbose #23391 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:19 verbose #23392 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:19 verbose #23393 > > │ ### channel_receiver │ 00:40:19 verbose #23394 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:19 verbose #23395 > > 00:40:19 verbose #23396 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:19 verbose #23397 > > nominal channel_receiver t = 00:40:19 verbose #23398 > > `( 00:40:19 verbose #23399 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:40:19 verbose #23400 > > Fable.Core.Emit(\"std::sync::mpsc::Receiver<$0>\")>]]\n#endif\ntype 00:40:19 verbose #23401 > > std_sync_mpsc_Receiver<'T> = class end" 00:40:19 verbose #23402 > > $'' : $'std_sync_mpsc_Receiver<`t>' 00:40:19 verbose #23403 > > ) 00:40:19 verbose #23404 > > 00:40:19 verbose #23405 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:19 verbose #23406 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:19 verbose #23407 > > │ ### channel_sender │ 00:40:19 verbose #23408 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:19 verbose #23409 > > 00:40:19 verbose #23410 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:19 verbose #23411 > > nominal channel_sender t = 00:40:19 verbose #23412 > > `( 00:40:19 verbose #23413 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:40:19 verbose #23414 > > Fable.Core.Emit(\"std::sync::mpsc::Sender<$0>\")>]]\n#endif\ntype 00:40:19 verbose #23415 > > std_sync_mpsc_Sender<'T> = class end" 00:40:19 verbose #23416 > > $'' : $'std_sync_mpsc_Sender<`t>' 00:40:19 verbose #23417 > > ) 00:40:20 verbose #23418 > > 00:40:20 verbose #23419 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:20 verbose #23420 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:20 verbose #23421 > > │ ### new_channel │ 00:40:20 verbose #23422 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:20 verbose #23423 > > 00:40:20 verbose #23424 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:20 verbose #23425 > > inl new_channel () : channel_sender sm'.std_string * arc (channel_receiver 00:40:20 verbose #23426 > > sm'.std_string) = 00:40:20 verbose #23427 > > !\($'"{ let (sender, receiver) = std::sync::mpsc::channel(); (sender, 00:40:20 verbose #23428 > > std::sync::Arc::new(receiver)) }"') 00:40:20 verbose #23429 > > 00:40:20 verbose #23430 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:20 verbose #23431 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:20 verbose #23432 > > │ ### send_error │ 00:40:20 verbose #23433 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:20 verbose #23434 > > 00:40:20 verbose #23435 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:20 verbose #23436 > > nominal send_error t = 00:40:20 verbose #23437 > > `( 00:40:20 verbose #23438 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:40:20 verbose #23439 > > Fable.Core.Emit(\"std::sync::mpsc::SendError<$0>\")>]]\n#endif\ntype 00:40:20 verbose #23440 > > std_sync_mpsc_SendError<'T> = class end" 00:40:20 verbose #23441 > > $'' : $'std_sync_mpsc_SendError<`t>' 00:40:20 verbose #23442 > > ) 00:40:20 verbose #23443 > > 00:40:20 verbose #23444 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:20 verbose #23445 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:20 verbose #23446 > > │ ### channel_send │ 00:40:20 verbose #23447 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:20 verbose #23448 > > 00:40:20 verbose #23449 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:20 verbose #23450 > > inl channel_send forall t. (line : t) (sender : rust.ref (channel_sender t)) : 00:40:20 verbose #23451 > > resultm.result' () (send_error sm'.std_string) = 00:40:20 verbose #23452 > > !\\((sender, line), $'"$0.send($1)"') 00:40:21 verbose #23453 > > 00:40:21 verbose #23454 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:21 verbose #23455 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:21 verbose #23456 > > │ ## fsharp │ 00:40:21 verbose #23457 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:21 verbose #23458 > > 00:40:21 verbose #23459 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:21 verbose #23460 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:21 verbose #23461 > > │ ### sleep' │ 00:40:21 verbose #23462 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:21 verbose #23463 > > 00:40:21 verbose #23464 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:21 verbose #23465 > > inl sleep' (n : i32) : () = 00:40:21 verbose #23466 > > run_target function 00:40:21 verbose #23467 > > | Fsharp (Native) => fun () => $'System.Threading.Thread.Sleep' n 00:40:21 verbose #23468 > > | _ => fun () => () 00:40:21 verbose #23469 > > 00:40:21 verbose #23470 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:21 verbose #23471 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:21 verbose #23472 > > │ ### thread │ 00:40:21 verbose #23473 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:21 verbose #23474 > > 00:40:21 verbose #23475 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:21 verbose #23476 > > nominal thread = $'System.Threading.Thread' 00:40:22 verbose #23477 > > 00:40:22 verbose #23478 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:22 verbose #23479 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:22 verbose #23480 > > │ ### cancellation_token │ 00:40:22 verbose #23481 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:22 verbose #23482 > > 00:40:22 verbose #23483 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:22 verbose #23484 > > nominal cancellation_token = $'System.Threading.CancellationToken' 00:40:22 verbose #23485 > > 00:40:22 verbose #23486 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:22 verbose #23487 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:22 verbose #23488 > > │ ### cancellation_token_source │ 00:40:22 verbose #23489 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:22 verbose #23490 > > 00:40:22 verbose #23491 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:22 verbose #23492 > > nominal cancellation_token_source = $'System.Threading.CancellationTokenSource' 00:40:23 verbose #23493 > > 00:40:23 verbose #23494 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:23 verbose #23495 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:23 verbose #23496 > > │ ### cancellation_token_registration │ 00:40:23 verbose #23497 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:23 verbose #23498 > > 00:40:23 verbose #23499 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:23 verbose #23500 > > nominal cancellation_token_registration = 00:40:23 verbose #23501 > > $'System.Threading.CancellationTokenRegistration' 00:40:23 verbose #23502 > > 00:40:23 verbose #23503 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:23 verbose #23504 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:23 verbose #23505 > > │ ### cancellation_source_token │ 00:40:23 verbose #23506 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:23 verbose #23507 > > 00:40:23 verbose #23508 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:23 verbose #23509 > > inl cancellation_source_token (x : cancellation_token_source) : 00:40:23 verbose #23510 > > cancellation_token = 00:40:23 verbose #23511 > > $'!x.Token' 00:40:24 verbose #23512 > > 00:40:24 verbose #23513 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:24 verbose #23514 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:24 verbose #23515 > > │ ### cancellation_source_cancel │ 00:40:24 verbose #23516 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:24 verbose #23517 > > 00:40:24 verbose #23518 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:24 verbose #23519 > > inl cancellation_source_cancel (x : cancellation_token_source) : () = 00:40:24 verbose #23520 > > run_target function 00:40:24 verbose #23521 > > | Fsharp (Native) => fun () => 00:40:24 verbose #23522 > > $'!x.Cancel' () 00:40:24 verbose #23523 > > | _ => fun () => null () 00:40:24 verbose #23524 > > 00:40:24 verbose #23525 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:24 verbose #23526 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:24 verbose #23527 > > │ ### create_linked_token_source │ 00:40:24 verbose #23528 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:24 verbose #23529 > > 00:40:24 verbose #23530 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:24 verbose #23531 > > inl create_linked_token_source (x : array_base cancellation_token) : 00:40:24 verbose #23532 > > cancellation_token_source = 00:40:24 verbose #23533 > > x |> $'System.Threading.CancellationTokenSource.CreateLinkedTokenSource' 00:40:25 verbose #23534 > > 00:40:25 verbose #23535 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:25 verbose #23536 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:25 verbose #23537 > > │ ### concurrent_stack │ 00:40:25 verbose #23538 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:25 verbose #23539 > > 00:40:25 verbose #23540 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:25 verbose #23541 > > nominal concurrent_stack t = 00:40:25 verbose #23542 > > $'System.Collections.Concurrent.ConcurrentStack<`t>' 00:40:25 verbose #23543 > > 00:40:25 verbose #23544 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:25 verbose #23545 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:25 verbose #23546 > > │ ### concurrent_stack_push │ 00:40:25 verbose #23547 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:25 verbose #23548 > > 00:40:25 verbose #23549 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:25 verbose #23550 > > inl concurrent_stack_push forall t. (item : t) (stack : concurrent_stack t) : () 00:40:25 verbose #23551 > > = 00:40:25 verbose #23552 > > $'!stack.Push' item 00:40:25 verbose #23553 > > 00:40:25 verbose #23554 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:25 verbose #23555 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:25 verbose #23556 > > │ ### token_none │ 00:40:25 verbose #23557 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:25 verbose #23558 > > 00:40:25 verbose #23559 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:25 verbose #23560 > > inl token_none () : cancellation_token = 00:40:25 verbose #23561 > > $'`cancellation_token.None' 00:40:26 verbose #23562 > > 00:40:26 verbose #23563 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:26 verbose #23564 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:26 verbose #23565 > > │ ### new_concurrent_stack │ 00:40:26 verbose #23566 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:26 verbose #23567 > > 00:40:26 verbose #23568 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:26 verbose #23569 > > inl new_concurrent_stack forall t. () : concurrent_stack t = 00:40:26 verbose #23570 > > $'System.Collections.Concurrent.ConcurrentStack<`t>' () 00:40:26 verbose #23571 > > 00:40:26 verbose #23572 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:26 verbose #23573 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:26 verbose #23574 > > │ ### token_register │ 00:40:26 verbose #23575 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:26 verbose #23576 > > 00:40:26 verbose #23577 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:26 verbose #23578 > > inl token_register (fn : () -> ()) (ct : cancellation_token) : 00:40:26 verbose #23579 > > cancellation_token_registration = 00:40:26 verbose #23580 > > fn |> $'!ct.Register' 00:40:27 verbose #23581 > > 00:40:27 verbose #23582 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:27 verbose #23583 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:27 verbose #23584 > > │ ### new_cancellation_token_source │ 00:40:27 verbose #23585 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:27 verbose #23586 > > 00:40:27 verbose #23587 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:27 verbose #23588 > > inl new_cancellation_token_source () : cancellation_token_source = 00:40:27 verbose #23589 > > $'new `cancellation_token_source ()' 00:40:27 verbose #23590 > > 00:40:27 verbose #23591 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:27 verbose #23592 > > inl token_cancellation_requested (ct : cancellation_token) : bool = 00:40:27 verbose #23593 > > $'!ct.IsCancellationRequested' 00:40:27 verbose #23594 > > 00:40:27 verbose #23595 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:27 verbose #23596 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:27 verbose #23597 > > │ ### new_disposable_token │ 00:40:27 verbose #23598 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:27 verbose #23599 > > 00:40:27 verbose #23600 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:27 verbose #23601 > > inl new_disposable_token (merge_token : optionm'.option' cancellation_token) = 00:40:27 verbose #23602 > > run_target function 00:40:27 verbose #23603 > > | Fsharp (Native) => fun () => 00:40:27 verbose #23604 > > inl cts = new_cancellation_token_source () 00:40:27 verbose #23605 > > inl cts = 00:40:27 verbose #23606 > > match merge_token |> optionm'.unbox with 00:40:27 verbose #23607 > > | None => cts 00:40:27 verbose #23608 > > | Some merge_token => 00:40:27 verbose #23609 > > create_linked_token_source ;[[ cts |> 00:40:27 verbose #23610 > > cancellation_source_token; merge_token ]] 00:40:27 verbose #23611 > > inl disposable : _ () = new_disposable fun () => 00:40:27 verbose #23612 > > cts |> cancellation_source_cancel 00:40:27 verbose #23613 > > cts |> cancellation_source_token, disposable 00:40:27 verbose #23614 > > | _ => fun () => null () 00:40:28 verbose #23615 > > 00:40:28 verbose #23616 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:28 verbose #23617 > > //// test 00:40:28 verbose #23618 > > 00:40:28 verbose #23619 > > inl run fn = 00:40:28 verbose #23620 > > inl token, disposable = new_disposable_token (None |> optionm'.box) 00:40:28 verbose #23621 > > disposable |> use |> ignore 00:40:28 verbose #23622 > > fn token 00:40:28 verbose #23623 > > fun () => 00:40:28 verbose #23624 > > fn token 00:40:28 verbose #23625 > > |> async.new_async 00:40:28 verbose #23626 > > |> async.start 00:40:28 verbose #23627 > > 00:40:28 verbose #23628 > > fun () => 00:40:28 verbose #23629 > > inl counter = mut 0i32 00:40:28 verbose #23630 > > 00:40:28 verbose #23631 > > inl fn (token : cancellation_token) = 00:40:28 verbose #23632 > > counter <- *counter + (if token |> token_cancellation_requested then 10 00:40:28 verbose #23633 > > else 1) 00:40:28 verbose #23634 > > 00:40:28 verbose #23635 > > join run fn 00:40:28 verbose #23636 > > async.sleep 10 |> async.do 00:40:28 verbose #23637 > > return *counter 00:40:28 verbose #23638 > > |> async.new_async_unit 00:40:28 verbose #23639 > > |> async.run_synchronously 00:40:28 verbose #23640 > > |> _assert_eq 11i32 00:40:30 verbose #23641 > > 00:40:30 verbose #23642 > > ╭─[ 2.15s - stdout ]───────────────────────────────────────────────────────────╮ 00:40:30 verbose #23643 > > │ __assert_eq / actual: 11 / expected: 11 │ 00:40:30 verbose #23644 > > │ │ 00:40:30 verbose #23645 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:30 verbose #23646 > > 00:40:30 verbose #23647 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:30 verbose #23648 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:30 verbose #23649 > > │ ## main │ 00:40:30 verbose #23650 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:30 verbose #23651 > > 00:40:30 verbose #23652 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:30 verbose #23653 > > inl main () = 00:40:30 verbose #23654 > > $'let new_disposable_token x = !new_disposable_token x' : () 00:40:31 verbose #23655 > 00:00:34 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 34266 } 00:40:31 verbose #23656 > 00:00:34 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:40:31 verbose #23657 > "nbconvert", 00:40:31 verbose #23658 > "c:/home/git/polyglot/lib/spiral/threading.dib.ipynb", 00:40:31 verbose #23659 > "--to", 00:40:31 verbose #23660 > "html", 00:40:31 verbose #23661 > "--HTMLExporter.theme=dark", 00:40:31 verbose #23662 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/threading.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:40:33 verbose #23663 > 00:00:36 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/threading.dib.ipynb to html 00:40:33 verbose #23664 > 00:00:36 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:40:33 verbose #23665 > 00:00:36 verbose #7 ! validate(nb) 00:40:35 verbose #23666 > 00:00:38 verbose #8 ! [NbConvertApp] Writing 377677 bytes to c:\home\git\polyglot\lib\spiral\threading.dib.html 00:40:35 verbose #23667 > 00:00:38 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 649 } 00:40:35 verbose #23668 > 00:00:38 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 649 } 00:40:35 verbose #23669 > 00:00:38 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:40:35 verbose #23670 > "-c", 00:40:35 verbose #23671 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/threading.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:40:35 verbose #23672 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/threading.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:40:35 verbose #23673 > 00:00:38 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:40:35 verbose #23674 > 00:00:38 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:40:35 verbose #23675 > 00:00:38 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 34974 } 00:40:35 debug #23676 runtime.execute_with_options_async / { exit_code = 0; output_length = 39057 } 00:40:35 debug #30 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path threading.dib --retries 3 00:40:35 debug #23677 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path benchmark.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:40:35 verbose #23678 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "benchmark.dib", "--retries", "3"])) } 00:40:35 verbose #23679 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:40:35 verbose #23680 > "repl", 00:40:35 verbose #23681 > "--exit-after-run", 00:40:35 verbose #23682 > "--run", 00:40:35 verbose #23683 > "c:/home/git/polyglot/lib/spiral/benchmark.dib", 00:40:35 verbose #23684 > "--output-path", 00:40:35 verbose #23685 > "c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb", 00:40:35 verbose #23686 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/benchmark.dib" --output-path "c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:40:37 verbose #23687 > > 00:40:37 verbose #23688 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:37 verbose #23689 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:37 verbose #23690 > > │ ## benchmark │ 00:40:37 verbose #23691 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:41 verbose #23692 > > 00:40:41 verbose #23693 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:41 verbose #23694 > > //// test 00:40:41 verbose #23695 > > 00:40:41 verbose #23696 > > open testing 00:40:42 verbose #23697 > > 00:40:42 verbose #23698 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:42 verbose #23699 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:42 verbose #23700 > > │ ## fsharp │ 00:40:42 verbose #23701 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:42 verbose #23702 > > 00:40:42 verbose #23703 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:42 verbose #23704 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:42 verbose #23705 > > │ ### test_case_result │ 00:40:42 verbose #23706 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:42 verbose #23707 > > 00:40:42 verbose #23708 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:42 verbose #23709 > > type test_case_result = 00:40:42 verbose #23710 > > { 00:40:42 verbose #23711 > > input : string 00:40:42 verbose #23712 > > expected : string 00:40:42 verbose #23713 > > result : string 00:40:42 verbose #23714 > > time_list : array_base i64 00:40:42 verbose #23715 > > } 00:40:43 verbose #23716 > > 00:40:43 verbose #23717 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:43 verbose #23718 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:43 verbose #23719 > > │ ### run' │ 00:40:43 verbose #23720 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:43 verbose #23721 > > 00:40:43 verbose #23722 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:43 verbose #23723 > > inl run' forall t. count (fn : () -> t) = 00:40:43 verbose #23724 > > runtime.gc_collect () 00:40:43 verbose #23725 > > inl stopwatch = date_time.stopwatch () 00:40:43 verbose #23726 > > stopwatch |> date_time.stopwatch_start 00:40:43 verbose #23727 > > inl time1 = stopwatch |> date_time.stopwatch_elapsed_milliseconds 00:40:43 verbose #23728 > > inl result : t = 00:40:43 verbose #23729 > > am'.init_series 0 count 1i32 00:40:43 verbose #23730 > > |> fun x => a x : _ int _ 00:40:43 verbose #23731 > > |> am'.parallel_map fun _n => fn () 00:40:43 verbose #23732 > > |> am'.last 00:40:43 verbose #23733 > > inl time2 = (stopwatch |> date_time.stopwatch_elapsed_milliseconds) - time1 00:40:43 verbose #23734 > > result, time2 00:40:43 verbose #23735 > > 00:40:43 verbose #23736 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:43 verbose #23737 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:43 verbose #23738 > > │ ### run │ 00:40:43 verbose #23739 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:43 verbose #23740 > > 00:40:43 verbose #23741 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:43 verbose #23742 > > inl run forall input expected. 00:40:43 verbose #23743 > > count 00:40:43 verbose #23744 > > (solutions : list (string * (input -> expected))) 00:40:43 verbose #23745 > > ((input, expected) : (input * expected)) 00:40:43 verbose #23746 > > : test_case_result 00:40:43 verbose #23747 > > = 00:40:43 verbose #23748 > > inl input_str = input |> sm'.format_debug 00:40:43 verbose #23749 > > 00:40:43 verbose #23750 > > console.write_line "" 00:40:43 verbose #23751 > > trace Verbose 00:40:43 verbose #23752 > > fun () => $'$"benchmark.run"' 00:40:43 verbose #23753 > > fun () => { input_str = input_str |> sm'.ellipsis_end 40 } 00:40:43 verbose #23754 > > 00:40:43 verbose #23755 > > inl results_with_time : array_base _ = 00:40:43 verbose #23756 > > solutions 00:40:43 verbose #23757 > > |> listm'.indexed 00:40:43 verbose #23758 > > |> listm'.box 00:40:43 verbose #23759 > > |> listm'.to_array' 00:40:43 verbose #23760 > > |> am'.map_base fun ((i : int), (test_name, solution)) => 00:40:43 verbose #23761 > > inl result, time = 00:40:43 verbose #23762 > > fun () => solution input 00:40:43 verbose #23763 > > |> run' count 00:40:43 verbose #23764 > > trace Verbose 00:40:43 verbose #23765 > > fun () => $'$"benchmark.run / solutions.map"' 00:40:43 verbose #23766 > > fun () => { i = i + 1; test_name time } 00:40:43 verbose #23767 > > result, time 00:40:43 verbose #23768 > > 00:40:43 verbose #23769 > > match results_with_time |> am'.map_base fst with 00:40:43 verbose #23770 > > | array when (array |> (fun x => a x : _ int _) |> am'.length) <= 1 => () 00:40:43 verbose #23771 > > | array when array |> (fun x => a x : _ int _) |> am.forall' ((=) (array |> 00:40:43 verbose #23772 > > (fun x => a x : _ int _) |> am'.index 0)) => () 00:40:43 verbose #23773 > > | results => failwith ($'$"benchmark.run / error / results: {!results}"' : 00:40:43 verbose #23774 > > string) 00:40:43 verbose #23775 > > 00:40:43 verbose #23776 > > { 00:40:43 verbose #23777 > > input = input_str 00:40:43 verbose #23778 > > expected = expected |> sm'.format_debug 00:40:43 verbose #23779 > > result = results_with_time |> am'.map_base fst |> (fun x => a x : _ int 00:40:43 verbose #23780 > > _) |> am'.index 0 |> sm'.format_debug 00:40:43 verbose #23781 > > time_list = results_with_time |> am'.map_base snd 00:40:43 verbose #23782 > > } 00:40:44 verbose #23783 > > 00:40:44 verbose #23784 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:44 verbose #23785 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:44 verbose #23786 > > │ ### run_all │ 00:40:44 verbose #23787 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:44 verbose #23788 > > 00:40:44 verbose #23789 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:44 verbose #23790 > > inl run_all forall input expected. 00:40:44 verbose #23791 > > test_name 00:40:44 verbose #23792 > > count 00:40:44 verbose #23793 > > (solutions : list (string * (input -> expected))) 00:40:44 verbose #23794 > > test_cases 00:40:44 verbose #23795 > > = 00:40:44 verbose #23796 > > console.write_line "" 00:40:44 verbose #23797 > > console.write_line "```" 00:40:44 verbose #23798 > > trace Verbose 00:40:44 verbose #23799 > > fun () => $'$"benchmark.run_all"' 00:40:44 verbose #23800 > > fun () => { test_name count } 00:40:44 verbose #23801 > > test_cases 00:40:44 verbose #23802 > > |> listm'.box 00:40:44 verbose #23803 > > |> listm'.to_array' 00:40:44 verbose #23804 > > |> am'.map_base (run count solutions) 00:40:44 verbose #23805 > > 00:40:44 verbose #23806 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:44 verbose #23807 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:44 verbose #23808 > > │ ### sort_result_list │ 00:40:44 verbose #23809 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:44 verbose #23810 > > 00:40:44 verbose #23811 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:44 verbose #23812 > > inl sort_result_list results = 00:40:44 verbose #23813 > > inl table = 00:40:44 verbose #23814 > > inl rows = 00:40:44 verbose #23815 > > results 00:40:44 verbose #23816 > > |> am'.map_base fun (result : test_case_result) => 00:40:44 verbose #23817 > > inl best = 00:40:44 verbose #23818 > > result.time_list 00:40:44 verbose #23819 > > |> am'.indexed 00:40:44 verbose #23820 > > |> am'.map_base fun (i, time) => 00:40:44 verbose #23821 > > i + 1i32, time 00:40:44 verbose #23822 > > |> fun x => a x : _ int _ 00:40:44 verbose #23823 > > |> am'.sort_by snd 00:40:44 verbose #23824 > > |> am'.index 0i32 00:40:44 verbose #23825 > > |> sm'.format 00:40:44 verbose #23826 > > inl row = 00:40:44 verbose #23827 > > [[ 00:40:44 verbose #23828 > > result.input |> sm'.ellipsis_end 40 |> sm'.replace "|" 00:40:44 verbose #23829 > > "" 00:40:44 verbose #23830 > > result.expected 00:40:44 verbose #23831 > > result.result 00:40:44 verbose #23832 > > best 00:40:44 verbose #23833 > > ]] 00:40:44 verbose #23834 > > inl color : option console.console_color = 00:40:44 verbose #23835 > > open console 00:40:44 verbose #23836 > > match result.expected = result.result with 00:40:44 verbose #23837 > > | true => Some $'`console_color.DarkGreen' 00:40:44 verbose #23838 > > | false => Some $'`console_color.DarkRed' 00:40:44 verbose #23839 > > row, color 00:40:44 verbose #23840 > > 00:40:44 verbose #23841 > > inl header = 00:40:44 verbose #23842 > > [[ 00:40:44 verbose #23843 > > [[ 00:40:44 verbose #23844 > > "input" 00:40:44 verbose #23845 > > "expected" 00:40:44 verbose #23846 > > "result" 00:40:44 verbose #23847 > > "best" 00:40:44 verbose #23848 > > ]] 00:40:44 verbose #23849 > > [[ 00:40:44 verbose #23850 > > "---" 00:40:44 verbose #23851 > > "---" 00:40:44 verbose #23852 > > "---" 00:40:44 verbose #23853 > > "---" 00:40:44 verbose #23854 > > ]] 00:40:44 verbose #23855 > > ]] 00:40:44 verbose #23856 > > |> listm.map fun row => row, None 00:40:44 verbose #23857 > > |> listm'.box 00:40:44 verbose #23858 > > |> listm'.to_array' 00:40:44 verbose #23859 > > |> fun x => a x : _ int _ 00:40:44 verbose #23860 > > a rows 00:40:44 verbose #23861 > > |> am.append header 00:40:44 verbose #23862 > > |> fun (a x) => x 00:40:44 verbose #23863 > > 00:40:44 verbose #23864 > > inl formatted_table = 00:40:44 verbose #23865 > > inl length_map : mapm.map i32 i64 = 00:40:44 verbose #23866 > > table 00:40:44 verbose #23867 > > |> am'.map_base (fst >> listm'.box >> listm'.to_array') 00:40:44 verbose #23868 > > |> am'.transpose 00:40:44 verbose #23869 > > |> am'.map_base fun column => 00:40:44 verbose #23870 > > column 00:40:44 verbose #23871 > > |> am'.map_base sm.length 00:40:44 verbose #23872 > > |> fun x => a x : _ int _ 00:40:44 verbose #23873 > > |> am'.sort_descending 00:40:44 verbose #23874 > > |> am'.try_item 0i32 00:40:44 verbose #23875 > > |> optionm'.default_value 0i64 00:40:44 verbose #23876 > > |> am'.indexed 00:40:44 verbose #23877 > > |> fun x => a x : _ int _ 00:40:44 verbose #23878 > > |> mapm.of_array 00:40:44 verbose #23879 > > table 00:40:44 verbose #23880 > > |> am'.map_base fun (row, color) => 00:40:44 verbose #23881 > > inl new_row = 00:40:44 verbose #23882 > > row 00:40:44 verbose #23883 > > |> listm'.indexed 00:40:44 verbose #23884 > > |> listm.map fun (i, cell) => 00:40:44 verbose #23885 > > cell |> sm'.pad_right (length_map |> mapm.item i |> conv) ' 00:40:44 verbose #23886 > > ' 00:40:44 verbose #23887 > > |> listm'.box 00:40:44 verbose #23888 > > |> listm'.to_array' 00:40:44 verbose #23889 > > new_row, color 00:40:44 verbose #23890 > > 00:40:44 verbose #23891 > > console.write_line "```" 00:40:44 verbose #23892 > > formatted_table 00:40:44 verbose #23893 > > |> fun x => a x : _ int _ 00:40:44 verbose #23894 > > |> am'.to_list' 00:40:44 verbose #23895 > > |> listm'.unbox 00:40:44 verbose #23896 > > |> listm.iter fun (row, color) => 00:40:44 verbose #23897 > > match color with 00:40:44 verbose #23898 > > | Some color => color |> console.set_foreground_color 00:40:44 verbose #23899 > > | None => console.reset_color () 00:40:44 verbose #23900 > > 00:40:44 verbose #23901 > > a row |> sm'.join' "\t| " |> console.write_line 00:40:44 verbose #23902 > > 00:40:44 verbose #23903 > > console.reset_color () 00:40:44 verbose #23904 > > 00:40:44 verbose #23905 > > inl averages = 00:40:44 verbose #23906 > > results 00:40:44 verbose #23907 > > |> am'.map_base fun result => 00:40:44 verbose #23908 > > result.time_list 00:40:44 verbose #23909 > > |> am'.map_base ($'float' : i64 -> f64) 00:40:44 verbose #23910 > > |> am'.transpose 00:40:44 verbose #23911 > > |> am'.map_base ((fun x => a x : _ int _) >> am'.average) 00:40:44 verbose #23912 > > |> am'.map_base ($'int64' : f64 -> i64) 00:40:44 verbose #23913 > > |> am'.indexed 00:40:44 verbose #23914 > > |> fun x => a x : _ u64 _ 00:40:44 verbose #23915 > > 00:40:44 verbose #23916 > > console.write_line "```" 00:40:44 verbose #23917 > > averages 00:40:44 verbose #23918 > > |> am'.sort_by snd 00:40:44 verbose #23919 > > |> am'.to_list' 00:40:44 verbose #23920 > > |> listm'.unbox 00:40:44 verbose #23921 > > |> listm.iter fun ((i : i32), avg) => 00:40:44 verbose #23922 > > trace Verbose 00:40:44 verbose #23923 > > fun () => $'$"benchmark.sort_result_list / averages.iter"' 00:40:44 verbose #23924 > > fun () => { i = i + 1; avg } 00:40:44 verbose #23925 > > console.write_line "```" 00:40:45 verbose #23926 > > 00:40:45 verbose #23927 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:45 verbose #23928 > > //// test 00:40:45 verbose #23929 > > 00:40:45 verbose #23930 > > inl is_fast () = 00:40:45 verbose #23931 > > false 00:40:45 verbose #23932 > > 00:40:45 verbose #23933 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:45 verbose #23934 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:45 verbose #23935 > > │ ### empty2Tests │ 00:40:45 verbose #23936 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:45 verbose #23937 > > 00:40:45 verbose #23938 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:45 verbose #23939 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:45 verbose #23940 > > │ Test: Empty2 │ 00:40:45 verbose #23941 > > │ │ 00:40:45 verbose #23942 > > │ Solution: (a, a) │ 00:40:45 verbose #23943 > > │ Test case 1. A. Time: 59L │ 00:40:45 verbose #23944 > > │ │ 00:40:45 verbose #23945 > > │ Solution: (a, a) │ 00:40:45 verbose #23946 > > │ Test case 1. A. Time: 53L │ 00:40:45 verbose #23947 > > │ │ 00:40:45 verbose #23948 > > │ Input | Expected | Result | Best │ 00:40:45 verbose #23949 > > │ --- | --- | --- | --- │ 00:40:45 verbose #23950 > > │ (a, a) | a | a | (1, 59) │ 00:40:45 verbose #23951 > > │ (a, a) | a | a | (1, 53) │ 00:40:45 verbose #23952 > > │ │ 00:40:45 verbose #23953 > > │ Averages │ 00:40:45 verbose #23954 > > │ Test case 1. Average Time: 56L │ 00:40:45 verbose #23955 > > │ │ 00:40:45 verbose #23956 > > │ Ranking │ 00:40:45 verbose #23957 > > │ Test case 1. Average Time: 56L │ 00:40:45 verbose #23958 > > │ │ 00:40:45 verbose #23959 > > │ --- │ 00:40:45 verbose #23960 > > │ │ 00:40:45 verbose #23961 > > │ │ 00:40:45 verbose #23962 > > │ ``` │ 00:40:45 verbose #23963 > > │ 01:12:03 verbose #1 benchmark.run_all / {count = 2000000; test_name = │ 00:40:45 verbose #23964 > > │ empty_2_tests} │ 00:40:45 verbose #23965 > > │ 01:12:03 verbose #2 benchmark.run / {count = 2000000; expected = a; │ 00:40:45 verbose #23966 > > │ input = a, a; input_str = struct ("a", "a")} │ 00:40:45 verbose #23967 > > │ 01:12:03 verbose #3 benchmark.run / solutions.map / {count = 2000000; │ 00:40:45 verbose #23968 > > │ expected = a; i = 0; input = a, a; input_str = struct ("a", "a"); test_name │ 00:40:45 verbose #23969 > > │ = A; time = 119} │ 00:40:45 verbose #23970 > > │ 01:12:04 verbose #4 benchmark.run / solutions.map / {count = 2000000; │ 00:40:45 verbose #23971 > > │ expected = a; i = 1; input = a, a; input_str = struct ("a", "a"); test_name │ 00:40:45 verbose #23972 > > │ = B; time = 122} │ 00:40:45 verbose #23973 > > │ 01:12:04 verbose #5 benchmark.run / {count = 2000000; expected = b; │ 00:40:45 verbose #23974 > > │ input = b, b; input_str = struct ("b", "b")} │ 00:40:45 verbose #23975 > > │ 01:12:04 verbose #6 benchmark.run / solutions.map / {count = 2000000; │ 00:40:45 verbose #23976 > > │ expected = b; i = 0; input = b, b; input_str = struct ("b", "b"); test_name │ 00:40:45 verbose #23977 > > │ = A; time = 110} │ 00:40:45 verbose #23978 > > │ 01:12:04 verbose #7 benchmark.run / solutions.map / {count = 2000000; │ 00:40:45 verbose #23979 > > │ expected = b; i = 1; input = b, b; input_str = struct ("b", "b"); test_name │ 00:40:45 verbose #23980 > > │ = B; time = 120} │ 00:40:45 verbose #23981 > > │ ``` │ 00:40:45 verbose #23982 > > │ Input | Expected | Result | Best │ 00:40:45 verbose #23983 > > │ --- | --- | --- | --- │ 00:40:45 verbose #23984 > > │ struct ("a", "a") | "a" | "a" | struct (1L, 119L) │ 00:40:45 verbose #23985 > > │ struct ("b", "b") | "b" | "b" | struct (1L, 110L) │ 00:40:45 verbose #23986 > > │ ``` │ 00:40:45 verbose #23987 > > │ 01:12:04 verbose #8 benchmark.sort_result_list / averages.iter / {avg = │ 00:40:45 verbose #23988 > > │ 114; i = 0} │ 00:40:45 verbose #23989 > > │ 01:12:04 verbose #9 benchmark.sort_result_list / averages.iter / {avg = │ 00:40:45 verbose #23990 > > │ 121; i = 1} │ 00:40:45 verbose #23991 > > │ ``` │ 00:40:45 verbose #23992 > > │ ` │ 00:40:45 verbose #23993 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:45 verbose #23994 > > 00:40:45 verbose #23995 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:45 verbose #23996 > > //// test 00:40:45 verbose #23997 > > 00:40:45 verbose #23998 > > inl get_solutions () = 00:40:45 verbose #23999 > > [[ 00:40:45 verbose #24000 > > "A", 00:40:45 verbose #24001 > > fun (a, _b) => 00:40:45 verbose #24002 > > a 00:40:45 verbose #24003 > > 00:40:45 verbose #24004 > > "B", 00:40:45 verbose #24005 > > fun (_a, b) => 00:40:45 verbose #24006 > > b 00:40:45 verbose #24007 > > ]] 00:40:45 verbose #24008 > > 00:40:45 verbose #24009 > > inl rec empty_2_tests () = 00:40:45 verbose #24010 > > inl test_cases = [[ 00:40:45 verbose #24011 > > ("a", "a"), "a" 00:40:45 verbose #24012 > > ("b", "b"), "b" 00:40:45 verbose #24013 > > ]] 00:40:45 verbose #24014 > > 00:40:45 verbose #24015 > > inl solutions = get_solutions () 00:40:45 verbose #24016 > > 00:40:45 verbose #24017 > > // inl is_fast () = true 00:40:45 verbose #24018 > > 00:40:45 verbose #24019 > > inl count = 00:40:45 verbose #24020 > > if is_fast () 00:40:45 verbose #24021 > > then 1000i32 00:40:45 verbose #24022 > > else 2000000i32 00:40:45 verbose #24023 > > 00:40:45 verbose #24024 > > run_all (reflection.nameof { empty_2_tests }) count solutions test_cases 00:40:45 verbose #24025 > > |> sort_result_list 00:40:45 verbose #24026 > > 00:40:45 verbose #24027 > > empty_2_tests () 00:40:50 verbose #24028 > > 00:40:50 verbose #24029 > > ╭─[ 4.88s - stdout ]───────────────────────────────────────────────────────────╮ 00:40:50 verbose #24030 > > │ │ 00:40:50 verbose #24031 > > │ ``` │ 00:40:50 verbose #24032 > > │ 00:00:00 verbose #1 benchmark.run_all / { test_name = empty_2_tests; │ 00:40:50 verbose #24033 > > │ count = 2000000 } │ 00:40:50 verbose #24034 > > │ │ 00:40:50 verbose #24035 > > │ 00:00:00 verbose #2 benchmark.run / { input_str = struct ("a", "a") } │ 00:40:50 verbose #24036 > > │ 00:00:00 verbose #3 benchmark.run / solutions.map / { i = 1; test_name │ 00:40:50 verbose #24037 > > │ = A; time = 114 } │ 00:40:50 verbose #24038 > > │ 00:00:00 verbose #4 benchmark.run / solutions.map / { i = 2; test_name │ 00:40:50 verbose #24039 > > │ = B; time = 139 } │ 00:40:50 verbose #24040 > > │ │ 00:40:50 verbose #24041 > > │ 00:00:00 verbose #5 benchmark.run / { input_str = struct ("b", "b") } │ 00:40:50 verbose #24042 > > │ 00:00:00 verbose #6 benchmark.run / solutions.map / { i = 1; test_name │ 00:40:50 verbose #24043 > > │ = A; time = 129 } │ 00:40:50 verbose #24044 > > │ 00:00:01 verbose #7 benchmark.run / solutions.map / { i = 2; test_name │ 00:40:50 verbose #24045 > > │ = B; time = 120 } │ 00:40:50 verbose #24046 > > │ ``` │ 00:40:50 verbose #24047 > > │ input | expected | result | best │ 00:40:50 verbose #24048 > > │ --- | --- | --- | --- │ 00:40:50 verbose #24049 > > │ struct ("a", "a") | "a" | "a" | 1, 114 │ 00:40:50 verbose #24050 > > │ struct ("b", "b") | "b" | "b" | 2, 120 │ 00:40:50 verbose #24051 > > │ ``` │ 00:40:50 verbose #24052 > > │ 00:00:01 verbose #8 benchmark.sort_result_list / averages.iter / { i = │ 00:40:50 verbose #24053 > > │ 1; avg = 121 } │ 00:40:50 verbose #24054 > > │ 00:00:01 verbose #9 benchmark.sort_result_list / averages.iter / { i = │ 00:40:50 verbose #24055 > > │ 2; avg = 129 } │ 00:40:50 verbose #24056 > > │ ``` │ 00:40:50 verbose #24057 > > │ │ 00:40:50 verbose #24058 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:50 verbose #24059 > > 00:40:50 verbose #24060 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:50 verbose #24061 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:50 verbose #24062 > > │ ### emptyTests │ 00:40:50 verbose #24063 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:50 verbose #24064 > > 00:40:50 verbose #24065 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:50 verbose #24066 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:50 verbose #24067 > > │ Test: Empty │ 00:40:50 verbose #24068 > > │ │ 00:40:50 verbose #24069 > > │ Solution: 0 │ 00:40:50 verbose #24070 > > │ Test case 1. A. Time: 61L │ 00:40:50 verbose #24071 > > │ │ 00:40:50 verbose #24072 > > │ Solution: 2 │ 00:40:50 verbose #24073 > > │ Test case 1. A. Time: 62L │ 00:40:50 verbose #24074 > > │ │ 00:40:50 verbose #24075 > > │ Solution: 5 │ 00:40:50 verbose #24076 > > │ Test case 1. A. Time: 70L │ 00:40:50 verbose #24077 > > │ │ 00:40:50 verbose #24078 > > │ Input | Expected | Result | Best │ 00:40:50 verbose #24079 > > │ --- | --- | --- | --- │ 00:40:50 verbose #24080 > > │ 0 | 0 | 0 | (1, 61) │ 00:40:50 verbose #24081 > > │ 2 | 2 | 2 | (1, 62) │ 00:40:50 verbose #24082 > > │ 5 | 5 | 5 | (1, 70) │ 00:40:50 verbose #24083 > > │ │ 00:40:50 verbose #24084 > > │ Averages │ 00:40:50 verbose #24085 > > │ Test case 1. Average Time: 64L │ 00:40:50 verbose #24086 > > │ │ 00:40:50 verbose #24087 > > │ Ranking │ 00:40:50 verbose #24088 > > │ Test case 1. Average Time: 64L │ 00:40:50 verbose #24089 > > │ │ 00:40:50 verbose #24090 > > │ --- │ 00:40:50 verbose #24091 > > │ │ 00:40:50 verbose #24092 > > │ ``` │ 00:40:50 verbose #24093 > > │ 01:21:25 verbose #1 benchmark.run_all / {count = 2000000; test_name = │ 00:40:50 verbose #24094 > > │ empty_1_tests} │ 00:40:50 verbose #24095 > > │ 01:21:25 verbose #2 benchmark.run / {count = 2000000; expected = │ 00:40:50 verbose #24096 > > │ +1.000000; input = +0.000000; input_str = 0.0} │ 00:40:50 verbose #24097 > > │ 01:21:25 verbose #3 benchmark.run / solutions.map / {count = 2000000; │ 00:40:50 verbose #24098 > > │ expected = +1.000000; i = 0; input = +0.000000; input_str = 0.0; test_name = │ 00:40:50 verbose #24099 > > │ A; time = 36} │ 00:40:50 verbose #24100 > > │ 01:21:25 verbose #4 benchmark.run / {count = 2000000; expected = │ 00:40:50 verbose #24101 > > │ +3.000000; input = +2.000000; input_str = 2.0} │ 00:40:50 verbose #24102 > > │ 01:21:25 verbose #5 benchmark.run / solutions.map / {count = 2000000; │ 00:40:50 verbose #24103 > > │ expected = +3.000000; i = 0; input = +2.000000; input_str = 2.0; test_name = │ 00:40:50 verbose #24104 > > │ A; time = 20} │ 00:40:50 verbose #24105 > > │ 01:21:25 verbose #6 benchmark.run / {count = 2000000; expected = │ 00:40:50 verbose #24106 > > │ +6.000000; input = +5.000000; input_str = 5.0} │ 00:40:50 verbose #24107 > > │ 01:21:25 verbose #7 benchmark.run / solutions.map / {count = 2000000; │ 00:40:50 verbose #24108 > > │ expected = +6.000000; i = 0; input = +5.000000; input_str = 5.0; test_name = │ 00:40:50 verbose #24109 > > │ A; time = 22} │ 00:40:50 verbose #24110 > > │ ``` │ 00:40:50 verbose #24111 > > │ Input | Expected | Result | Best │ 00:40:50 verbose #24112 > > │ --- | --- | --- | --- │ 00:40:50 verbose #24113 > > │ 0.0 | 1.0 | 1.0 | struct (1L, 36L) │ 00:40:50 verbose #24114 > > │ 2.0 | 3.0 | 3.0 | struct (1L, 20L) │ 00:40:50 verbose #24115 > > │ 5.0 | 6.0 | 6.0 | struct (1L, 22L) │ 00:40:50 verbose #24116 > > │ ``` │ 00:40:50 verbose #24117 > > │ 01:21:25 verbose #8 benchmark.sort_result_list / averages.iter / {avg = │ 00:40:50 verbose #24118 > > │ 26; i = 0} │ 00:40:50 verbose #24119 > > │ ``` │ 00:40:50 verbose #24120 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:50 verbose #24121 > > 00:40:50 verbose #24122 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:40:50 verbose #24123 > > //// test 00:40:50 verbose #24124 > > 00:40:50 verbose #24125 > > inl get_solutions () = 00:40:50 verbose #24126 > > [[ 00:40:50 verbose #24127 > > "A", 00:40:50 verbose #24128 > > fun n => 00:40:50 verbose #24129 > > n + 1f64 00:40:50 verbose #24130 > > ]] 00:40:50 verbose #24131 > > 00:40:50 verbose #24132 > > inl rec empty_1_tests () = 00:40:50 verbose #24133 > > inl test_cases = [[ 00:40:50 verbose #24134 > > 0, 1 00:40:50 verbose #24135 > > 2, 3 00:40:50 verbose #24136 > > 5, 6 00:40:50 verbose #24137 > > ]] 00:40:50 verbose #24138 > > 00:40:50 verbose #24139 > > inl solutions = get_solutions () 00:40:50 verbose #24140 > > 00:40:50 verbose #24141 > > // inl is_fast () = true 00:40:50 verbose #24142 > > 00:40:50 verbose #24143 > > inl count = 00:40:50 verbose #24144 > > if is_fast () 00:40:50 verbose #24145 > > then 1000i32 00:40:50 verbose #24146 > > else 2000000i32 00:40:50 verbose #24147 > > 00:40:50 verbose #24148 > > run_all (reflection.nameof { empty_1_tests }) count solutions test_cases 00:40:50 verbose #24149 > > |> sort_result_list 00:40:50 verbose #24150 > > 00:40:50 verbose #24151 > > empty_1_tests () 00:40:52 verbose #24152 > > 00:40:52 verbose #24153 > > ╭─[ 2.56s - stdout ]───────────────────────────────────────────────────────────╮ 00:40:52 verbose #24154 > > │ │ 00:40:52 verbose #24155 > > │ ``` │ 00:40:52 verbose #24156 > > │ 00:00:00 verbose #1 benchmark.run_all / { test_name = empty_1_tests; │ 00:40:52 verbose #24157 > > │ count = 2000000 } │ 00:40:52 verbose #24158 > > │ │ 00:40:52 verbose #24159 > > │ 00:00:00 verbose #2 benchmark.run / { input_str = 0.0 } │ 00:40:52 verbose #24160 > > │ 00:00:00 verbose #3 benchmark.run / solutions.map / { i = 1; test_name │ 00:40:52 verbose #24161 > > │ = A; time = 29 } │ 00:40:52 verbose #24162 > > │ │ 00:40:52 verbose #24163 > > │ 00:00:00 verbose #4 benchmark.run / { input_str = 2.0 } │ 00:40:52 verbose #24164 > > │ 00:00:00 verbose #5 benchmark.run / solutions.map / { i = 1; test_name │ 00:40:52 verbose #24165 > > │ = A; time = 18 } │ 00:40:52 verbose #24166 > > │ │ 00:40:52 verbose #24167 > > │ 00:00:00 verbose #6 benchmark.run / { input_str = 5.0 } │ 00:40:52 verbose #24168 > > │ 00:00:00 verbose #7 benchmark.run / solutions.map / { i = 1; test_name │ 00:40:52 verbose #24169 > > │ = A; time = 17 } │ 00:40:52 verbose #24170 > > │ ``` │ 00:40:52 verbose #24171 > > │ input | expected | result | best │ 00:40:52 verbose #24172 > > │ --- | --- | --- | --- │ 00:40:52 verbose #24173 > > │ 0.0 | 1.0 | 1.0 | 1, 29 │ 00:40:52 verbose #24174 > > │ 2.0 | 3.0 | 3.0 | 1, 18 │ 00:40:52 verbose #24175 > > │ 5.0 | 6.0 | 6.0 | 1, 17 │ 00:40:52 verbose #24176 > > │ ``` │ 00:40:52 verbose #24177 > > │ 00:00:00 verbose #8 benchmark.sort_result_list / averages.iter / { i = │ 00:40:52 verbose #24178 > > │ 1; avg = 21 } │ 00:40:52 verbose #24179 > > │ ``` │ 00:40:52 verbose #24180 > > │ │ 00:40:52 verbose #24181 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:40:53 verbose #24182 > 00:00:17 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 24854 } 00:40:53 verbose #24183 > 00:00:17 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:40:53 verbose #24184 > "nbconvert", 00:40:53 verbose #24185 > "c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb", 00:40:53 verbose #24186 > "--to", 00:40:53 verbose #24187 > "html", 00:40:53 verbose #24188 > "--HTMLExporter.theme=dark", 00:40:53 verbose #24189 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:40:55 verbose #24190 > 00:00:19 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb to html 00:40:55 verbose #24191 > 00:00:19 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:40:55 verbose #24192 > 00:00:19 verbose #7 ! validate(nb) 00:40:56 verbose #24193 > 00:00:20 verbose #8 ! [NbConvertApp] Writing 316754 bytes to c:\home\git\polyglot\lib\spiral\benchmark.dib.html 00:40:56 verbose #24194 > 00:00:20 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 649 } 00:40:56 verbose #24195 > 00:00:20 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 649 } 00:40:56 verbose #24196 > 00:00:20 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:40:56 verbose #24197 > "-c", 00:40:56 verbose #24198 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/benchmark.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:40:56 verbose #24199 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/benchmark.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:40:57 verbose #24200 > 00:00:21 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:40:57 verbose #24201 > 00:00:21 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:40:57 verbose #24202 > 00:00:21 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 25562 } 00:40:57 debug #24203 runtime.execute_with_options_async / { exit_code = 0; output_length = 29257 } 00:40:57 debug #31 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path benchmark.dib --retries 3 00:40:57 debug #24204 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path physics.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:40:57 verbose #24205 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "physics.dib", "--retries", "3"])) } 00:40:57 verbose #24206 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:40:57 verbose #24207 > "repl", 00:40:57 verbose #24208 > "--exit-after-run", 00:40:57 verbose #24209 > "--run", 00:40:57 verbose #24210 > "c:/home/git/polyglot/lib/spiral/physics.dib", 00:40:57 verbose #24211 > "--output-path", 00:40:57 verbose #24212 > "c:/home/git/polyglot/lib/spiral/physics.dib.ipynb", 00:40:57 verbose #24213 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/physics.dib" --output-path "c:/home/git/polyglot/lib/spiral/physics.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:40:59 verbose #24214 > > 00:40:59 verbose #24215 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:40:59 verbose #24216 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:40:59 verbose #24217 > > │ # physics │ 00:40:59 verbose #24218 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:21 verbose #24219 > > 00:41:21 verbose #24220 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:21 verbose #24221 > > //// test 00:41:21 verbose #24222 > > 00:41:21 verbose #24223 > > open testing 00:41:22 verbose #24224 > > 00:41:22 verbose #24225 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:22 verbose #24226 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:22 verbose #24227 > > │ ### init_series │ 00:41:22 verbose #24228 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:22 verbose #24229 > > 00:41:22 verbose #24230 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:22 verbose #24231 > > //// test 00:41:22 verbose #24232 > > 00:41:22 verbose #24233 > > inl x = am'.init_series -3f64 3 0.01 00:41:22 verbose #24234 > > inl y = x |> am'.map_base math.square 00:41:22 verbose #24235 > > "square", "x", "y", ;[[ "square", x, y ]] 00:41:22 verbose #24236 > > 00:41:22 verbose #24237 > > ╭─[ 483.45ms - return value ]──────────────────────────────────────────────────╮ 00:41:22 verbose #24238 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ 00:41:22 verbose #24239 > > │ xmlns="http://www.w3.org/2000/svg"> │ 00:41:22 verbose #24240 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ 00:41:22 verbose #24241 > > │ stroke="none"/> │ 00:41:22 verbose #24242 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ 00:41:22 verbose #24243 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:22 verbose #24244 > > │ fill="#FFFFFF"> │ 00:41:22 verbose #24245 > > │ square │ 00:41:22 verbose #24246 > > │ </text> │ 00:41:22 verbose #24247 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │ 00:41:22 verbose #24248 > > │ y2="75"/> │ 00:41:22 verbose #24249 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ 00:41:22 verbose #24250 > > │ y2="75"/> │ 00:41:22 verbose #24251 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │ 00:41:22 verbose #24252 > > │ y2="75"/> │ 00:41:22 verbose #24253 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │ 00:41:22 verbose #24254 > > │ y2="75"/> │ 00:41:22 verbose #24255 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │ 00:41:22 verbose #24256 > > │ y2="75"/> │ 00:41:22 verbose #24257 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="103" y1="424" │ 00:41:22 verbose #24258 > > │ x2="103" y2="75"/> │ 00:41:22 verbose #24259 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="111" y1="424" │ 00:41:22 verbose #24260 > > │ x2="111" y2="75"/> │ 00:41:22 verbose #24261 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ 00:41:22 verbose #24262 > > │ x2="119" y2="75"/> │ 00:41:22 verbose #24263 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="128" y1="424" │ 00:41:22 verbose #24264 > > │ x2="128" y2="75"/> │ 00:41:22 verbose #24265 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="136" y1="424" │ 00:41:22 verbose #24266 > > │ x2="136" y2="75"/> │ 00:41:22 verbose #24267 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │ 00:41:22 verbose #24268 > > │ x2="144" y2="75"/> │ 00:41:22 verbose #24269 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │ 00:41:22 verbose #24270 > > │ x2="153" y2="75"/> │ 00:41:22 verbose #24271 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="161" y1="424" │ 00:41:22 verbose #24272 > > │ x2="161" y2="75"/> │ 00:41:22 verbose #24273 > > │ <line opacity="1" stroke="#... 449,326 450,324 450,323 451,322 452,321 │ 00:41:22 verbose #24274 > > │ 453,320 454,319 455,317 455,316 456,315 457,314 458,313 459,311 460,310 │ 00:41:22 verbose #24275 > > │ 460,309 461,308 462,306 463,305 464,304 465,303 465,301 466,300 467,299 │ 00:41:22 verbose #24276 > > │ 468,297 469,296 470,295 470,293 471,292 472,291 473,289 474,288 475,287 │ 00:41:22 verbose #24277 > > │ 475,285 476,284 477,283 478,281 479,280 480,278 480,277 481,276 482,274 │ 00:41:22 verbose #24278 > > │ 483,273 484,271 485,270 485,268 486,267 487,265 488,264 489,262 490,261 │ 00:41:22 verbose #24279 > > │ 490,259 491,258 492,256 493,255 494,253 495,252 495,250 496,249 497,247 │ 00:41:22 verbose #24280 > > │ 498,246 499,244 499,242 500,241 501,239 502,238 503,236 504,234 504,233 │ 00:41:22 verbose #24281 > > │ 505,231 506,229 507,228 508,226 509,224 509,223 510,221 511,219 512,218 │ 00:41:22 verbose #24282 > > │ 513,216 514,214 514,213 515,211 516,209 517,207 518,206 519,204 519,202 │ 00:41:22 verbose #24283 > > │ 520,200 521,199 522,197 523,195 524,193 524,191 525,190 526,188 527,186 │ 00:41:22 verbose #24284 > > │ 528,184 529,182 529,180 530,179 531,177 532,175 533,173 534,171 534,169 │ 00:41:22 verbose #24285 > > │ 535,167 536,165 537,164 538,162 539,160 539,158 540,156 541,154 542,152 │ 00:41:22 verbose #24286 > > │ 543,150 544,148 544,146 545,144 546,142 547,140 548,138 549,136 549,134 │ 00:41:22 verbose #24287 > > │ 550,132 551,130 552,128 553,126 554,124 554,122 555,120 556,117 557,115 │ 00:41:22 verbose #24288 > > │ 558,113 559,111 559,109 560,107 561,105 562,103 563,101 564,98 564,96 565,94 │ 00:41:22 verbose #24289 > > │ 566,92 567,90 568,88 569,85 "/> │ 00:41:22 verbose #24290 > > │ <rect x="497" y="235" width="83" height="30" opacity="1" fill="none" │ 00:41:22 verbose #24291 > > │ stroke="#FFFFFF"/> │ 00:41:22 verbose #24292 > > │ <text x="537" y="245" dy="0.76em" text-anchor="start" │ 00:41:22 verbose #24293 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:22 verbose #24294 > > │ fill="#FFFFFF"> │ 00:41:22 verbose #24295 > > │ square │ 00:41:22 verbose #24296 > > │ </text> │ 00:41:22 verbose #24297 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:41:22 verbose #24298 > > │ points="507,250 527,250 "/> │ 00:41:22 verbose #24299 > > │ </svg> │ 00:41:22 verbose #24300 > > │ │ 00:41:22 verbose #24301 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:22 verbose #24302 > > 00:41:22 verbose #24303 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:22 verbose #24304 > > //// test 00:41:22 verbose #24305 > > 00:41:22 verbose #24306 > > inl x = am'.init_series -10f64 10 0.1 00:41:22 verbose #24307 > > inl y_sin = x |> am'.map_base sin 00:41:22 verbose #24308 > > inl y_cos = x |> am'.map_base cos 00:41:22 verbose #24309 > > "sin cos", "x", "y", ;[[ "sin", x, y_sin; "cos", x, y_cos ]] 00:41:23 verbose #24310 > > 00:41:23 verbose #24311 > > ╭─[ 477.05ms - return value ]──────────────────────────────────────────────────╮ 00:41:23 verbose #24312 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ 00:41:23 verbose #24313 > > │ xmlns="http://www.w3.org/2000/svg"> │ 00:41:23 verbose #24314 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ 00:41:23 verbose #24315 > > │ stroke="none"/> │ 00:41:23 verbose #24316 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ 00:41:23 verbose #24317 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:23 verbose #24318 > > │ fill="#FFFFFF"> │ 00:41:23 verbose #24319 > > │ sin cos │ 00:41:23 verbose #24320 > > │ </text> │ 00:41:23 verbose #24321 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="57" y1="424" x2="57" │ 00:41:23 verbose #24322 > > │ y2="75"/> │ 00:41:23 verbose #24323 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ 00:41:23 verbose #24324 > > │ y2="75"/> │ 00:41:23 verbose #24325 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="82" y1="424" x2="82" │ 00:41:23 verbose #24326 > > │ y2="75"/> │ 00:41:23 verbose #24327 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │ 00:41:23 verbose #24328 > > │ y2="75"/> │ 00:41:23 verbose #24329 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="107" y1="424" │ 00:41:23 verbose #24330 > > │ x2="107" y2="75"/> │ 00:41:23 verbose #24331 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ 00:41:23 verbose #24332 > > │ x2="119" y2="75"/> │ 00:41:23 verbose #24333 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="132" y1="424" │ 00:41:23 verbose #24334 > > │ x2="132" y2="75"/> │ 00:41:23 verbose #24335 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │ 00:41:23 verbose #24336 > > │ x2="144" y2="75"/> │ 00:41:23 verbose #24337 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="157" y1="424" │ 00:41:23 verbose #24338 > > │ x2="157" y2="75"/> │ 00:41:23 verbose #24339 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ 00:41:23 verbose #24340 > > │ x2="169" y2="75"/> │ 00:41:23 verbose #24341 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="182" y1="424" │ 00:41:23 verbose #24342 > > │ x2="182" y2="75"/> │ 00:41:23 verbose #24343 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="194" y1="424" │ 00:41:23 verbose #24344 > > │ x2="194" y2="75"/> │ 00:41:23 verbose #24345 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="207" y1="424" │ 00:41:23 verbose #24346 > > │ x2="207" y2="75"/> │ 00:41:23 verbose #24347 > > │ <line opacity="1" stroke...55 282,238 284,222 287,206 289,190 292,175 │ 00:41:23 verbose #24348 > > │ 294,161 297,148 299,135 302,124 304,114 307,106 309,98 312,93 314,89 317,86 │ 00:41:23 verbose #24349 > > │ 319,85 321,86 324,89 326,93 329,98 331,106 334,114 336,124 339,135 341,148 │ 00:41:23 verbose #24350 > > │ 344,161 346,175 349,190 351,206 354,222 356,238 359,255 361,271 364,287 │ 00:41:23 verbose #24351 > > │ 366,303 369,319 371,333 374,347 376,360 379,371 381,382 384,391 386,399 │ 00:41:23 verbose #24352 > > │ 389,405 391,410 394,413 396,414 399,414 401,413 404,409 406,404 409,398 │ 00:41:23 verbose #24353 > > │ 411,390 414,380 416,370 419,358 421,345 424,331 426,316 429,301 431,285 │ 00:41:23 verbose #24354 > > │ 434,268 436,252 439,236 441,219 444,203 446,188 449,173 451,159 454,146 │ 00:41:23 verbose #24355 > > │ 456,133 459,122 461,113 464,104 466,97 469,92 471,88 474,86 476,85 479,86 │ 00:41:23 verbose #24356 > > │ 481,89 484,94 486,99 489,107 491,116 494,126 496,137 499,150 501,163 504,178 │ 00:41:23 verbose #24357 > > │ 506,193 509,209 511,225 514,241 516,258 519,274 521,290 524,306 526,321 │ 00:41:23 verbose #24358 > > │ 529,335 531,349 534,362 536,373 539,384 541,392 544,400 546,406 549,410 │ 00:41:23 verbose #24359 > > │ 551,413 554,415 556,414 559,412 561,408 564,403 566,396 569,388 "/> │ 00:41:23 verbose #24360 > > │ <rect x="514" y="227" width="66" height="45" opacity="1" fill="none" │ 00:41:23 verbose #24361 > > │ stroke="#FFFFFF"/> │ 00:41:23 verbose #24362 > > │ <text x="554" y="237" dy="0.76em" text-anchor="start" │ 00:41:23 verbose #24363 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:23 verbose #24364 > > │ fill="#FFFFFF"> │ 00:41:23 verbose #24365 > > │ sin │ 00:41:23 verbose #24366 > > │ </text> │ 00:41:23 verbose #24367 > > │ <text x="554" y="252" dy="0.76em" text-anchor="start" │ 00:41:23 verbose #24368 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:23 verbose #24369 > > │ fill="#FFFFFF"> │ 00:41:23 verbose #24370 > > │ cos │ 00:41:23 verbose #24371 > > │ </text> │ 00:41:23 verbose #24372 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:41:23 verbose #24373 > > │ points="524,242 544,242 "/> │ 00:41:23 verbose #24374 > > │ <polyline fill="none" opacity="1" stroke="#0000FF" stroke-width="1" │ 00:41:23 verbose #24375 > > │ points="524,257 544,257 "/> │ 00:41:23 verbose #24376 > > │ </svg> │ 00:41:23 verbose #24377 > > │ │ 00:41:23 verbose #24378 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:23 verbose #24379 > > 00:41:23 verbose #24380 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:23 verbose #24381 > > //// test 00:41:23 verbose #24382 > > 00:41:23 verbose #24383 > > inl y_pos y0 vy0 ay t = 00:41:23 verbose #24384 > > y0 + vy0 * t + ay * (t |> math.square) / 2 00:41:23 verbose #24385 > > 00:41:23 verbose #24386 > > inl x = am'.init_series 0f64 5 0.01 00:41:23 verbose #24387 > > inl y = x |> am'.map_base (y_pos 0 20 -9.8) 00:41:23 verbose #24388 > > "projectile motion", "time (s)", "", ;[[ "height of projectile (m)", x, y ]] 00:41:23 verbose #24389 > > 00:41:23 verbose #24390 > > ╭─[ 457.62ms - return value ]──────────────────────────────────────────────────╮ 00:41:23 verbose #24391 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ 00:41:23 verbose #24392 > > │ xmlns="http://www.w3.org/2000/svg"> │ 00:41:23 verbose #24393 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ 00:41:23 verbose #24394 > > │ stroke="none"/> │ 00:41:23 verbose #24395 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ 00:41:23 verbose #24396 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:23 verbose #24397 > > │ fill="#FFFFFF"> │ 00:41:23 verbose #24398 > > │ projectile motion │ 00:41:23 verbose #24399 > > │ </text> │ 00:41:23 verbose #24400 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │ 00:41:23 verbose #24401 > > │ y2="75"/> │ 00:41:23 verbose #24402 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ 00:41:23 verbose #24403 > > │ y2="75"/> │ 00:41:23 verbose #24404 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │ 00:41:23 verbose #24405 > > │ y2="75"/> │ 00:41:23 verbose #24406 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │ 00:41:23 verbose #24407 > > │ y2="75"/> │ 00:41:23 verbose #24408 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │ 00:41:23 verbose #24409 > > │ y2="75"/> │ 00:41:23 verbose #24410 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │ 00:41:23 verbose #24411 > > │ x2="109" y2="75"/> │ 00:41:23 verbose #24412 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ 00:41:23 verbose #24413 > > │ x2="119" y2="75"/> │ 00:41:23 verbose #24414 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ 00:41:23 verbose #24415 > > │ x2="129" y2="75"/> │ 00:41:23 verbose #24416 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ 00:41:23 verbose #24417 > > │ x2="139" y2="75"/> │ 00:41:23 verbose #24418 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │ 00:41:23 verbose #24419 > > │ x2="149" y2="75"/> │ 00:41:23 verbose #24420 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │ 00:41:23 verbose #24421 > > │ x2="159" y2="75"/> │ 00:41:23 verbose #24422 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ 00:41:23 verbose #24423 > > │ x2="169" y2="75"/> │ 00:41:23 verbose #24424 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │ 00:41:23 verbose #24425 > > │ x2="179" y2="75"/> │ 00:41:23 verbose #24426 > > │ <line opacity="1...28,176 429,177 430,178 431,179 432,180 433,182 434,183 │ 00:41:23 verbose #24427 > > │ 435,184 436,185 437,186 438,188 439,189 440,190 441,191 442,193 443,194 │ 00:41:23 verbose #24428 > > │ 444,195 445,197 446,198 447,199 448,200 449,202 450,203 451,204 452,206 │ 00:41:23 verbose #24429 > > │ 453,207 454,208 455,210 456,211 457,213 458,214 459,215 460,217 461,218 │ 00:41:23 verbose #24430 > > │ 462,220 463,221 464,222 465,224 466,225 467,227 468,228 469,230 470,231 │ 00:41:23 verbose #24431 > > │ 471,233 472,234 473,236 474,237 475,239 476,240 477,242 478,243 479,245 │ 00:41:23 verbose #24432 > > │ 480,246 481,248 482,249 483,251 484,253 485,254 486,256 487,257 488,259 │ 00:41:23 verbose #24433 > > │ 489,261 490,262 491,264 492,266 493,267 494,269 495,271 496,272 497,274 │ 00:41:23 verbose #24434 > > │ 498,276 499,277 500,279 501,281 502,282 503,284 504,286 505,288 506,289 │ 00:41:23 verbose #24435 > > │ 507,291 508,293 509,295 510,296 511,298 512,300 513,302 514,304 515,305 │ 00:41:23 verbose #24436 > > │ 516,307 517,309 518,311 519,313 520,315 521,316 522,318 523,320 524,322 │ 00:41:23 verbose #24437 > > │ 525,324 526,326 527,328 528,330 529,332 530,334 531,335 532,337 533,339 │ 00:41:23 verbose #24438 > > │ 534,341 535,343 536,345 537,347 538,349 539,351 540,353 541,355 542,357 │ 00:41:23 verbose #24439 > > │ 543,359 544,361 545,363 546,365 547,367 548,370 549,372 550,374 551,376 │ 00:41:23 verbose #24440 > > │ 552,378 553,380 554,382 555,384 556,386 557,388 558,391 559,393 560,395 │ 00:41:23 verbose #24441 > > │ 561,397 562,399 563,401 564,404 565,406 566,408 567,410 568,412 569,415 "/> │ 00:41:23 verbose #24442 > > │ <rect x="399" y="235" width="181" height="30" opacity="1" fill="none" │ 00:41:23 verbose #24443 > > │ stroke="#FFFFFF"/> │ 00:41:23 verbose #24444 > > │ <text x="439" y="245" dy="0.76em" text-anchor="start" │ 00:41:23 verbose #24445 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:23 verbose #24446 > > │ fill="#FFFFFF"> │ 00:41:23 verbose #24447 > > │ height of projectile (m) │ 00:41:23 verbose #24448 > > │ </text> │ 00:41:23 verbose #24449 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:41:23 verbose #24450 > > │ points="409,250 429,250 "/> │ 00:41:23 verbose #24451 > > │ </svg> │ 00:41:23 verbose #24452 > > │ │ 00:41:23 verbose #24453 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:23 verbose #24454 > > 00:41:23 verbose #24455 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:23 verbose #24456 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:23 verbose #24457 > > │ ### velocity_cf │ 00:41:23 verbose #24458 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:23 verbose #24459 > > 00:41:23 verbose #24460 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:23 verbose #24461 > > type mass = f64 00:41:23 verbose #24462 > > type time = f64 00:41:23 verbose #24463 > > type position = f64 00:41:23 verbose #24464 > > type velocity = f64 00:41:23 verbose #24465 > > type force = f64 00:41:23 verbose #24466 > > 00:41:23 verbose #24467 > > type velocity_cf = mass -> velocity -> list force -> (time -> velocity) 00:41:23 verbose #24468 > > 00:41:23 verbose #24469 > > inl velocity_cf m v0 fs = 00:41:23 verbose #24470 > > inl f_net = fs |> listm'.sum 00:41:23 verbose #24471 > > inl a0 = f_net / m 00:41:23 verbose #24472 > > inl v t = v0 + a0 * t 00:41:23 verbose #24473 > > v 00:41:24 verbose #24474 > > 00:41:24 verbose #24475 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:24 verbose #24476 > > //// test 00:41:24 verbose #24477 > > 00:41:24 verbose #24478 > > velocity_cf 0.1f64 0.6 [[ 0.04; -0.08 ]] 0 00:41:24 verbose #24479 > > |> _assert_eq 0.6 00:41:24 verbose #24480 > > 00:41:24 verbose #24481 > > velocity_cf 0.1f64 0.6 [[ 0.04; -0.08 ]] 1 00:41:24 verbose #24482 > > |> _assert_eq 0.2 00:41:24 verbose #24483 > > 00:41:24 verbose #24484 > > ╭─[ 385.19ms - stdout ]────────────────────────────────────────────────────────╮ 00:41:24 verbose #24485 > > │ __assert_eq / actual: 0.6 / expected: 0.6 │ 00:41:24 verbose #24486 > > │ __assert_eq / actual: 0.2 / expected: 0.2 │ 00:41:24 verbose #24487 > > │ │ 00:41:24 verbose #24488 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:24 verbose #24489 > > 00:41:24 verbose #24490 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:24 verbose #24491 > > //// test 00:41:24 verbose #24492 > > 00:41:24 verbose #24493 > > inl x = am'.init_series 0f64 4 0.1 00:41:24 verbose #24494 > > inl y = x |> am'.map_base (velocity_cf 0.1f64 0.6 [[ 0.04; -0.08 ]]) 00:41:24 verbose #24495 > > "car on an air track", "time (s)", "", ;[[ "velocity of car (m/s)", x, y ]] 00:41:25 verbose #24496 > > 00:41:25 verbose #24497 > > ╭─[ 507.41ms - return value ]──────────────────────────────────────────────────╮ 00:41:25 verbose #24498 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ 00:41:25 verbose #24499 > > │ xmlns="http://www.w3.org/2000/svg"> │ 00:41:25 verbose #24500 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ 00:41:25 verbose #24501 > > │ stroke="none"/> │ 00:41:25 verbose #24502 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ 00:41:25 verbose #24503 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:25 verbose #24504 > > │ fill="#FFFFFF"> │ 00:41:25 verbose #24505 > > │ car on an air track │ 00:41:25 verbose #24506 > > │ </text> │ 00:41:25 verbose #24507 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="57" y1="424" x2="57" │ 00:41:25 verbose #24508 > > │ y2="75"/> │ 00:41:25 verbose #24509 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ 00:41:25 verbose #24510 > > │ y2="75"/> │ 00:41:25 verbose #24511 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="82" y1="424" x2="82" │ 00:41:25 verbose #24512 > > │ y2="75"/> │ 00:41:25 verbose #24513 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │ 00:41:25 verbose #24514 > > │ y2="75"/> │ 00:41:25 verbose #24515 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="107" y1="424" │ 00:41:25 verbose #24516 > > │ x2="107" y2="75"/> │ 00:41:25 verbose #24517 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ 00:41:25 verbose #24518 > > │ x2="119" y2="75"/> │ 00:41:25 verbose #24519 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="132" y1="424" │ 00:41:25 verbose #24520 > > │ x2="132" y2="75"/> │ 00:41:25 verbose #24521 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │ 00:41:25 verbose #24522 > > │ x2="144" y2="75"/> │ 00:41:25 verbose #24523 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="157" y1="424" │ 00:41:25 verbose #24524 > > │ x2="157" y2="75"/> │ 00:41:25 verbose #24525 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ 00:41:25 verbose #24526 > > │ x2="169" y2="75"/> │ 00:41:25 verbose #24527 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="182" y1="424" │ 00:41:25 verbose #24528 > > │ x2="182" y2="75"/> │ 00:41:25 verbose #24529 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="194" y1="424" │ 00:41:25 verbose #24530 > > │ x2="194" y2="75"/> │ 00:41:25 verbose #24531 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="207" y1="424" │ 00:41:25 verbose #24532 > > │ x2="207" y2="75"/> │ 00:41:25 verbose #24533 > > │ <line opacit...85,209 590,209 "/> │ 00:41:25 verbose #24534 > > │ <text x="617" y="168" dy="0.5ex" text-anchor="end" font-family="sans-serif" │ 00:41:25 verbose #24535 > > │ font-size="9.67741935483871" opacity="1" fill="#FFFFFF"> │ 00:41:25 verbose #24536 > > │ 0.2 │ 00:41:25 verbose #24537 > > │ </text> │ 00:41:25 verbose #24538 > > │ <polyline fill="none" opacity="1" stroke="#FFFFFF" stroke-width="1" │ 00:41:25 verbose #24539 > > │ points="585,168 590,168 "/> │ 00:41:25 verbose #24540 > > │ <text x="617" y="127" dy="0.5ex" text-anchor="end" font-family="sans-serif" │ 00:41:25 verbose #24541 > > │ font-size="9.67741935483871" opacity="1" fill="#FFFFFF"> │ 00:41:25 verbose #24542 > > │ 0.4 │ 00:41:25 verbose #24543 > > │ </text> │ 00:41:25 verbose #24544 > > │ <polyline fill="none" opacity="1" stroke="#FFFFFF" stroke-width="1" │ 00:41:25 verbose #24545 > > │ points="585,127 590,127 "/> │ 00:41:25 verbose #24546 > > │ <text x="617" y="85" dy="0.5ex" text-anchor="end" font-family="sans-serif" │ 00:41:25 verbose #24547 > > │ font-size="9.67741935483871" opacity="1" fill="#FFFFFF"> │ 00:41:25 verbose #24548 > > │ 0.6 │ 00:41:25 verbose #24549 > > │ </text> │ 00:41:25 verbose #24550 > > │ <polyline fill="none" opacity="1" stroke="#FFFFFF" stroke-width="1" │ 00:41:25 verbose #24551 > > │ points="585,85 590,85 "/> │ 00:41:25 verbose #24552 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:41:25 verbose #24553 > > │ points="69,85 82,94 94,102 107,110 119,118 132,127 144,135 157,143 169,151 │ 00:41:25 verbose #24554 > > │ 182,159 194,168 207,176 219,184 232,192 244,201 257,209 269,217 282,225 │ 00:41:25 verbose #24555 > > │ 294,234 307,242 319,250 331,258 344,266 356,275 369,283 381,291 394,299 │ 00:41:25 verbose #24556 > > │ 406,308 419,316 431,324 444,332 456,341 469,349 481,357 494,365 506,373 │ 00:41:25 verbose #24557 > > │ 519,382 531,390 544,398 556,406 569,415 "/> │ 00:41:25 verbose #24558 > > │ <rect x="415" y="235" width="165" height="30" opacity="1" fill="none" │ 00:41:25 verbose #24559 > > │ stroke="#FFFFFF"/> │ 00:41:25 verbose #24560 > > │ <text x="455" y="245" dy="0.76em" text-anchor="start" │ 00:41:25 verbose #24561 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:25 verbose #24562 > > │ fill="#FFFFFF"> │ 00:41:25 verbose #24563 > > │ velocity of car (m/s) │ 00:41:25 verbose #24564 > > │ </text> │ 00:41:25 verbose #24565 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:41:25 verbose #24566 > > │ points="425,250 445,250 "/> │ 00:41:25 verbose #24567 > > │ </svg> │ 00:41:25 verbose #24568 > > │ │ 00:41:25 verbose #24569 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:25 verbose #24570 > > 00:41:25 verbose #24571 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:25 verbose #24572 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:25 verbose #24573 > > │ ### derivative │ 00:41:25 verbose #24574 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:25 verbose #24575 > > 00:41:25 verbose #24576 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:25 verbose #24577 > > type derivative = (f64 -> f64) -> f64 -> f64 00:41:25 verbose #24578 > > 00:41:25 verbose #24579 > > inl derivative dt : derivative = 00:41:25 verbose #24580 > > fun x t => 00:41:25 verbose #24581 > > (x (t + dt / 2) - x (t - dt / 2)) / dt 00:41:25 verbose #24582 > > 00:41:25 verbose #24583 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:25 verbose #24584 > > //// test 00:41:25 verbose #24585 > > 00:41:25 verbose #24586 > > derivative 1 (fun x => x ** 4 / 4) 1 - 1 00:41:25 verbose #24587 > > |> _assert_approx_eq None 0.25 00:41:25 verbose #24588 > > 00:41:25 verbose #24589 > > derivative 0.001 (fun x => x ** 4 / 4) 1 - 1 00:41:25 verbose #24590 > > |> _assert_approx_eq None 0.0000002499998827953931 00:41:25 verbose #24591 > > 00:41:25 verbose #24592 > > derivative 0.000001 (fun x => x ** 4 / 4) 1 - 1 00:41:25 verbose #24593 > > |> _assert_approx_eq None 0.000000000001000088900582341 00:41:25 verbose #24594 > > 00:41:25 verbose #24595 > > derivative 0.000000001 (fun x => x ** 4 / 4) 1 - 1 00:41:25 verbose #24596 > > |> _assert_approx_eq None 0.00000008274037099909037 00:41:25 verbose #24597 > > 00:41:25 verbose #24598 > > derivative 0.000000000001 (fun x => x ** 4 / 4) 1 - 1 00:41:25 verbose #24599 > > |> _assert_approx_eq None 0.00008890058234101161 00:41:25 verbose #24600 > > 00:41:25 verbose #24601 > > derivative 0.000000000000001 (fun x => x ** 4 / 4) 1 - 1 00:41:25 verbose #24602 > > |> _assert_approx_eq None -0.0007992778373592246 00:41:25 verbose #24603 > > 00:41:25 verbose #24604 > > derivative 0.000000000000000001 (fun x => x ** 4 / 4) 1 - 1 00:41:25 verbose #24605 > > |> _assert_approx_eq None -1 00:41:26 verbose #24606 > > 00:41:26 verbose #24607 > > ╭─[ 460.96ms - stdout ]────────────────────────────────────────────────────────╮ 00:41:26 verbose #24608 > > │ __assert_approx_eq / actual: 0.25 / expected: 0.25 │ 00:41:26 verbose #24609 > > │ __assert_approx_eq / actual: 2.499998828e-07 / expected: 2.499998828e-07 │ 00:41:26 verbose #24610 > > │ __assert_approx_eq / actual: 1.000088901e-12 / expected: 1.000088901e-12 │ 00:41:26 verbose #24611 > > │ __assert_approx_eq / actual: 8.2740371e-08 / expected: 8.2740371e-08 │ 00:41:26 verbose #24612 > > │ __assert_approx_eq / actual: 8.890058234e-05 / expected: 8.890058234e-05 │ 00:41:26 verbose #24613 > > │ __assert_approx_eq / actual: -0.0007992778374 / expected: -0.0007992778374 │ 00:41:26 verbose #24614 > > │ __assert_approx_eq / actual: -1.0 / expected: -1.0 │ 00:41:26 verbose #24615 > > │ │ 00:41:26 verbose #24616 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:26 verbose #24617 > > 00:41:26 verbose #24618 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:26 verbose #24619 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:26 verbose #24620 > > │ ### integration │ 00:41:26 verbose #24621 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:26 verbose #24622 > > 00:41:26 verbose #24623 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:26 verbose #24624 > > type integration = (f64 -> f64) -> f64 -> f64 -> f64 00:41:26 verbose #24625 > > 00:41:26 verbose #24626 > > inl integral dt : integration = 00:41:26 verbose #24627 > > fun f a b => 00:41:26 verbose #24628 > > inl rec loop t y = 00:41:26 verbose #24629 > > if t < b 00:41:26 verbose #24630 > > then loop (t + dt) (y + f t * dt) 00:41:26 verbose #24631 > > else t, y 00:41:26 verbose #24632 > > loop (a + dt / 2) 0 00:41:26 verbose #24633 > > |> snd 00:41:26 verbose #24634 > > 00:41:26 verbose #24635 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:26 verbose #24636 > > //// test 00:41:26 verbose #24637 > > 00:41:26 verbose #24638 > > integral 0.01 math.square 0 1 00:41:26 verbose #24639 > > |> _assert_approx_eq None 0.33332500000000004 00:41:26 verbose #24640 > > 00:41:26 verbose #24641 > > ╭─[ 408.83ms - stdout ]────────────────────────────────────────────────────────╮ 00:41:26 verbose #24642 > > │ __assert_approx_eq / actual: 0.333325 / expected: 0.333325 │ 00:41:26 verbose #24643 > > │ │ 00:41:26 verbose #24644 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:26 verbose #24645 > > 00:41:26 verbose #24646 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:26 verbose #24647 > > inl integral' dt : integration = 00:41:26 verbose #24648 > > fun f a b => 00:41:26 verbose #24649 > > listm'.init_series (a + dt / 2) (b - dt / 2) dt 00:41:26 verbose #24650 > > |> listm.map (f >> (*) dt) 00:41:26 verbose #24651 > > |> listm'.sum 00:41:27 verbose #24652 > > 00:41:27 verbose #24653 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:27 verbose #24654 > > //// test 00:41:27 verbose #24655 > > 00:41:27 verbose #24656 > > integral' 0.1 math.square 0 1 00:41:27 verbose #24657 > > |> _assert_approx_eq None (integral 0.1 math.square 0 1) 00:41:27 verbose #24658 > > 00:41:27 verbose #24659 > > ╭─[ 433.59ms - stdout ]────────────────────────────────────────────────────────╮ 00:41:27 verbose #24660 > > │ __assert_approx_eq / actual: 0.3325 / expected: 0.3325 │ 00:41:27 verbose #24661 > > │ │ 00:41:27 verbose #24662 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:27 verbose #24663 > > 00:41:27 verbose #24664 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:27 verbose #24665 > > inl integral'' dt : integration = 00:41:27 verbose #24666 > > fun f x y => 00:41:27 verbose #24667 > > am'.init_series (x + dt / 2) (y - dt / 2) dt 00:41:27 verbose #24668 > > |> fun x => a x : _ int _ 00:41:27 verbose #24669 > > |> am.map (f >> (*) dt) 00:41:27 verbose #24670 > > |> am'.sum 00:41:28 verbose #24671 > > 00:41:28 verbose #24672 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:28 verbose #24673 > > //// test 00:41:28 verbose #24674 > > 00:41:28 verbose #24675 > > integral'' 0.01 math.square 0 1 00:41:28 verbose #24676 > > |> _assert_approx_eq None (integral 0.01 math.square 0 1) 00:41:28 verbose #24677 > > 00:41:28 verbose #24678 > > ╭─[ 505.45ms - stdout ]────────────────────────────────────────────────────────╮ 00:41:28 verbose #24679 > > │ __assert_approx_eq / actual: 0.333325 / expected: 0.333325 │ 00:41:28 verbose #24680 > > │ │ 00:41:28 verbose #24681 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:28 verbose #24682 > > 00:41:28 verbose #24683 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:28 verbose #24684 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:28 verbose #24685 > > │ ### anti_derivative │ 00:41:28 verbose #24686 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:28 verbose #24687 > > 00:41:28 verbose #24688 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:28 verbose #24689 > > inl anti_derivative dt v0 a t = 00:41:28 verbose #24690 > > v0 + integral' dt a 0 t 00:41:29 verbose #24691 > > 00:41:29 verbose #24692 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:29 verbose #24693 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:29 verbose #24694 > > │ ### velocity_ft │ 00:41:29 verbose #24695 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:29 verbose #24696 > > 00:41:29 verbose #24697 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:29 verbose #24698 > > type velocity_ft = mass -> velocity -> list (time -> force) -> (time -> 00:41:29 verbose #24699 > > velocity) 00:41:29 verbose #24700 > > 00:41:29 verbose #24701 > > inl velocity_ft dt : velocity_ft = 00:41:29 verbose #24702 > > fun m v0 fs => 00:41:29 verbose #24703 > > inl f_net t = fs |> listm.map (fun f => f t) |> listm'.sum 00:41:29 verbose #24704 > > inl a t = f_net t / m 00:41:29 verbose #24705 > > anti_derivative dt v0 a 00:41:29 verbose #24706 > > 00:41:29 verbose #24707 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:29 verbose #24708 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:29 verbose #24709 > > │ ### position_ft │ 00:41:29 verbose #24710 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:29 verbose #24711 > > 00:41:29 verbose #24712 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:29 verbose #24713 > > type position_ft = mass -> position -> velocity -> list (time -> force) -> (time 00:41:29 verbose #24714 > > -> position) 00:41:29 verbose #24715 > > 00:41:29 verbose #24716 > > inl position_ft dt : position_ft = 00:41:29 verbose #24717 > > fun m x0 v0 fs => 00:41:29 verbose #24718 > > velocity_ft dt m v0 fs 00:41:29 verbose #24719 > > |> anti_derivative dt x0 00:41:29 verbose #24720 > > 00:41:29 verbose #24721 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:29 verbose #24722 > > //// test 00:41:29 verbose #24723 > > 00:41:29 verbose #24724 > > inl pedal_coast (t : time) : force = 00:41:29 verbose #24725 > > inl t_cycle = 20 00:41:29 verbose #24726 > > inl n_complete : i32 = t / t_cycle |> conv 00:41:29 verbose #24727 > > inl remainder = t - conv n_complete * t_cycle 00:41:29 verbose #24728 > > if remainder > 0 && remainder < 10 00:41:29 verbose #24729 > > then 10 00:41:29 verbose #24730 > > else 0 00:41:29 verbose #24731 > > 00:41:29 verbose #24732 > > inl x = am'.init_series -5f64 45 0.1 00:41:29 verbose #24733 > > inl y = x |> am'.map_base pedal_coast 00:41:29 verbose #24734 > > "child pedaling then coasting", "time (s)", "", ;[[ "force on bike (N)", x, y ]] 00:41:30 verbose #24735 > > 00:41:30 verbose #24736 > > ╭─[ 478.84ms - return value ]──────────────────────────────────────────────────╮ 00:41:30 verbose #24737 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ 00:41:30 verbose #24738 > > │ xmlns="http://www.w3.org/2000/svg"> │ 00:41:30 verbose #24739 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ 00:41:30 verbose #24740 > > │ stroke="none"/> │ 00:41:30 verbose #24741 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ 00:41:30 verbose #24742 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:30 verbose #24743 > > │ fill="#FFFFFF"> │ 00:41:30 verbose #24744 > > │ child pedaling then coasting │ 00:41:30 verbose #24745 > > │ </text> │ 00:41:30 verbose #24746 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │ 00:41:30 verbose #24747 > > │ y2="75"/> │ 00:41:30 verbose #24748 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ 00:41:30 verbose #24749 > > │ y2="75"/> │ 00:41:30 verbose #24750 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │ 00:41:30 verbose #24751 > > │ y2="75"/> │ 00:41:30 verbose #24752 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │ 00:41:30 verbose #24753 > > │ y2="75"/> │ 00:41:30 verbose #24754 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │ 00:41:30 verbose #24755 > > │ y2="75"/> │ 00:41:30 verbose #24756 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │ 00:41:30 verbose #24757 > > │ x2="109" y2="75"/> │ 00:41:30 verbose #24758 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ 00:41:30 verbose #24759 > > │ x2="119" y2="75"/> │ 00:41:30 verbose #24760 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ 00:41:30 verbose #24761 > > │ x2="129" y2="75"/> │ 00:41:30 verbose #24762 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ 00:41:30 verbose #24763 > > │ x2="139" y2="75"/> │ 00:41:30 verbose #24764 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │ 00:41:30 verbose #24765 > > │ x2="149" y2="75"/> │ 00:41:30 verbose #24766 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │ 00:41:30 verbose #24767 > > │ x2="159" y2="75"/> │ 00:41:30 verbose #24768 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ 00:41:30 verbose #24769 > > │ x2="169" y2="75"/> │ 00:41:30 verbose #24770 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │ 00:41:30 verbose #24771 > > │ x2="179" y2="75"/> │ 00:41:30 verbose #24772 > > │ <line...421,415 422,415 423,415 424,415 425,415 426,415 427,415 428,415 │ 00:41:30 verbose #24773 > > │ 429,415 430,415 431,415 432,415 433,415 434,415 435,415 436,415 437,415 │ 00:41:30 verbose #24774 > > │ 438,415 439,415 440,415 441,415 442,415 443,415 444,415 445,415 446,415 │ 00:41:30 verbose #24775 > > │ 447,415 448,415 449,415 450,415 451,415 452,415 453,415 454,415 455,415 │ 00:41:30 verbose #24776 > > │ 456,415 457,415 458,415 459,415 460,415 461,415 462,415 463,415 464,415 │ 00:41:30 verbose #24777 > > │ 465,415 466,415 467,415 468,415 469,415 470,415 471,415 472,415 473,415 │ 00:41:30 verbose #24778 > > │ 474,415 475,415 476,415 477,415 478,415 479,415 480,415 481,415 482,415 │ 00:41:30 verbose #24779 > > │ 483,415 484,415 485,415 486,415 487,415 488,415 489,415 490,415 491,415 │ 00:41:30 verbose #24780 > > │ 492,415 493,415 494,415 495,415 496,415 497,415 498,415 499,415 500,415 │ 00:41:30 verbose #24781 > > │ 501,415 502,415 503,415 504,415 505,415 506,415 507,415 508,415 509,415 │ 00:41:30 verbose #24782 > > │ 510,415 511,415 512,415 513,415 514,415 515,415 516,415 517,415 518,415 │ 00:41:30 verbose #24783 > > │ 519,415 520,85 521,85 522,85 523,85 524,85 525,85 526,85 527,85 528,85 │ 00:41:30 verbose #24784 > > │ 529,85 530,85 531,85 532,85 533,85 534,85 535,85 536,85 537,85 538,85 539,85 │ 00:41:30 verbose #24785 > > │ 540,85 541,85 542,85 543,85 544,85 545,85 546,85 547,85 548,85 549,85 550,85 │ 00:41:30 verbose #24786 > > │ 551,85 552,85 553,85 554,85 555,85 556,85 557,85 558,85 559,85 560,85 561,85 │ 00:41:30 verbose #24787 > > │ 562,85 563,85 564,85 565,85 566,85 567,85 568,85 569,85 "/> │ 00:41:30 verbose #24788 > > │ <rect x="437" y="235" width="143" height="30" opacity="1" fill="none" │ 00:41:30 verbose #24789 > > │ stroke="#FFFFFF"/> │ 00:41:30 verbose #24790 > > │ <text x="477" y="245" dy="0.76em" text-anchor="start" │ 00:41:30 verbose #24791 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:30 verbose #24792 > > │ fill="#FFFFFF"> │ 00:41:30 verbose #24793 > > │ force on bike (N) │ 00:41:30 verbose #24794 > > │ </text> │ 00:41:30 verbose #24795 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:41:30 verbose #24796 > > │ points="447,250 467,250 "/> │ 00:41:30 verbose #24797 > > │ </svg> │ 00:41:30 verbose #24798 > > │ │ 00:41:30 verbose #24799 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:30 verbose #24800 > > 00:41:30 verbose #24801 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:30 verbose #24802 > > //// test 00:41:30 verbose #24803 > > 00:41:30 verbose #24804 > > inl x = am'.init_series -5 45 1 00:41:30 verbose #24805 > > inl y = x |> am'.map_base (position_ft 0.1f64 20 0 0 [[ pedal_coast ]]) 00:41:30 verbose #24806 > > "child pedaling then coasting", "time (s)", "", ;[[ "position of bike (m)", x, y 00:41:30 verbose #24807 > > ]] 00:41:31 verbose #24808 > > 00:41:31 verbose #24809 > > ╭─[ 706.12ms - return value ]──────────────────────────────────────────────────╮ 00:41:31 verbose #24810 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ 00:41:31 verbose #24811 > > │ xmlns="http://www.w3.org/2000/svg"> │ 00:41:31 verbose #24812 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ 00:41:31 verbose #24813 > > │ stroke="none"/> │ 00:41:31 verbose #24814 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ 00:41:31 verbose #24815 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:31 verbose #24816 > > │ fill="#FFFFFF"> │ 00:41:31 verbose #24817 > > │ child pedaling then coasting │ 00:41:31 verbose #24818 > > │ </text> │ 00:41:31 verbose #24819 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │ 00:41:31 verbose #24820 > > │ y2="75"/> │ 00:41:31 verbose #24821 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ 00:41:31 verbose #24822 > > │ y2="75"/> │ 00:41:31 verbose #24823 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │ 00:41:31 verbose #24824 > > │ y2="75"/> │ 00:41:31 verbose #24825 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │ 00:41:31 verbose #24826 > > │ y2="75"/> │ 00:41:31 verbose #24827 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │ 00:41:31 verbose #24828 > > │ y2="75"/> │ 00:41:31 verbose #24829 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │ 00:41:31 verbose #24830 > > │ x2="109" y2="75"/> │ 00:41:31 verbose #24831 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ 00:41:31 verbose #24832 > > │ x2="119" y2="75"/> │ 00:41:31 verbose #24833 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ 00:41:31 verbose #24834 > > │ x2="129" y2="75"/> │ 00:41:31 verbose #24835 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ 00:41:31 verbose #24836 > > │ x2="139" y2="75"/> │ 00:41:31 verbose #24837 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │ 00:41:31 verbose #24838 > > │ x2="149" y2="75"/> │ 00:41:31 verbose #24839 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │ 00:41:31 verbose #24840 > > │ x2="159" y2="75"/> │ 00:41:31 verbose #24841 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ 00:41:31 verbose #24842 > > │ x2="169" y2="75"/> │ 00:41:31 verbose #24843 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │ 00:41:31 verbose #24844 > > │ x2="179" y2="75"/> │ 00:41:31 verbose #24845 > > │ <line...serif" font-size="9.67741935483871" opacity="1" fill="#FFFFFF"> │ 00:41:31 verbose #24846 > > │ 200.0 │ 00:41:31 verbose #24847 > > │ </text> │ 00:41:31 verbose #24848 > > │ <polyline fill="none" opacity="1" stroke="#FFFFFF" stroke-width="1" │ 00:41:31 verbose #24849 > > │ points="585,201 590,201 "/> │ 00:41:31 verbose #24850 > > │ <text x="595" y="147" dy="0.5ex" text-anchor="start" │ 00:41:31 verbose #24851 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:31 verbose #24852 > > │ fill="#FFFFFF"> │ 00:41:31 verbose #24853 > > │ 250.0 │ 00:41:31 verbose #24854 > > │ </text> │ 00:41:31 verbose #24855 > > │ <polyline fill="none" opacity="1" stroke="#FFFFFF" stroke-width="1" │ 00:41:31 verbose #24856 > > │ points="585,147 590,147 "/> │ 00:41:31 verbose #24857 > > │ <text x="595" y="94" dy="0.5ex" text-anchor="start" font-family="sans-serif" │ 00:41:31 verbose #24858 > > │ font-size="9.67741935483871" opacity="1" fill="#FFFFFF"> │ 00:41:31 verbose #24859 > > │ 300.0 │ 00:41:31 verbose #24860 > > │ </text> │ 00:41:31 verbose #24861 > > │ <polyline fill="none" opacity="1" stroke="#FFFFFF" stroke-width="1" │ 00:41:31 verbose #24862 > > │ points="585,94 590,94 "/> │ 00:41:31 verbose #24863 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:41:31 verbose #24864 > > │ points="69,415 79,415 89,415 99,415 109,415 119,415 129,414 139,413 149,412 │ 00:41:31 verbose #24865 > > │ 159,410 169,408 179,405 189,401 199,397 209,393 219,388 229,382 239,377 │ 00:41:31 verbose #24866 > > │ 249,372 259,366 269,361 279,356 289,350 299,345 309,340 319,334 329,329 │ 00:41:31 verbose #24867 > > │ 339,322 349,316 359,308 369,301 379,292 389,284 399,274 409,264 419,254 │ 00:41:31 verbose #24868 > > │ 429,243 439,232 449,221 459,210 469,199 479,189 489,178 499,167 509,157 │ 00:41:31 verbose #24869 > > │ 519,146 529,135 539,123 549,111 559,99 569,85 "/> │ 00:41:31 verbose #24870 > > │ <rect x="421" y="235" width="159" height="30" opacity="1" fill="none" │ 00:41:31 verbose #24871 > > │ stroke="#FFFFFF"/> │ 00:41:31 verbose #24872 > > │ <text x="461" y="245" dy="0.76em" text-anchor="start" │ 00:41:31 verbose #24873 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:31 verbose #24874 > > │ fill="#FFFFFF"> │ 00:41:31 verbose #24875 > > │ position of bike (m) │ 00:41:31 verbose #24876 > > │ </text> │ 00:41:31 verbose #24877 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:41:31 verbose #24878 > > │ points="431,250 451,250 "/> │ 00:41:31 verbose #24879 > > │ </svg> │ 00:41:31 verbose #24880 > > │ │ 00:41:31 verbose #24881 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:31 verbose #24882 > > 00:41:31 verbose #24883 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:31 verbose #24884 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:31 verbose #24885 > > │ ### velocity_fv │ 00:41:31 verbose #24886 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:31 verbose #24887 > > 00:41:31 verbose #24888 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:31 verbose #24889 > > inl newton_second_v m fs v0 = 00:41:31 verbose #24890 > > fs |> listm.map (fun f => f v0) |> listm'.sum |> fun x => x / m 00:41:31 verbose #24891 > > 00:41:31 verbose #24892 > > inl update_velocity dt m fs v0 = 00:41:31 verbose #24893 > > v0 + newton_second_v m fs v0 * dt 00:41:31 verbose #24894 > > 00:41:31 verbose #24895 > > inl velocity_fv dt m v0 fs t = 00:41:31 verbose #24896 > > stream.iterate (update_velocity dt m fs) v0 00:41:31 verbose #24897 > > |> stream.try_item (t / dt |> math.round |> abs) 00:41:31 verbose #24898 > > |> optionm'.default_value 0 00:41:31 verbose #24899 > > 00:41:31 verbose #24900 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:31 verbose #24901 > > inl f_air drag rho area v = 00:41:31 verbose #24902 > > -drag * rho * area * abs v * v / 2 00:41:32 verbose #24903 > > 00:41:32 verbose #24904 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:32 verbose #24905 > > //// test 00:41:32 verbose #24906 > > 00:41:32 verbose #24907 > > inl x = am'.init_series 0 60 0.5 00:41:32 verbose #24908 > > inl y = x |> am'.map_base (velocity_fv 1 70 0f64 [[ fun _ => 100; f_air 2 1.225 00:41:32 verbose #24909 > > 0.6 ]]) 00:41:32 verbose #24910 > > "bike velocity", "time (s)", "", ;[[ "velocity of bike (m/s)", x, y ]] 00:41:32 verbose #24911 > > 00:41:32 verbose #24912 > > ╭─[ 771.13ms - return value ]──────────────────────────────────────────────────╮ 00:41:32 verbose #24913 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ 00:41:32 verbose #24914 > > │ xmlns="http://www.w3.org/2000/svg"> │ 00:41:32 verbose #24915 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ 00:41:32 verbose #24916 > > │ stroke="none"/> │ 00:41:32 verbose #24917 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ 00:41:32 verbose #24918 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:32 verbose #24919 > > │ fill="#FFFFFF"> │ 00:41:32 verbose #24920 > > │ bike velocity │ 00:41:32 verbose #24921 > > │ </text> │ 00:41:32 verbose #24922 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │ 00:41:32 verbose #24923 > > │ y2="75"/> │ 00:41:32 verbose #24924 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ 00:41:32 verbose #24925 > > │ y2="75"/> │ 00:41:32 verbose #24926 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │ 00:41:32 verbose #24927 > > │ y2="75"/> │ 00:41:32 verbose #24928 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │ 00:41:32 verbose #24929 > > │ y2="75"/> │ 00:41:32 verbose #24930 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │ 00:41:32 verbose #24931 > > │ y2="75"/> │ 00:41:32 verbose #24932 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="103" y1="424" │ 00:41:32 verbose #24933 > > │ x2="103" y2="75"/> │ 00:41:32 verbose #24934 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="111" y1="424" │ 00:41:32 verbose #24935 > > │ x2="111" y2="75"/> │ 00:41:32 verbose #24936 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ 00:41:32 verbose #24937 > > │ x2="119" y2="75"/> │ 00:41:32 verbose #24938 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="128" y1="424" │ 00:41:32 verbose #24939 > > │ x2="128" y2="75"/> │ 00:41:32 verbose #24940 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="136" y1="424" │ 00:41:32 verbose #24941 > > │ x2="136" y2="75"/> │ 00:41:32 verbose #24942 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │ 00:41:32 verbose #24943 > > │ x2="144" y2="75"/> │ 00:41:32 verbose #24944 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │ 00:41:32 verbose #24945 > > │ x2="153" y2="75"/> │ 00:41:32 verbose #24946 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="161" y1="424" │ 00:41:32 verbose #24947 > > │ x2="161" y2="75"/> │ 00:41:32 verbose #24948 > > │ <line opacity="1" st...t" font-family="sans-serif" │ 00:41:32 verbose #24949 > > │ font-size="9.67741935483871" opacity="1" fill="#FFFFFF"> │ 00:41:32 verbose #24950 > > │ 12.0 │ 00:41:32 verbose #24951 > > │ </text> │ 00:41:32 verbose #24952 > > │ <polyline fill="none" opacity="1" stroke="#FFFFFF" stroke-width="1" │ 00:41:32 verbose #24953 > > │ points="585,76 590,76 "/> │ 00:41:32 verbose #24954 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:41:32 verbose #24955 > > │ points="69,415 74,415 78,374 82,335 86,335 90,335 94,297 99,261 103,261 │ 00:41:32 verbose #24956 > > │ 107,261 111,230 115,202 119,202 124,202 128,179 132,159 136,159 140,159 │ 00:41:32 verbose #24957 > > │ 144,143 148,130 153,130 157,130 161,120 165,112 169,112 173,112 178,106 │ 00:41:32 verbose #24958 > > │ 182,101 186,101 190,101 194,97 198,94 203,94 207,94 211,92 215,91 219,91 │ 00:41:32 verbose #24959 > > │ 223,91 228,89 232,88 236,88 240,88 244,88 248,87 252,87 257,87 261,87 265,86 │ 00:41:32 verbose #24960 > > │ 269,86 273,86 277,86 282,86 286,86 290,86 294,86 298,86 302,86 307,86 311,86 │ 00:41:32 verbose #24961 > > │ 315,86 319,86 323,86 327,86 331,85 336,85 340,85 344,85 348,85 352,85 356,85 │ 00:41:32 verbose #24962 > > │ 361,85 365,85 369,85 373,85 377,85 381,85 386,85 390,85 394,85 398,85 402,85 │ 00:41:32 verbose #24963 > > │ 406,85 410,85 415,85 419,85 423,85 427,85 431,85 435,85 440,85 444,85 448,85 │ 00:41:32 verbose #24964 > > │ 452,85 456,85 460,85 465,85 469,85 473,85 477,85 481,85 485,85 490,85 494,85 │ 00:41:32 verbose #24965 > > │ 498,85 502,85 506,85 510,85 514,85 519,85 523,85 527,85 531,85 535,85 539,85 │ 00:41:32 verbose #24966 > > │ 544,85 548,85 552,85 556,85 560,85 564,85 569,85 "/> │ 00:41:32 verbose #24967 > > │ <rect x="410" y="235" width="170" height="30" opacity="1" fill="none" │ 00:41:32 verbose #24968 > > │ stroke="#FFFFFF"/> │ 00:41:32 verbose #24969 > > │ <text x="450" y="245" dy="0.76em" text-anchor="start" │ 00:41:32 verbose #24970 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:32 verbose #24971 > > │ fill="#FFFFFF"> │ 00:41:32 verbose #24972 > > │ velocity of bike (m/s) │ 00:41:32 verbose #24973 > > │ </text> │ 00:41:32 verbose #24974 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:41:32 verbose #24975 > > │ points="420,250 440,250 "/> │ 00:41:32 verbose #24976 > > │ </svg> │ 00:41:32 verbose #24977 > > │ │ 00:41:32 verbose #24978 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:32 verbose #24979 > > 00:41:32 verbose #24980 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:32 verbose #24981 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:32 verbose #24982 > > │ ### velocity_ftv │ 00:41:32 verbose #24983 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:32 verbose #24984 > > 00:41:32 verbose #24985 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:32 verbose #24986 > > inl newton_second_tv m fs (t, v0) = 00:41:32 verbose #24987 > > inl f_net = fs |> listm.map (fun f => f (t, v0)) |> listm'.sum 00:41:32 verbose #24988 > > inl acc = f_net / m 00:41:32 verbose #24989 > > 1, acc 00:41:32 verbose #24990 > > 00:41:32 verbose #24991 > > inl update_tv dt m fs (t, v0) = 00:41:32 verbose #24992 > > inl dtdt, dvdt = newton_second_tv m fs (t, v0) 00:41:32 verbose #24993 > > t + dtdt * dt, v0 + dvdt * dt 00:41:32 verbose #24994 > > 00:41:32 verbose #24995 > > inl velocity_ftv dt m tv0 fs t = 00:41:32 verbose #24996 > > stream.iterate (join update_tv dt m fs) tv0 00:41:32 verbose #24997 > > |> stream.try_item (t / dt |> math.round |> abs) 00:41:32 verbose #24998 > > |> optionm.map snd 00:41:32 verbose #24999 > > |> optionm'.default_value 0 00:41:33 verbose #25000 > > 00:41:33 verbose #25001 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:33 verbose #25002 > > //// test 00:41:33 verbose #25003 > > 00:41:33 verbose #25004 > > inl x = am'.init_series 0 100 0.1 00:41:33 verbose #25005 > > inl y = 00:41:33 verbose #25006 > > x 00:41:33 verbose #25007 > > |> am'.map_base ( 00:41:33 verbose #25008 > > velocity_ftv 0.1 20 (dyn (0, 0)) [[ fun (t, _) => pedal_coast t; fun (_, 00:41:33 verbose #25009 > > v) => f_air 2 1.225 0.5 v ]] 00:41:33 verbose #25010 > > ) 00:41:33 verbose #25011 > > "pedaling and coasting with air", "time (s)", "", ;[[ "velocity of bike (m/s)", 00:41:33 verbose #25012 > > x, y ]] 00:41:33 verbose #25013 > > 00:41:33 verbose #25014 > > ╭─[ 729.95ms - return value ]──────────────────────────────────────────────────╮ 00:41:33 verbose #25015 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ 00:41:33 verbose #25016 > > │ xmlns="http://www.w3.org/2000/svg"> │ 00:41:33 verbose #25017 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ 00:41:33 verbose #25018 > > │ stroke="none"/> │ 00:41:33 verbose #25019 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ 00:41:33 verbose #25020 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:33 verbose #25021 > > │ fill="#FFFFFF"> │ 00:41:33 verbose #25022 > > │ pedaling and coasting with air │ 00:41:33 verbose #25023 > > │ </text> │ 00:41:33 verbose #25024 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │ 00:41:33 verbose #25025 > > │ y2="75"/> │ 00:41:33 verbose #25026 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ 00:41:33 verbose #25027 > > │ y2="75"/> │ 00:41:33 verbose #25028 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │ 00:41:33 verbose #25029 > > │ y2="75"/> │ 00:41:33 verbose #25030 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │ 00:41:33 verbose #25031 > > │ y2="75"/> │ 00:41:33 verbose #25032 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │ 00:41:33 verbose #25033 > > │ y2="75"/> │ 00:41:33 verbose #25034 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │ 00:41:33 verbose #25035 > > │ x2="109" y2="75"/> │ 00:41:33 verbose #25036 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ 00:41:33 verbose #25037 > > │ x2="119" y2="75"/> │ 00:41:33 verbose #25038 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ 00:41:33 verbose #25039 > > │ x2="129" y2="75"/> │ 00:41:33 verbose #25040 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ 00:41:33 verbose #25041 > > │ x2="139" y2="75"/> │ 00:41:33 verbose #25042 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │ 00:41:33 verbose #25043 > > │ x2="149" y2="75"/> │ 00:41:33 verbose #25044 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │ 00:41:33 verbose #25045 > > │ x2="159" y2="75"/> │ 00:41:33 verbose #25046 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ 00:41:33 verbose #25047 > > │ x2="169" y2="75"/> │ 00:41:33 verbose #25048 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │ 00:41:33 verbose #25049 > > │ x2="179" y2="75"/> │ 00:41:33 verbose #25050 > > │ <li... 497,128 497,126 498,125 498,123 499,122 499,121 500,119 500,118 │ 00:41:33 verbose #25051 > > │ 501,117 501,116 502,114 502,113 503,112 503,111 504,110 504,109 505,108 │ 00:41:33 verbose #25052 > > │ 505,107 506,106 506,105 507,104 507,103 508,102 508,101 509,100 509,99 │ 00:41:33 verbose #25053 > > │ 510,98 510,98 511,97 511,96 512,95 512,94 513,94 513,93 514,92 514,92 515,91 │ 00:41:33 verbose #25054 > > │ 515,90 516,90 516,89 517,88 517,88 518,87 518,87 519,86 519,85 520,89 520,93 │ 00:41:33 verbose #25055 > > │ 521,97 521,100 522,104 522,107 523,110 523,114 524,117 524,120 525,123 │ 00:41:33 verbose #25056 > > │ 525,126 526,129 526,132 527,135 527,137 528,140 528,143 529,145 529,148 │ 00:41:33 verbose #25057 > > │ 530,150 530,153 531,155 531,158 532,160 532,162 533,165 533,167 534,169 │ 00:41:33 verbose #25058 > > │ 534,171 535,173 535,175 536,177 536,179 537,181 537,183 538,185 538,187 │ 00:41:33 verbose #25059 > > │ 539,189 539,190 540,192 540,194 541,196 541,197 542,199 542,201 543,202 │ 00:41:33 verbose #25060 > > │ 543,204 544,205 544,207 545,208 545,210 546,211 546,213 547,214 547,216 │ 00:41:33 verbose #25061 > > │ 548,217 548,219 549,220 549,221 550,223 550,224 551,225 551,226 552,228 │ 00:41:33 verbose #25062 > > │ 552,229 553,230 553,231 554,232 554,234 555,235 555,236 556,237 556,238 │ 00:41:33 verbose #25063 > > │ 557,239 557,240 558,241 558,242 559,243 559,245 560,246 560,247 561,248 │ 00:41:33 verbose #25064 > > │ 561,249 562,249 562,250 563,251 563,252 564,253 564,254 565,255 565,256 │ 00:41:33 verbose #25065 > > │ 566,257 566,258 567,259 567,259 568,260 568,261 569,262 "/> │ 00:41:33 verbose #25066 > > │ <rect x="410" y="235" width="170" height="30" opacity="1" fill="none" │ 00:41:33 verbose #25067 > > │ stroke="#FFFFFF"/> │ 00:41:33 verbose #25068 > > │ <text x="450" y="245" dy="0.76em" text-anchor="start" │ 00:41:33 verbose #25069 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:33 verbose #25070 > > │ fill="#FFFFFF"> │ 00:41:33 verbose #25071 > > │ velocity of bike (m/s) │ 00:41:33 verbose #25072 > > │ </text> │ 00:41:33 verbose #25073 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:41:33 verbose #25074 > > │ points="420,250 440,250 "/> │ 00:41:33 verbose #25075 > > │ </svg> │ 00:41:33 verbose #25076 > > │ │ 00:41:33 verbose #25077 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:33 verbose #25078 > > 00:41:33 verbose #25079 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:33 verbose #25080 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:33 verbose #25081 > > │ ### velocity_ftxv │ 00:41:33 verbose #25082 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:33 verbose #25083 > > 00:41:33 verbose #25084 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:33 verbose #25085 > > nominal state_1d = time * position * velocity 00:41:33 verbose #25086 > > nominal rrr = f64 * f64 * f64 00:41:33 verbose #25087 > > 00:41:33 verbose #25088 > > inl newton_second_1d m fs (state_1d (t, x0, v0)) = 00:41:33 verbose #25089 > > inl f_net = fs |> listm.map (fun f => f (state_1d (t, x0, v0))) |> 00:41:33 verbose #25090 > > listm'.sum 00:41:33 verbose #25091 > > inl acc = f_net / m 00:41:33 verbose #25092 > > rrr (1f64, v0, acc) 00:41:33 verbose #25093 > > 00:41:33 verbose #25094 > > inl euler_1d dt deriv (state_1d (t0, x0, v0) as t) = 00:41:33 verbose #25095 > > inl (rrr (_, _, dvdt)) = deriv t 00:41:33 verbose #25096 > > inl t1 = t0 + dt 00:41:33 verbose #25097 > > inl x1 = x0 + v0 * dt 00:41:33 verbose #25098 > > inl v1 = v0 + dvdt * dt 00:41:33 verbose #25099 > > state_1d (t1, x1, v1) 00:41:33 verbose #25100 > > 00:41:33 verbose #25101 > > inl update_txv dt m fs = 00:41:33 verbose #25102 > > newton_second_1d m fs |> euler_1d dt 00:41:33 verbose #25103 > > 00:41:33 verbose #25104 > > inl states_txv dt m txv0 fs = 00:41:33 verbose #25105 > > seq.iterate_ (update_txv dt m fs) txv0 00:41:33 verbose #25106 > > 00:41:33 verbose #25107 > > inl velocity_1d sts t = 00:41:33 verbose #25108 > > inl (state_1d (t0, _, _)) = sts 0 00:41:33 verbose #25109 > > inl (state_1d (t1, _, _)) = sts 1 00:41:33 verbose #25110 > > inl dt = t1 - t0 00:41:33 verbose #25111 > > inl num_steps = t / dt |> math.round |> abs 00:41:33 verbose #25112 > > inl (state_1d (_, _, v0)) = sts num_steps 00:41:33 verbose #25113 > > v0 00:41:33 verbose #25114 > > 00:41:33 verbose #25115 > > inl velocity_ftxv dt m txv0 fs = 00:41:33 verbose #25116 > > states_txv dt m txv0 fs |> velocity_1d 00:41:33 verbose #25117 > > 00:41:33 verbose #25118 > > inl position_1d sts t = 00:41:33 verbose #25119 > > inl (state_1d (t0, _, _)) = sts 0 00:41:33 verbose #25120 > > inl (state_1d (t1, _, _)) = sts 1 00:41:33 verbose #25121 > > inl dt = t1 - t0 00:41:33 verbose #25122 > > inl num_steps = t / dt |> math.round |> abs 00:41:33 verbose #25123 > > inl (state_1d (_, x0, _)) = sts num_steps 00:41:33 verbose #25124 > > x0 00:41:33 verbose #25125 > > 00:41:33 verbose #25126 > > inl position_ftxv dt m txv0 fs = 00:41:33 verbose #25127 > > states_txv dt m txv0 fs |> position_1d 00:41:33 verbose #25128 > > 00:41:33 verbose #25129 > > inl spring_force k (state_1d (_, x0, _)) = 00:41:33 verbose #25130 > > -k * x0 00:41:34 verbose #25131 > > 00:41:34 verbose #25132 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:34 verbose #25133 > > //// test 00:41:34 verbose #25134 > > 00:41:34 verbose #25135 > > inl damped_ho_forces () = 00:41:34 verbose #25136 > > [[ 00:41:34 verbose #25137 > > spring_force 0.8 00:41:34 verbose #25138 > > fun (state_1d (_, _, v0)) => f_air 2 1.225 (pi * math.square 0.02) v0 00:41:34 verbose #25139 > > fun _ => -0.0027 * 9.80665 00:41:34 verbose #25140 > > ]] 00:41:34 verbose #25141 > > 00:41:34 verbose #25142 > > inl damped_ho_states () = 00:41:34 verbose #25143 > > states_txv 0.001 0.0027 (state_1d (0, 0.1, 0)) (damped_ho_forces ()) 00:41:34 verbose #25144 > > 00:41:34 verbose #25145 > > inl pingpong_position t = 00:41:34 verbose #25146 > > position_ftxv 0.001 0.0027 (state_1d (0, 0.1, 0)) (damped_ho_forces ()) t 00:41:34 verbose #25147 > > 00:41:34 verbose #25148 > > inl x = am'.init_series 0 3 0.01 00:41:34 verbose #25149 > > inl y = x |> am'.map_base pingpong_position 00:41:34 verbose #25150 > > "ping pong ball on a slinky", "time (s)", "", ;[[ "position (m)", x, y ]] 00:41:34 verbose #25151 > > 00:41:34 verbose #25152 > > ╭─[ 527.76ms - return value ]──────────────────────────────────────────────────╮ 00:41:34 verbose #25153 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ 00:41:34 verbose #25154 > > │ xmlns="http://www.w3.org/2000/svg"> │ 00:41:34 verbose #25155 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ 00:41:34 verbose #25156 > > │ stroke="none"/> │ 00:41:34 verbose #25157 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ 00:41:34 verbose #25158 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:34 verbose #25159 > > │ fill="#FFFFFF"> │ 00:41:34 verbose #25160 > > │ ping pong ball on a slinky │ 00:41:34 verbose #25161 > > │ </text> │ 00:41:34 verbose #25162 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │ 00:41:34 verbose #25163 > > │ y2="75"/> │ 00:41:34 verbose #25164 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ 00:41:34 verbose #25165 > > │ y2="75"/> │ 00:41:34 verbose #25166 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │ 00:41:34 verbose #25167 > > │ y2="75"/> │ 00:41:34 verbose #25168 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │ 00:41:34 verbose #25169 > > │ y2="75"/> │ 00:41:34 verbose #25170 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │ 00:41:34 verbose #25171 > > │ y2="75"/> │ 00:41:34 verbose #25172 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="103" y1="424" │ 00:41:34 verbose #25173 > > │ x2="103" y2="75"/> │ 00:41:34 verbose #25174 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="111" y1="424" │ 00:41:34 verbose #25175 > > │ x2="111" y2="75"/> │ 00:41:34 verbose #25176 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ 00:41:34 verbose #25177 > > │ x2="119" y2="75"/> │ 00:41:34 verbose #25178 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="128" y1="424" │ 00:41:34 verbose #25179 > > │ x2="128" y2="75"/> │ 00:41:34 verbose #25180 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="136" y1="424" │ 00:41:34 verbose #25181 > > │ x2="136" y2="75"/> │ 00:41:34 verbose #25182 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │ 00:41:34 verbose #25183 > > │ x2="144" y2="75"/> │ 00:41:34 verbose #25184 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │ 00:41:34 verbose #25185 > > │ x2="153" y2="75"/> │ 00:41:34 verbose #25186 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="161" y1="424" │ 00:41:34 verbose #25187 > > │ x2="161" y2="75"/> │ 00:41:34 verbose #25188 > > │ <line o...88 332,305 334,321 336,334 337,346 339,354 341,360 342,363 344,362 │ 00:41:34 verbose #25189 > > │ 346,359 347,352 349,342 351,330 352,316 354,300 356,283 357,265 359,247 │ 00:41:34 verbose #25190 > > │ 361,229 362,212 364,197 366,183 367,172 369,163 371,156 372,153 374,153 │ 00:41:34 verbose #25191 > > │ 376,156 377,161 379,170 381,181 382,194 384,209 386,226 387,243 389,260 │ 00:41:34 verbose #25192 > > │ 391,277 392,294 394,309 396,323 397,335 399,344 401,351 402,355 404,356 │ 00:41:34 verbose #25193 > > │ 406,354 407,349 409,341 410,331 412,319 414,305 415,289 417,273 419,256 │ 00:41:34 verbose #25194 > > │ 420,239 422,223 424,208 425,194 427,182 429,172 430,165 432,161 434,159 │ 00:41:34 verbose #25195 > > │ 435,160 437,164 439,171 440,180 442,192 444,205 445,220 447,235 449,252 │ 00:41:34 verbose #25196 > > │ 450,268 452,284 454,299 455,313 457,325 459,335 460,342 462,347 464,350 │ 00:41:34 verbose #25197 > > │ 465,349 467,346 469,340 470,332 472,321 474,309 475,295 477,280 479,264 │ 00:41:34 verbose #25198 > > │ 480,248 482,232 484,217 485,204 487,192 489,181 490,173 492,168 494,165 │ 00:41:34 verbose #25199 > > │ 495,165 497,167 499,172 500,180 502,189 504,201 505,215 507,229 509,244 │ 00:41:34 verbose #25200 > > │ 510,260 512,275 514,290 515,303 517,316 519,326 520,335 522,341 524,344 │ 00:41:34 verbose #25201 > > │ 525,345 527,343 529,339 530,332 532,323 534,312 535,300 537,286 539,271 │ 00:41:34 verbose #25202 > > │ 540,256 542,241 544,226 545,213 547,200 549,190 550,181 552,175 554,171 │ 00:41:34 verbose #25203 > > │ 555,169 557,170 559,174 560,180 562,188 564,198 565,210 567,223 569,238 "/> │ 00:41:34 verbose #25204 > > │ <rect x="464" y="235" width="116" height="30" opacity="1" fill="none" │ 00:41:34 verbose #25205 > > │ stroke="#FFFFFF"/> │ 00:41:34 verbose #25206 > > │ <text x="504" y="245" dy="0.76em" text-anchor="start" │ 00:41:34 verbose #25207 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:34 verbose #25208 > > │ fill="#FFFFFF"> │ 00:41:34 verbose #25209 > > │ position (m) │ 00:41:34 verbose #25210 > > │ </text> │ 00:41:34 verbose #25211 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:41:34 verbose #25212 > > │ points="474,250 494,250 "/> │ 00:41:34 verbose #25213 > > │ </svg> │ 00:41:34 verbose #25214 > > │ │ 00:41:34 verbose #25215 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:34 verbose #25216 > > 00:41:34 verbose #25217 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:34 verbose #25218 > > //// test 00:41:34 verbose #25219 > > 00:41:34 verbose #25220 > > inl pingpong_velocity t = 00:41:34 verbose #25221 > > velocity_ftxv 0.001 0.0027 (state_1d (0, 0.1, 0)) (damped_ho_forces ()) t 00:41:34 verbose #25222 > > 00:41:34 verbose #25223 > > inl x = am'.init_series 0 3 0.01 00:41:34 verbose #25224 > > inl y = x |> am'.map_base pingpong_velocity 00:41:34 verbose #25225 > > "ping pong ball on a slinky", "time (s)", "", ;[[ "velocity (m/s)", x, y ]] 00:41:35 verbose #25226 > > 00:41:35 verbose #25227 > > ╭─[ 496.79ms - return value ]──────────────────────────────────────────────────╮ 00:41:35 verbose #25228 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ 00:41:35 verbose #25229 > > │ xmlns="http://www.w3.org/2000/svg"> │ 00:41:35 verbose #25230 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ 00:41:35 verbose #25231 > > │ stroke="none"/> │ 00:41:35 verbose #25232 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ 00:41:35 verbose #25233 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:35 verbose #25234 > > │ fill="#FFFFFF"> │ 00:41:35 verbose #25235 > > │ ping pong ball on a slinky │ 00:41:35 verbose #25236 > > │ </text> │ 00:41:35 verbose #25237 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │ 00:41:35 verbose #25238 > > │ y2="75"/> │ 00:41:35 verbose #25239 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ 00:41:35 verbose #25240 > > │ y2="75"/> │ 00:41:35 verbose #25241 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │ 00:41:35 verbose #25242 > > │ y2="75"/> │ 00:41:35 verbose #25243 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │ 00:41:35 verbose #25244 > > │ y2="75"/> │ 00:41:35 verbose #25245 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │ 00:41:35 verbose #25246 > > │ y2="75"/> │ 00:41:35 verbose #25247 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="103" y1="424" │ 00:41:35 verbose #25248 > > │ x2="103" y2="75"/> │ 00:41:35 verbose #25249 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="111" y1="424" │ 00:41:35 verbose #25250 > > │ x2="111" y2="75"/> │ 00:41:35 verbose #25251 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ 00:41:35 verbose #25252 > > │ x2="119" y2="75"/> │ 00:41:35 verbose #25253 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="128" y1="424" │ 00:41:35 verbose #25254 > > │ x2="128" y2="75"/> │ 00:41:35 verbose #25255 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="136" y1="424" │ 00:41:35 verbose #25256 > > │ x2="136" y2="75"/> │ 00:41:35 verbose #25257 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │ 00:41:35 verbose #25258 > > │ x2="144" y2="75"/> │ 00:41:35 verbose #25259 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │ 00:41:35 verbose #25260 > > │ x2="153" y2="75"/> │ 00:41:35 verbose #25261 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="161" y1="424" │ 00:41:35 verbose #25262 > > │ x2="161" y2="75"/> │ 00:41:35 verbose #25263 > > │ <line o... 332,343 334,332 336,319 337,304 339,287 341,269 342,250 344,231 │ 00:41:35 verbose #25264 > > │ 346,212 347,195 349,178 351,164 352,153 354,144 356,138 357,136 359,136 │ 00:41:35 verbose #25265 > > │ 361,140 362,147 364,157 366,169 367,183 369,199 371,216 372,234 374,253 │ 00:41:35 verbose #25266 > > │ 376,271 377,288 379,304 381,318 382,330 384,339 386,346 387,349 389,349 │ 00:41:35 verbose #25267 > > │ 391,346 392,340 394,332 396,321 397,307 399,292 401,276 402,258 404,241 │ 00:41:35 verbose #25268 > > │ 406,223 407,206 409,190 410,176 412,164 414,154 415,148 417,144 419,143 │ 00:41:35 verbose #25269 > > │ 420,145 422,150 424,158 425,168 427,180 429,194 430,210 432,227 434,244 │ 00:41:35 verbose #25270 > > │ 435,261 437,278 439,293 440,307 442,320 444,330 445,337 447,341 449,343 │ 00:41:35 verbose #25271 > > │ 450,342 452,338 454,331 455,322 457,310 459,297 460,282 462,266 464,249 │ 00:41:35 verbose #25272 > > │ 465,233 467,216 469,201 470,187 472,174 474,164 475,156 477,151 479,149 │ 00:41:35 verbose #25273 > > │ 480,149 482,153 484,159 485,167 487,178 489,190 490,204 492,220 494,236 │ 00:41:35 verbose #25274 > > │ 495,252 497,268 499,283 500,297 502,310 504,320 505,329 507,334 509,337 │ 00:41:35 verbose #25275 > > │ 510,337 512,335 514,330 515,322 517,312 519,300 520,287 522,272 524,257 │ 00:41:35 verbose #25276 > > │ 525,241 527,226 529,210 530,196 532,184 534,173 535,164 537,158 539,154 │ 00:41:35 verbose #25277 > > │ 540,154 542,155 544,160 545,167 547,176 549,187 550,199 552,213 554,228 │ 00:41:35 verbose #25278 > > │ 555,244 557,259 559,274 560,288 562,301 564,312 565,321 567,327 569,332 "/> │ 00:41:35 verbose #25279 > > │ <rect x="454" y="235" width="126" height="30" opacity="1" fill="none" │ 00:41:35 verbose #25280 > > │ stroke="#FFFFFF"/> │ 00:41:35 verbose #25281 > > │ <text x="494" y="245" dy="0.76em" text-anchor="start" │ 00:41:35 verbose #25282 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:35 verbose #25283 > > │ fill="#FFFFFF"> │ 00:41:35 verbose #25284 > > │ velocity (m/s) │ 00:41:35 verbose #25285 > > │ </text> │ 00:41:35 verbose #25286 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:41:35 verbose #25287 > > │ points="464,250 484,250 "/> │ 00:41:35 verbose #25288 > > │ </svg> │ 00:41:35 verbose #25289 > > │ │ 00:41:35 verbose #25290 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:35 verbose #25291 > > 00:41:35 verbose #25292 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:35 verbose #25293 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:35 verbose #25294 > > │ ### shift │ 00:41:35 verbose #25295 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:35 verbose #25296 > > 00:41:35 verbose #25297 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:35 verbose #25298 > > type update_function s = s -> s 00:41:35 verbose #25299 > > 00:41:35 verbose #25300 > > type differential_equation s ds = s -> ds 00:41:35 verbose #25301 > > 00:41:35 verbose #25302 > > type numerical_method s ds = differential_equation s ds -> update_function s 00:41:35 verbose #25303 > > 00:41:35 verbose #25304 > > 00:41:35 verbose #25305 > > inl solver method = 00:41:35 verbose #25306 > > method >> seq.iterate 00:41:35 verbose #25307 > > inl solver' method = 00:41:35 verbose #25308 > > method >> seq.iterate' 00:41:35 verbose #25309 > > inl solver_ method = 00:41:35 verbose #25310 > > method >> seq.iterate_ 00:41:35 verbose #25311 > > 00:41:35 verbose #25312 > > 00:41:35 verbose #25313 > > inl euler_cromer_1d dt deriv (state_1d (t0, x0, v0) as t) = 00:41:35 verbose #25314 > > inl (rrr (_, _, dvdt)) = deriv t 00:41:35 verbose #25315 > > inl t1 = t0 + dt 00:41:35 verbose #25316 > > inl v1 = v0 + dvdt * dt 00:41:35 verbose #25317 > > inl x1 = x0 + v1 * dt 00:41:35 verbose #25318 > > state_1d (t1, x1, v1) 00:41:35 verbose #25319 > > 00:41:35 verbose #25320 > > inl update_txv_ec dt m fs = 00:41:35 verbose #25321 > > euler_cromer_1d dt (newton_second_1d m fs) 00:41:35 verbose #25322 > > 00:41:35 verbose #25323 > > prototype (+++) ds : ds -> ds -> ds 00:41:35 verbose #25324 > > prototype scale ds : f64 -> ds -> ds 00:41:35 verbose #25325 > > 00:41:35 verbose #25326 > > instance (+++) rrr = fun (rrr (dtdt0, dxdt0, dvdt0)) (rrr (dtdt1, dxdt1, dvdt1)) 00:41:35 verbose #25327 > > => 00:41:35 verbose #25328 > > rrr (dtdt0 + dtdt1, dxdt0 + dxdt1, dvdt0 + dvdt1) 00:41:35 verbose #25329 > > 00:41:35 verbose #25330 > > instance scale rrr = fun w (rrr (dtdt0, dxdt0, dvdt0)) => 00:41:35 verbose #25331 > > rrr (w * dtdt0, w * dxdt0, w * dvdt0) 00:41:35 verbose #25332 > > 00:41:35 verbose #25333 > > prototype shift s : forall ds. f64 -> ds -> s -> s 00:41:35 verbose #25334 > > 00:41:35 verbose #25335 > > instance shift state_1d = fun dt ds (state_1d (t, x, v)) => 00:41:35 verbose #25336 > > inl dtdt, dxdt, dvdt = 00:41:35 verbose #25337 > > real 00:41:35 verbose #25338 > > match ds with 00:41:35 verbose #25339 > > | rrr x => x 00:41:35 verbose #25340 > > | state_1d x => x 00:41:35 verbose #25341 > > state_1d (t + dtdt * dt, x + dxdt * dt, v + dvdt * dt) 00:41:35 verbose #25342 > > 00:41:35 verbose #25343 > > inl euler dt deriv st0 = 00:41:35 verbose #25344 > > shift dt (deriv st0) st0 00:41:35 verbose #25345 > > 00:41:35 verbose #25346 > > inl runge_kutta_4 dt deriv st0 = 00:41:35 verbose #25347 > > inl m0 = deriv st0 00:41:35 verbose #25348 > > inl m1 = deriv (shift (dt / 2) m0 st0) 00:41:35 verbose #25349 > > inl m2 = deriv (shift (dt / 2) m1 st0) 00:41:35 verbose #25350 > > inl m3 = deriv (shift dt m2 st0) 00:41:35 verbose #25351 > > shift (dt / 6) (m0 +++ m1 +++ m1 +++ m2 +++ m2 +++ m3) st0 00:41:35 verbose #25352 > > 00:41:35 verbose #25353 > > inl exponential (_, x0, v0) = 00:41:35 verbose #25354 > > 1f64, v0, x0 00:41:35 verbose #25355 > > 00:41:35 verbose #25356 > > inl of_state_1d (state_1d (t, x, v)) = 00:41:35 verbose #25357 > > t, x, v 00:41:35 verbose #25358 > > 00:41:35 verbose #25359 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:35 verbose #25360 > > //// test 00:41:35 verbose #25361 > > 00:41:35 verbose #25362 > > solver (euler 0.01) (of_state_1d >> exponential >> state_1d) (state_1d (0, 1, 00:41:35 verbose #25363 > > 1)) 800i32 00:41:35 verbose #25364 > > |> _assert_eq (state_1d (7.999999999999874, 2864.8311229272326, 00:41:35 verbose #25365 > > 2864.8311229272326)) 00:41:35 verbose #25366 > > 00:41:35 verbose #25367 > > solver (euler_cromer_1d 0.1) (of_state_1d >> exponential >> rrr) (state_1d (0, 00:41:35 verbose #25368 > > 1, 1)) 80i32 00:41:35 verbose #25369 > > |> _assert_eq (state_1d (7.999999999999988, 3043.379244966009, 00:41:35 verbose #25370 > > 2895.0121485099035)) 00:41:35 verbose #25371 > > 00:41:35 verbose #25372 > > solver (runge_kutta_4 1) (of_state_1d >> exponential >> rrr) (state_1d (0, 1, 00:41:35 verbose #25373 > > 1)) 8i32 00:41:35 verbose #25374 > > |> _assert_eq (state_1d (8.0, 2894.789038540849, 2894.789038540849)) 00:41:36 verbose #25375 > > 00:41:36 verbose #25376 > > ╭─[ 654.02ms - stdout ]────────────────────────────────────────────────────────╮ 00:41:36 verbose #25377 > > │ __assert_eq / actual: struct (8.0, 2864.831123, 2864.831123) / expected: │ 00:41:36 verbose #25378 > > │ struct (8.0, 2864.831123, 2864.831123) │ 00:41:36 verbose #25379 > > │ __assert_eq / actual: struct (8.0, 3043.379245, 2895.012149) / expected: │ 00:41:36 verbose #25380 > > │ struct (8.0, 3043.379245, 2895.012149) │ 00:41:36 verbose #25381 > > │ __assert_eq / actual: struct (8.0, 2894.789039, 2894.789039) / expected: │ 00:41:36 verbose #25382 > > │ struct (8.0, 2894.789039, 2894.789039) │ 00:41:36 verbose #25383 > > │ │ 00:41:36 verbose #25384 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:36 verbose #25385 > > 00:41:36 verbose #25386 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:36 verbose #25387 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:36 verbose #25388 > > │ ### vec │ 00:41:36 verbose #25389 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:36 verbose #25390 > > 00:41:36 verbose #25391 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:36 verbose #25392 > > type vec = 00:41:36 verbose #25393 > > { 00:41:36 verbose #25394 > > x : f64 00:41:36 verbose #25395 > > y : f64 00:41:36 verbose #25396 > > z : f64 00:41:36 verbose #25397 > > } 00:41:36 verbose #25398 > > 00:41:36 verbose #25399 > > inl vec x y z : vec = 00:41:36 verbose #25400 > > { x y z } 00:41:36 verbose #25401 > > 00:41:36 verbose #25402 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:36 verbose #25403 > > //// test 00:41:36 verbose #25404 > > 00:41:36 verbose #25405 > > vec 1 2 3 .z 00:41:36 verbose #25406 > > |> _assert_eq 3 00:41:37 verbose #25407 > > 00:41:37 verbose #25408 > > ╭─[ 492.34ms - stdout ]────────────────────────────────────────────────────────╮ 00:41:37 verbose #25409 > > │ __assert_eq / actual: 3.0 / expected: 3.0 │ 00:41:37 verbose #25410 > > │ │ 00:41:37 verbose #25411 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:37 verbose #25412 > > 00:41:37 verbose #25413 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:37 verbose #25414 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:37 verbose #25415 > > │ #### consts │ 00:41:37 verbose #25416 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:37 verbose #25417 > > 00:41:37 verbose #25418 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:37 verbose #25419 > > inl i_hat () = vec 1 0 0 00:41:37 verbose #25420 > > inl j_hat () = vec 0 1 0 00:41:37 verbose #25421 > > inl k_hat () = vec 0 0 1 00:41:37 verbose #25422 > > inl zero_vec () = vec 0 0 0 00:41:37 verbose #25423 > > 00:41:37 verbose #25424 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:37 verbose #25425 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:37 verbose #25426 > > │ #### ^+^ │ 00:41:37 verbose #25427 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:37 verbose #25428 > > 00:41:37 verbose #25429 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:37 verbose #25430 > > inl (^+^) (a : vec) (b : vec) = 00:41:37 verbose #25431 > > vec (a.x + b.x) (a.y + b.y) (a.z + b.z) 00:41:38 verbose #25432 > > 00:41:38 verbose #25433 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:38 verbose #25434 > > //// test 00:41:38 verbose #25435 > > 00:41:38 verbose #25436 > > vec 1 2 3 ^+^ vec 4 5 6 00:41:38 verbose #25437 > > |> _assert_eq (vec 5 7 9) 00:41:38 verbose #25438 > > 00:41:38 verbose #25439 > > ╭─[ 534.42ms - stdout ]────────────────────────────────────────────────────────╮ 00:41:38 verbose #25440 > > │ __assert_eq / actual: struct (5.0, 7.0, 9.0) / expected: struct (5.0, 7.0, │ 00:41:38 verbose #25441 > > │ 9.0) │ 00:41:38 verbose #25442 > > │ │ 00:41:38 verbose #25443 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:38 verbose #25444 > > 00:41:38 verbose #25445 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:38 verbose #25446 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:38 verbose #25447 > > │ #### sum_vec │ 00:41:38 verbose #25448 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:38 verbose #25449 > > 00:41:38 verbose #25450 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:38 verbose #25451 > > inl sum_vec vs = 00:41:38 verbose #25452 > > vs |> listm.fold (^+^) (zero_vec ()) 00:41:39 verbose #25453 > > 00:41:39 verbose #25454 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:39 verbose #25455 > > //// test 00:41:39 verbose #25456 > > 00:41:39 verbose #25457 > > [[ vec 1 2 3; vec 4 5 6 ]] 00:41:39 verbose #25458 > > |> sum_vec 00:41:39 verbose #25459 > > |> _assert_eq (vec 5 7 9) 00:41:39 verbose #25460 > > 00:41:39 verbose #25461 > > ╭─[ 481.92ms - stdout ]────────────────────────────────────────────────────────╮ 00:41:39 verbose #25462 > > │ __assert_eq / actual: struct (5.0, 7.0, 9.0) / expected: struct (5.0, 7.0, │ 00:41:39 verbose #25463 > > │ 9.0) │ 00:41:39 verbose #25464 > > │ │ 00:41:39 verbose #25465 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:39 verbose #25466 > > 00:41:39 verbose #25467 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:39 verbose #25468 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:39 verbose #25469 > > │ #### *^ │ 00:41:39 verbose #25470 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:39 verbose #25471 > > 00:41:39 verbose #25472 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:39 verbose #25473 > > inl (*^) c { x y z } = 00:41:39 verbose #25474 > > vec (c * x) (c * y) (c * z) 00:41:40 verbose #25475 > > 00:41:40 verbose #25476 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:40 verbose #25477 > > //// test 00:41:40 verbose #25478 > > 00:41:40 verbose #25479 > > 5 *^ vec 1 2 3 00:41:40 verbose #25480 > > |> _assert_eq (vec 5 10 15) 00:41:40 verbose #25481 > > 00:41:40 verbose #25482 > > ╭─[ 514.32ms - stdout ]────────────────────────────────────────────────────────╮ 00:41:40 verbose #25483 > > │ __assert_eq / actual: struct (5.0, 10.0, 15.0) / expected: struct (5.0, │ 00:41:40 verbose #25484 > > │ 10.0, 15.0) │ 00:41:40 verbose #25485 > > │ │ 00:41:40 verbose #25486 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:40 verbose #25487 > > 00:41:40 verbose #25488 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:40 verbose #25489 > > //// test 00:41:40 verbose #25490 > > 00:41:40 verbose #25491 > > 3 *^ i_hat () ^+^ 4 *^ k_hat () 00:41:40 verbose #25492 > > |> _assert_eq (vec 3 0 4) 00:41:41 verbose #25493 > > 00:41:41 verbose #25494 > > ╭─[ 445.35ms - stdout ]────────────────────────────────────────────────────────╮ 00:41:41 verbose #25495 > > │ __assert_eq / actual: struct (3.0, 0.0, 4.0) / expected: struct (3.0, 0.0, │ 00:41:41 verbose #25496 > > │ 4.0) │ 00:41:41 verbose #25497 > > │ │ 00:41:41 verbose #25498 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:41 verbose #25499 > > 00:41:41 verbose #25500 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:41 verbose #25501 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:41 verbose #25502 > > │ #### ^* │ 00:41:41 verbose #25503 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:41 verbose #25504 > > 00:41:41 verbose #25505 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:41 verbose #25506 > > inl (^*) v c = 00:41:41 verbose #25507 > > (*^) c v 00:41:41 verbose #25508 > > 00:41:41 verbose #25509 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:41 verbose #25510 > > //// test 00:41:41 verbose #25511 > > 00:41:41 verbose #25512 > > vec 1 2 3 ^* 5 00:41:41 verbose #25513 > > |> _assert_eq (vec 5 10 15) 00:41:42 verbose #25514 > > 00:41:42 verbose #25515 > > ╭─[ 405.59ms - stdout ]────────────────────────────────────────────────────────╮ 00:41:42 verbose #25516 > > │ __assert_eq / actual: struct (5.0, 10.0, 15.0) / expected: struct (5.0, │ 00:41:42 verbose #25517 > > │ 10.0, 15.0) │ 00:41:42 verbose #25518 > > │ │ 00:41:42 verbose #25519 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:42 verbose #25520 > > 00:41:42 verbose #25521 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:42 verbose #25522 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:42 verbose #25523 > > │ #### ^/ │ 00:41:42 verbose #25524 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:42 verbose #25525 > > 00:41:42 verbose #25526 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:42 verbose #25527 > > inl (^/) { x y z } c = 00:41:42 verbose #25528 > > vec (x / c) (y / c) (z / c) 00:41:42 verbose #25529 > > 00:41:42 verbose #25530 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:42 verbose #25531 > > //// test 00:41:42 verbose #25532 > > 00:41:42 verbose #25533 > > vec 1 2 3 ^/ 5 00:41:42 verbose #25534 > > |> _assert_eq (vec 0.2 0.4 0.6) 00:41:42 verbose #25535 > > 00:41:42 verbose #25536 > > ╭─[ 395.48ms - stdout ]────────────────────────────────────────────────────────╮ 00:41:42 verbose #25537 > > │ __assert_eq / actual: struct (0.2, 0.4, 0.6) / expected: struct (0.2, 0.4, │ 00:41:42 verbose #25538 > > │ 0.6) │ 00:41:42 verbose #25539 > > │ │ 00:41:42 verbose #25540 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:42 verbose #25541 > > 00:41:42 verbose #25542 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:42 verbose #25543 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:42 verbose #25544 > > │ #### negate_vec │ 00:41:42 verbose #25545 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:42 verbose #25546 > > 00:41:42 verbose #25547 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:42 verbose #25548 > > inl negate_vec v = 00:41:42 verbose #25549 > > v ^* -1 00:41:43 verbose #25550 > > 00:41:43 verbose #25551 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:43 verbose #25552 > > //// test 00:41:43 verbose #25553 > > 00:41:43 verbose #25554 > > vec 1 2 3 00:41:43 verbose #25555 > > |> negate_vec 00:41:43 verbose #25556 > > |> _assert_eq (vec -1 -2 -3) 00:41:43 verbose #25557 > > 00:41:43 verbose #25558 > > ╭─[ 463.40ms - stdout ]────────────────────────────────────────────────────────╮ 00:41:43 verbose #25559 > > │ __assert_eq / actual: struct (-1.0, -2.0, -3.0) / expected: struct (-1.0, │ 00:41:43 verbose #25560 > > │ -2.0, -3.0) │ 00:41:43 verbose #25561 > > │ │ 00:41:43 verbose #25562 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:43 verbose #25563 > > 00:41:43 verbose #25564 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:43 verbose #25565 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:43 verbose #25566 > > │ #### ^-^ │ 00:41:43 verbose #25567 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:43 verbose #25568 > > 00:41:43 verbose #25569 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:43 verbose #25570 > > inl (^-^) a b = 00:41:43 verbose #25571 > > a ^+^ (negate_vec b) 00:41:44 verbose #25572 > > 00:41:44 verbose #25573 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:44 verbose #25574 > > //// test 00:41:44 verbose #25575 > > 00:41:44 verbose #25576 > > vec 1 2 3 ^-^ vec 4 5 6 00:41:44 verbose #25577 > > |> _assert_eq (vec -3 -3 -3) 00:41:44 verbose #25578 > > 00:41:44 verbose #25579 > > ╭─[ 502.63ms - stdout ]────────────────────────────────────────────────────────╮ 00:41:44 verbose #25580 > > │ __assert_eq / actual: struct (-3.0, -3.0, -3.0) / expected: struct (-3.0, │ 00:41:44 verbose #25581 > > │ -3.0, -3.0) │ 00:41:44 verbose #25582 > > │ │ 00:41:44 verbose #25583 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:44 verbose #25584 > > 00:41:44 verbose #25585 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:44 verbose #25586 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:44 verbose #25587 > > │ #### <.> │ 00:41:44 verbose #25588 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:44 verbose #25589 > > 00:41:44 verbose #25590 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:44 verbose #25591 > > inl (<.>) { x = ax y = ay z = az } { x = bx y = by z = bz } = 00:41:44 verbose #25592 > > ax * bx + ay * by + az * bz 00:41:45 verbose #25593 > > 00:41:45 verbose #25594 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:45 verbose #25595 > > //// test 00:41:45 verbose #25596 > > 00:41:45 verbose #25597 > > vec 1 2 3 <.> vec 4 5 6 00:41:45 verbose #25598 > > |> _assert_eq 32 00:41:45 verbose #25599 > > 00:41:45 verbose #25600 > > ╭─[ 423.69ms - stdout ]────────────────────────────────────────────────────────╮ 00:41:45 verbose #25601 > > │ __assert_eq / actual: 32.0 / expected: 32.0 │ 00:41:45 verbose #25602 > > │ │ 00:41:45 verbose #25603 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:45 verbose #25604 > > 00:41:45 verbose #25605 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:45 verbose #25606 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:45 verbose #25607 > > │ #### \>\< │ 00:41:45 verbose #25608 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:45 verbose #25609 > > 00:41:45 verbose #25610 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:45 verbose #25611 > > inl (><) (a : vec) (b : vec) = 00:41:45 verbose #25612 > > vec 00:41:45 verbose #25613 > > (a.y * b.z - a.z * b.y) 00:41:45 verbose #25614 > > (a.z * b.x - a.x * b.z) 00:41:45 verbose #25615 > > (a.x * b.y - a.y * b.x) 00:41:46 verbose #25616 > > 00:41:46 verbose #25617 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:46 verbose #25618 > > //// test 00:41:46 verbose #25619 > > 00:41:46 verbose #25620 > > vec 1 2 3 >< vec 4 5 6 00:41:46 verbose #25621 > > |> _assert_eq (vec -3 6 -3) 00:41:46 verbose #25622 > > 00:41:46 verbose #25623 > > ╭─[ 520.04ms - stdout ]────────────────────────────────────────────────────────╮ 00:41:46 verbose #25624 > > │ __assert_eq / actual: struct (-3.0, 6.0, -3.0) / expected: struct (-3.0, │ 00:41:46 verbose #25625 > > │ 6.0, -3.0) │ 00:41:46 verbose #25626 > > │ │ 00:41:46 verbose #25627 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:46 verbose #25628 > > 00:41:46 verbose #25629 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:46 verbose #25630 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:46 verbose #25631 > > │ #### magnitude │ 00:41:46 verbose #25632 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:46 verbose #25633 > > 00:41:46 verbose #25634 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:46 verbose #25635 > > inl magnitude v = 00:41:46 verbose #25636 > > v <.> v |> sqrt 00:41:46 verbose #25637 > > 00:41:46 verbose #25638 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:46 verbose #25639 > > //// test 00:41:46 verbose #25640 > > 00:41:46 verbose #25641 > > vec 1 2 3 00:41:46 verbose #25642 > > |> magnitude 00:41:46 verbose #25643 > > |> _assert_approx_eq None 3.7416573867739413 00:41:47 verbose #25644 > > 00:41:47 verbose #25645 > > ╭─[ 411.54ms - stdout ]────────────────────────────────────────────────────────╮ 00:41:47 verbose #25646 > > │ __assert_approx_eq / actual: 3.741657387 / expected: 3.741657387 │ 00:41:47 verbose #25647 > > │ │ 00:41:47 verbose #25648 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:47 verbose #25649 > > 00:41:47 verbose #25650 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:47 verbose #25651 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:47 verbose #25652 > > │ #### v1 │ 00:41:47 verbose #25653 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:47 verbose #25654 > > 00:41:47 verbose #25655 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:47 verbose #25656 > > inl v1 t = 00:41:47 verbose #25657 > > 2 *^ (t ** 2 *^ i_hat () ^+^ 3 *^ (t ** 3 *^ j_hat () ^+^ t ** 4 *^ k_hat 00:41:47 verbose #25658 > > ())) 00:41:47 verbose #25659 > > 00:41:47 verbose #25660 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:47 verbose #25661 > > //// test 00:41:47 verbose #25662 > > 00:41:47 verbose #25663 > > v1 1 00:41:47 verbose #25664 > > |> _assert_eq (vec 2 6 6) 00:41:48 verbose #25665 > > 00:41:48 verbose #25666 > > ╭─[ 540.66ms - stdout ]────────────────────────────────────────────────────────╮ 00:41:48 verbose #25667 > > │ __assert_eq / actual: struct (2.0, 6.0, 6.0) / expected: struct (2.0, 6.0, │ 00:41:48 verbose #25668 > > │ 6.0) │ 00:41:48 verbose #25669 > > │ │ 00:41:48 verbose #25670 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:48 verbose #25671 > > 00:41:48 verbose #25672 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:48 verbose #25673 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:48 verbose #25674 > > │ #### vec_derivative │ 00:41:48 verbose #25675 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:48 verbose #25676 > > 00:41:48 verbose #25677 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:48 verbose #25678 > > type vec_derivative = (f64 -> vec) -> f64 -> vec 00:41:48 verbose #25679 > > 00:41:48 verbose #25680 > > inl vec_derivative dt : vec_derivative = 00:41:48 verbose #25681 > > fun v t => 00:41:48 verbose #25682 > > (v (t + dt / 2) ^-^ v (t - dt / 2)) ^/ dt 00:41:48 verbose #25683 > > 00:41:48 verbose #25684 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:48 verbose #25685 > > //// test 00:41:48 verbose #25686 > > 00:41:48 verbose #25687 > > vec_derivative 0.01 v1 3 .x 00:41:48 verbose #25688 > > |> _assert_approx_eq None (derivative 0.01 (v1 >> fun v => v.x) 3) 00:41:49 verbose #25689 > > 00:41:49 verbose #25690 > > ╭─[ 504.44ms - stdout ]────────────────────────────────────────────────────────╮ 00:41:49 verbose #25691 > > │ __assert_approx_eq / actual: 12.0 / expected: 12.0 │ 00:41:49 verbose #25692 > > │ │ 00:41:49 verbose #25693 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:49 verbose #25694 > > 00:41:49 verbose #25695 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:49 verbose #25696 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:49 verbose #25697 > > │ ### states_ps │ 00:41:49 verbose #25698 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:49 verbose #25699 > > 00:41:49 verbose #25700 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:49 verbose #25701 > > nominal particle_state = 00:41:49 verbose #25702 > > { 00:41:49 verbose #25703 > > mass : f64 00:41:49 verbose #25704 > > charge : f64 00:41:49 verbose #25705 > > time : f64 00:41:49 verbose #25706 > > pos_vec : vec 00:41:49 verbose #25707 > > velocity : vec 00:41:49 verbose #25708 > > } 00:41:49 verbose #25709 > > 00:41:49 verbose #25710 > > inl default_particle_state () : particle_state = 00:41:49 verbose #25711 > > particle_state { 00:41:49 verbose #25712 > > mass = 1 00:41:49 verbose #25713 > > charge = 0 00:41:49 verbose #25714 > > time = 0 00:41:49 verbose #25715 > > pos_vec = zero_vec () 00:41:49 verbose #25716 > > velocity = zero_vec () 00:41:49 verbose #25717 > > } 00:41:49 verbose #25718 > > 00:41:49 verbose #25719 > > type one_body_force = particle_state -> vec 00:41:49 verbose #25720 > > 00:41:49 verbose #25721 > > nominal d_particle_state = 00:41:49 verbose #25722 > > { 00:41:49 verbose #25723 > > dmdt : f64 00:41:49 verbose #25724 > > dqdt : f64 00:41:49 verbose #25725 > > dtdt : f64 00:41:49 verbose #25726 > > drdt : vec 00:41:49 verbose #25727 > > dvdt : vec 00:41:49 verbose #25728 > > } 00:41:49 verbose #25729 > > 00:41:49 verbose #25730 > > inl newton_second_ps (fs : list one_body_force) (st : particle_state) : 00:41:49 verbose #25731 > > d_particle_state = 00:41:49 verbose #25732 > > inl f_net = fs |> listm.map (fun f => f st) |> sum_vec 00:41:49 verbose #25733 > > d_particle_state { 00:41:49 verbose #25734 > > dmdt = 0 00:41:49 verbose #25735 > > dqdt = 0 00:41:49 verbose #25736 > > dtdt = 1 00:41:49 verbose #25737 > > drdt = st.velocity 00:41:49 verbose #25738 > > dvdt = f_net ^/ st.mass 00:41:49 verbose #25739 > > } 00:41:49 verbose #25740 > > 00:41:49 verbose #25741 > > inl earth_surface_gravity (st : particle_state) = 00:41:49 verbose #25742 > > inl g = 9.80665 00:41:49 verbose #25743 > > -st.mass * g *^ k_hat () 00:41:49 verbose #25744 > > 00:41:49 verbose #25745 > > inl air_resistance drag rho area (st : particle_state) = 00:41:49 verbose #25746 > > -0.5 * drag * rho * area * magnitude st.velocity *^ st.velocity 00:41:49 verbose #25747 > > 00:41:49 verbose #25748 > > inl euler_cromer_ps dt (deriv : particle_state -> d_particle_state) 00:41:49 verbose #25749 > > (particle_state st) = 00:41:49 verbose #25750 > > inl dst : d_particle_state = deriv (particle_state st) 00:41:49 verbose #25751 > > inl v' = st.velocity ^+^ dst.dvdt ^* dt 00:41:49 verbose #25752 > > particle_state { st with 00:41:49 verbose #25753 > > time = st.time + dt 00:41:49 verbose #25754 > > pos_vec = st.pos_vec ^+^ v' ^* dt 00:41:49 verbose #25755 > > velocity = st.velocity ^+^ dst.dvdt ^* dt 00:41:49 verbose #25756 > > } 00:41:49 verbose #25757 > > 00:41:49 verbose #25758 > > instance (+++) d_particle_state = fun (dps : d_particle_state) (dps' : 00:41:49 verbose #25759 > > d_particle_state) => 00:41:49 verbose #25760 > > d_particle_state { 00:41:49 verbose #25761 > > dmdt = dps.dmdt + dps'.dmdt 00:41:49 verbose #25762 > > dqdt = dps.dqdt + dps'.dqdt 00:41:49 verbose #25763 > > dtdt = dps.dtdt + dps'.dtdt 00:41:49 verbose #25764 > > drdt = dps.drdt ^+^ dps'.drdt 00:41:49 verbose #25765 > > dvdt = dps.dvdt ^+^ dps'.dvdt 00:41:49 verbose #25766 > > } 00:41:49 verbose #25767 > > 00:41:49 verbose #25768 > > instance scale d_particle_state = fun w (dps : d_particle_state) => 00:41:49 verbose #25769 > > d_particle_state { 00:41:49 verbose #25770 > > dmdt = w * dps.dmdt 00:41:49 verbose #25771 > > dqdt = w * dps.dqdt 00:41:49 verbose #25772 > > dtdt = w * dps.dtdt 00:41:49 verbose #25773 > > drdt = w *^ dps.drdt 00:41:49 verbose #25774 > > dvdt = w *^ dps.dvdt 00:41:49 verbose #25775 > > } 00:41:49 verbose #25776 > > 00:41:49 verbose #25777 > > instance shift particle_state = fun dt dps (particle_state st) => 00:41:49 verbose #25778 > > inl (d_particle_state dps) = 00:41:49 verbose #25779 > > real 00:41:49 verbose #25780 > > match dps with 00:41:49 verbose #25781 > > | d_particle_state _ => dps 00:41:49 verbose #25782 > > particle_state { st with 00:41:49 verbose #25783 > > time = st.time + dps.dtdt * dt 00:41:49 verbose #25784 > > pos_vec = st.pos_vec ^+^ dps.drdt ^* dt 00:41:49 verbose #25785 > > velocity = st.velocity ^+^ dps.dvdt ^* dt 00:41:49 verbose #25786 > > } 00:41:49 verbose #25787 > > 00:41:49 verbose #25788 > > inl states_ps (method : numerical_method particle_state d_particle_state) : _ -> 00:41:49 verbose #25789 > > _ -> i32 -> particle_state = 00:41:49 verbose #25790 > > newton_second_ps >> method >> seq.iterate_ 00:41:49 verbose #25791 > > 00:41:49 verbose #25792 > > inl z_ge0 sts = 00:41:49 verbose #25793 > > sts 00:41:49 verbose #25794 > > |> seq.take_while_ (fun (particle_state st) _ => st.pos_vec.z >= 0) 00:41:49 verbose #25795 > > 00:41:49 verbose #25796 > > inl trajectory sts = 00:41:49 verbose #25797 > > sts |> listm.map (fun (particle_state st) => st.pos_vec.y, st.pos_vec.z) 00:41:49 verbose #25798 > > 00:41:49 verbose #25799 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:49 verbose #25800 > > //// test 00:41:49 verbose #25801 > > 00:41:49 verbose #25802 > > inl update_ps (method : numerical_method particle_state d_particle_state) = 00:41:49 verbose #25803 > > newton_second_ps >> method 00:41:49 verbose #25804 > > 00:41:49 verbose #25805 > > inl position_ps (method : numerical_method particle_state d_particle_state) fs 00:41:49 verbose #25806 > > st t = 00:41:49 verbose #25807 > > inl states : i32 -> particle_state = states_ps method fs st 00:41:49 verbose #25808 > > inl dt = (states 1).time - (states 0).time 00:41:49 verbose #25809 > > inl num_steps = t / dt |> math.round |> abs 00:41:49 verbose #25810 > > inl st1 = solver' method (newton_second_ps fs) st num_steps 00:41:49 verbose #25811 > > st1.pos_vec 00:41:49 verbose #25812 > > 00:41:49 verbose #25813 > > inl sun_gravity (st : particle_state) : vec = 00:41:49 verbose #25814 > > inl big_g = 0.0000000000667408 00:41:49 verbose #25815 > > inl sun_mass = 1988480000000000000000000000000 00:41:49 verbose #25816 > > -big_g * sun_mass * st.mass *^ st.pos_vec ^/ magnitude st.pos_vec ** 3 00:41:49 verbose #25817 > > 00:41:49 verbose #25818 > > inl wind_force v_wind drag rho area (st : particle_state) = 00:41:49 verbose #25819 > > inl v_rel = st.velocity ^-^ v_wind 00:41:49 verbose #25820 > > -0.5 * drag * rho * area * magnitude v_rel *^ v_rel 00:41:49 verbose #25821 > > 00:41:49 verbose #25822 > > inl rock_state () = 00:41:49 verbose #25823 > > inl (particle_state default_particle_state') = default_particle_state () 00:41:49 verbose #25824 > > particle_state { default_particle_state' with 00:41:49 verbose #25825 > > mass = 2 00:41:49 verbose #25826 > > velocity = vec 3 0 4 00:41:49 verbose #25827 > > } 00:41:49 verbose #25828 > > 00:41:49 verbose #25829 > > inl halley_update dt = 00:41:49 verbose #25830 > > update_ps (euler_cromer_ps dt) [[ sun_gravity ]] 00:41:49 verbose #25831 > > 00:41:49 verbose #25832 > > inl halley_initial () = 00:41:49 verbose #25833 > > inl (particle_state default_particle_state') = default_particle_state () 00:41:49 verbose #25834 > > particle_state { default_particle_state' with 00:41:49 verbose #25835 > > mass = 220000000000000 00:41:49 verbose #25836 > > pos_vec = 87660000000 *^ i_hat () 00:41:49 verbose #25837 > > velocity = 54569 *^ j_hat () 00:41:49 verbose #25838 > > } 00:41:50 verbose #25839 > > 00:41:50 verbose #25840 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:50 verbose #25841 > > //// test 00:41:50 verbose #25842 > > 00:41:50 verbose #25843 > > inl baseball_forces () = 00:41:50 verbose #25844 > > inl area = pi * (0.074 / 2) ** 2 00:41:50 verbose #25845 > > [[ 00:41:50 verbose #25846 > > earth_surface_gravity 00:41:50 verbose #25847 > > air_resistance 0.3 1.225 area 00:41:50 verbose #25848 > > ]] 00:41:50 verbose #25849 > > 00:41:50 verbose #25850 > > inl baseball_trajectory dt v0 theta_deg = 00:41:50 verbose #25851 > > inl theta_rad = theta_deg * pi / 180 00:41:50 verbose #25852 > > inl vy0 = v0 * cos theta_rad 00:41:50 verbose #25853 > > inl vz0 = v0 * sin theta_rad 00:41:50 verbose #25854 > > inl initial_state = 00:41:50 verbose #25855 > > particle_state { 00:41:50 verbose #25856 > > mass = 0.145 00:41:50 verbose #25857 > > charge = 0 00:41:50 verbose #25858 > > time = 0 00:41:50 verbose #25859 > > pos_vec = zero_vec () 00:41:50 verbose #25860 > > velocity = vec 0 vy0 vz0 00:41:50 verbose #25861 > > } 00:41:50 verbose #25862 > > states_ps (euler_cromer_ps dt) (baseball_forces ()) initial_state 00:41:50 verbose #25863 > > >> Some 00:41:50 verbose #25864 > > |> z_ge0 00:41:50 verbose #25865 > > |> trajectory 00:41:50 verbose #25866 > > 00:41:50 verbose #25867 > > inl baseball_range dt v0 theta_deg = 00:41:50 verbose #25868 > > baseball_trajectory dt v0 theta_deg 00:41:50 verbose #25869 > > |> listm.fold (fun _ (y, _) => y) 0 00:41:50 verbose #25870 > > 00:41:50 verbose #25871 > > inl x = am'.init_series 10 80 1 00:41:50 verbose #25872 > > inl y = x |> am'.map_base (baseball_range 0.01 45) 00:41:50 verbose #25873 > > "range for a baseball hit at 45 m/s", 00:41:50 verbose #25874 > > "angle above horizontal (degrees)", 00:41:50 verbose #25875 > > "", 00:41:50 verbose #25876 > > ;[[ "horizontal range (m)", x, y ]] 00:41:51 verbose #25877 > > 00:41:51 verbose #25878 > > ╭─[ 1.00s - return value ]─────────────────────────────────────────────────────╮ 00:41:51 verbose #25879 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ 00:41:51 verbose #25880 > > │ xmlns="http://www.w3.org/2000/svg"> │ 00:41:51 verbose #25881 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ 00:41:51 verbose #25882 > > │ stroke="none"/> │ 00:41:51 verbose #25883 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ 00:41:51 verbose #25884 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:51 verbose #25885 > > │ fill="#FFFFFF"> │ 00:41:51 verbose #25886 > > │ range for a baseball hit at 45 m/s │ 00:41:51 verbose #25887 > > │ </text> │ 00:41:51 verbose #25888 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="55" y1="424" x2="55" │ 00:41:51 verbose #25889 > > │ y2="75"/> │ 00:41:51 verbose #25890 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="62" y1="424" x2="62" │ 00:41:51 verbose #25891 > > │ y2="75"/> │ 00:41:51 verbose #25892 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ 00:41:51 verbose #25893 > > │ y2="75"/> │ 00:41:51 verbose #25894 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="77" y1="424" x2="77" │ 00:41:51 verbose #25895 > > │ y2="75"/> │ 00:41:51 verbose #25896 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="84" y1="424" x2="84" │ 00:41:51 verbose #25897 > > │ y2="75"/> │ 00:41:51 verbose #25898 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="91" y1="424" x2="91" │ 00:41:51 verbose #25899 > > │ y2="75"/> │ 00:41:51 verbose #25900 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="98" y1="424" x2="98" │ 00:41:51 verbose #25901 > > │ y2="75"/> │ 00:41:51 verbose #25902 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="105" y1="424" │ 00:41:51 verbose #25903 > > │ x2="105" y2="75"/> │ 00:41:51 verbose #25904 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="112" y1="424" │ 00:41:51 verbose #25905 > > │ x2="112" y2="75"/> │ 00:41:51 verbose #25906 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ 00:41:51 verbose #25907 > > │ x2="119" y2="75"/> │ 00:41:51 verbose #25908 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="127" y1="424" │ 00:41:51 verbose #25909 > > │ x2="127" y2="75"/> │ 00:41:51 verbose #25910 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="134" y1="424" │ 00:41:51 verbose #25911 > > │ x2="134" y2="75"/> │ 00:41:51 verbose #25912 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="141" y1="424" │ 00:41:51 verbose #25913 > > │ x2="141" y2="75"/> │ 00:41:51 verbose #25914 > > │ <li...nts="585,199 590,199 "/> │ 00:41:51 verbose #25915 > > │ <text x="595" y="156" dy="0.5ex" text-anchor="start" │ 00:41:51 verbose #25916 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:51 verbose #25917 > > │ fill="#FFFFFF"> │ 00:41:51 verbose #25918 > > │ 100.0 │ 00:41:51 verbose #25919 > > │ </text> │ 00:41:51 verbose #25920 > > │ <polyline fill="none" opacity="1" stroke="#FFFFFF" stroke-width="1" │ 00:41:51 verbose #25921 > > │ points="585,156 590,156 "/> │ 00:41:51 verbose #25922 > > │ <text x="595" y="114" dy="0.5ex" text-anchor="start" │ 00:41:51 verbose #25923 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:51 verbose #25924 > > │ fill="#FFFFFF"> │ 00:41:51 verbose #25925 > > │ 110.0 │ 00:41:51 verbose #25926 > > │ </text> │ 00:41:51 verbose #25927 > > │ <polyline fill="none" opacity="1" stroke="#FFFFFF" stroke-width="1" │ 00:41:51 verbose #25928 > > │ points="585,114 590,114 "/> │ 00:41:51 verbose #25929 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:41:51 verbose #25930 > > │ points="69,343 77,325 84,307 91,290 98,275 105,259 112,245 119,231 127,219 │ 00:41:51 verbose #25931 > > │ 134,207 141,196 148,184 155,174 162,164 169,155 176,147 184,139 191,132 │ 00:41:51 verbose #25932 > > │ 198,126 205,119 212,114 219,109 226,104 233,100 241,96 248,93 255,91 262,89 │ 00:41:51 verbose #25933 > > │ 269,88 276,86 283,86 290,85 298,86 305,87 312,88 319,90 326,92 333,95 340,98 │ 00:41:51 verbose #25934 > > │ 348,102 355,106 362,110 369,115 376,120 383,126 390,132 397,139 405,146 │ 00:41:51 verbose #25935 > > │ 412,153 419,161 426,169 433,178 440,187 447,197 454,207 462,217 469,228 │ 00:41:51 verbose #25936 > > │ 476,239 483,250 490,262 497,274 504,287 511,300 519,313 526,326 533,340 │ 00:41:51 verbose #25937 > > │ 540,355 547,369 554,384 561,399 569,415 "/> │ 00:41:51 verbose #25938 > > │ <rect x="421" y="235" width="159" height="30" opacity="1" fill="none" │ 00:41:51 verbose #25939 > > │ stroke="#FFFFFF"/> │ 00:41:51 verbose #25940 > > │ <text x="461" y="245" dy="0.76em" text-anchor="start" │ 00:41:51 verbose #25941 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:51 verbose #25942 > > │ fill="#FFFFFF"> │ 00:41:51 verbose #25943 > > │ horizontal range (m) │ 00:41:51 verbose #25944 > > │ </text> │ 00:41:51 verbose #25945 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:41:51 verbose #25946 > > │ points="431,250 451,250 "/> │ 00:41:51 verbose #25947 > > │ </svg> │ 00:41:51 verbose #25948 > > │ │ 00:41:51 verbose #25949 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:51 verbose #25950 > > 00:41:51 verbose #25951 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:51 verbose #25952 > > //// test 00:41:51 verbose #25953 > > 00:41:51 verbose #25954 > > inl best_angle (min, max) = 00:41:51 verbose #25955 > > let rec loop theta_deg (best_range, best_theta_deg) = 00:41:51 verbose #25956 > > if theta_deg > max 00:41:51 verbose #25957 > > then best_range, best_theta_deg 00:41:51 verbose #25958 > > else 00:41:51 verbose #25959 > > inl range = baseball_range 0.01 45 theta_deg 00:41:51 verbose #25960 > > loop 00:41:51 verbose #25961 > > (theta_deg + 1) 00:41:51 verbose #25962 > > (if range > best_range 00:41:51 verbose #25963 > > then range, theta_deg 00:41:51 verbose #25964 > > else best_range, best_theta_deg) 00:41:51 verbose #25965 > > loop min (0f64, min) 00:41:51 verbose #25966 > > 00:41:51 verbose #25967 > > best_angle (30f64, 60f64) 00:41:51 verbose #25968 > > |> _assert_eq (116.77499158246208, 41) 00:41:52 verbose #25969 > > 00:41:52 verbose #25970 > > ╭─[ 876.79ms - stdout ]────────────────────────────────────────────────────────╮ 00:41:52 verbose #25971 > > │ __assert_eq / actual: struct (116.7749916, 41.0) / expected: struct │ 00:41:52 verbose #25972 > > │ (116.7749916, 41.0) │ 00:41:52 verbose #25973 > > │ │ 00:41:52 verbose #25974 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:52 verbose #25975 > > 00:41:52 verbose #25976 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:52 verbose #25977 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:52 verbose #25978 > > │ ### relativity_ps │ 00:41:52 verbose #25979 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:52 verbose #25980 > > 00:41:52 verbose #25981 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:52 verbose #25982 > > inl relativity_ps fs (st : particle_state) = 00:41:52 verbose #25983 > > inl f_net = fs |> listm.map (fun f => f st) |> sum_vec 00:41:52 verbose #25984 > > inl c = 299792458 00:41:52 verbose #25985 > > inl u = st.velocity ^/ c 00:41:52 verbose #25986 > > inl acc = sqrt (1 - (u <.> u)) *^ (f_net ^-^ (f_net <.> u) *^ u) ^/ st.mass 00:41:52 verbose #25987 > > d_particle_state { 00:41:52 verbose #25988 > > dmdt = 0 00:41:52 verbose #25989 > > dqdt = 0 00:41:52 verbose #25990 > > dtdt = 1 00:41:52 verbose #25991 > > drdt = st.velocity 00:41:52 verbose #25992 > > dvdt = acc 00:41:52 verbose #25993 > > } 00:41:52 verbose #25994 > > 00:41:52 verbose #25995 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:52 verbose #25996 > > //// test 00:41:52 verbose #25997 > > 00:41:52 verbose #25998 > > inl year = 365.25 * 24 * 60 * 60 00:41:52 verbose #25999 > > inl c = 299792458 00:41:52 verbose #26000 > > inl ~method = runge_kutta_4 100000 00:41:52 verbose #26001 > > inl forces = [[ fun _ => 10 *^ i_hat () ]] 00:41:52 verbose #26002 > > inl (particle_state default_particle_state') = default_particle_state () 00:41:52 verbose #26003 > > inl initial_state = 00:41:52 verbose #26004 > > particle_state { default_particle_state' with 00:41:52 verbose #26005 > > mass = 1 00:41:52 verbose #26006 > > } 00:41:52 verbose #26007 > > 00:41:52 verbose #26008 > > inl newton_states = solver_ method (newton_second_ps forces) initial_state 00:41:52 verbose #26009 > > inl relativity_states = solver_ method (relativity_ps forces) initial_state 00:41:52 verbose #26010 > > 00:41:52 verbose #26011 > > inl newton_x, newton_y = 00:41:52 verbose #26012 > > newton_states 00:41:52 verbose #26013 > > >> Some 00:41:52 verbose #26014 > > |> seq.take_while_ (fun (particle_state st) (_ : i32) => st.time <= year) 00:41:52 verbose #26015 > > |> listm.map (fun (particle_state st) => st.time / year, st.velocity.x / c) 00:41:52 verbose #26016 > > |> listm'.unzip 00:41:52 verbose #26017 > > 00:41:52 verbose #26018 > > inl _, relativity_y = 00:41:52 verbose #26019 > > relativity_states 00:41:52 verbose #26020 > > >> Some 00:41:52 verbose #26021 > > |> seq.take_while_ (fun (particle_state st) (_ : i32) => st.time <= year) 00:41:52 verbose #26022 > > |> listm.map (fun (particle_state st) => st.time / year, st.velocity.x / c) 00:41:52 verbose #26023 > > |> listm'.unzip 00:41:52 verbose #26024 > > 00:41:52 verbose #26025 > > inl newton_x = newton_x |> listm'.box |> listm'.to_array' 00:41:52 verbose #26026 > > inl newton_y = newton_y |> listm'.box |> listm'.to_array' 00:41:52 verbose #26027 > > inl relativity_y = relativity_y |> listm'.box |> listm'.to_array' 00:41:52 verbose #26028 > > 00:41:52 verbose #26029 > > "response to a constant force", 00:41:52 verbose #26030 > > "time (years)", 00:41:52 verbose #26031 > > "velocity (multiples of c)", 00:41:52 verbose #26032 > > ;[[ 00:41:52 verbose #26033 > > "newtonian", newton_x, newton_y 00:41:52 verbose #26034 > > "relativistic", newton_x, relativity_y 00:41:52 verbose #26035 > > ]] 00:41:53 verbose #26036 > > 00:41:53 verbose #26037 > > ╭─[ 705.39ms - return value ]──────────────────────────────────────────────────╮ 00:41:53 verbose #26038 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ 00:41:53 verbose #26039 > > │ xmlns="http://www.w3.org/2000/svg"> │ 00:41:53 verbose #26040 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ 00:41:53 verbose #26041 > > │ stroke="none"/> │ 00:41:53 verbose #26042 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ 00:41:53 verbose #26043 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:53 verbose #26044 > > │ fill="#FFFFFF"> │ 00:41:53 verbose #26045 > > │ response to a constant force │ 00:41:53 verbose #26046 > > │ </text> │ 00:41:53 verbose #26047 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │ 00:41:53 verbose #26048 > > │ y2="75"/> │ 00:41:53 verbose #26049 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ 00:41:53 verbose #26050 > > │ y2="75"/> │ 00:41:53 verbose #26051 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │ 00:41:53 verbose #26052 > > │ y2="75"/> │ 00:41:53 verbose #26053 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │ 00:41:53 verbose #26054 > > │ y2="75"/> │ 00:41:53 verbose #26055 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │ 00:41:53 verbose #26056 > > │ y2="75"/> │ 00:41:53 verbose #26057 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │ 00:41:53 verbose #26058 > > │ x2="109" y2="75"/> │ 00:41:53 verbose #26059 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ 00:41:53 verbose #26060 > > │ x2="119" y2="75"/> │ 00:41:53 verbose #26061 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ 00:41:53 verbose #26062 > > │ x2="129" y2="75"/> │ 00:41:53 verbose #26063 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ 00:41:53 verbose #26064 > > │ x2="139" y2="75"/> │ 00:41:53 verbose #26065 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │ 00:41:53 verbose #26066 > > │ x2="149" y2="75"/> │ 00:41:53 verbose #26067 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │ 00:41:53 verbose #26068 > > │ x2="159" y2="75"/> │ 00:41:53 verbose #26069 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ 00:41:53 verbose #26070 > > │ x2="169" y2="75"/> │ 00:41:53 verbose #26071 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │ 00:41:53 verbose #26072 > > │ x2="179" y2="75"/> │ 00:41:53 verbose #26073 > > │ <line... 393,238 394,238 396,237 397,237 399,236 401,235 402,235 404,234 │ 00:41:53 verbose #26074 > > │ 405,234 407,233 409,233 410,232 412,231 413,231 415,230 416,230 418,229 │ 00:41:53 verbose #26075 > > │ 420,229 421,228 423,228 424,227 426,227 428,226 429,225 431,225 432,224 │ 00:41:53 verbose #26076 > > │ 434,224 435,223 437,223 439,222 440,222 442,221 443,221 445,220 447,220 │ 00:41:53 verbose #26077 > > │ 448,219 450,219 451,218 453,218 454,217 456,217 458,216 459,216 461,215 │ 00:41:53 verbose #26078 > > │ 462,215 464,214 466,214 467,213 469,213 470,213 472,212 473,212 475,211 │ 00:41:53 verbose #26079 > > │ 477,211 478,210 480,210 481,209 483,209 485,208 486,208 488,208 489,207 │ 00:41:53 verbose #26080 > > │ 491,207 492,206 494,206 496,205 497,205 499,204 500,204 502,204 504,203 │ 00:41:53 verbose #26081 > > │ 505,203 507,202 508,202 510,202 511,201 513,201 515,200 516,200 518,200 │ 00:41:53 verbose #26082 > > │ 519,199 521,199 523,198 524,198 526,198 527,197 529,197 531,196 532,196 │ 00:41:53 verbose #26083 > > │ 534,196 535,195 537,195 538,194 540,194 542,194 543,193 545,193 546,193 │ 00:41:53 verbose #26084 > > │ 548,192 550,192 551,192 553,191 554,191 556,190 557,190 559,190 561,189 │ 00:41:53 verbose #26085 > > │ 562,189 564,189 565,188 567,188 569,188 "/> │ 00:41:53 verbose #26086 > > │ <rect x="464" y="227" width="116" height="45" opacity="1" fill="none" │ 00:41:53 verbose #26087 > > │ stroke="#FFFFFF"/> │ 00:41:53 verbose #26088 > > │ <text x="504" y="237" dy="0.76em" text-anchor="start" │ 00:41:53 verbose #26089 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:53 verbose #26090 > > │ fill="#FFFFFF"> │ 00:41:53 verbose #26091 > > │ newtonian │ 00:41:53 verbose #26092 > > │ </text> │ 00:41:53 verbose #26093 > > │ <text x="504" y="252" dy="0.76em" text-anchor="start" │ 00:41:53 verbose #26094 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:53 verbose #26095 > > │ fill="#FFFFFF"> │ 00:41:53 verbose #26096 > > │ relativistic │ 00:41:53 verbose #26097 > > │ </text> │ 00:41:53 verbose #26098 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:41:53 verbose #26099 > > │ points="474,242 494,242 "/> │ 00:41:53 verbose #26100 > > │ <polyline fill="none" opacity="1" stroke="#0000FF" stroke-width="1" │ 00:41:53 verbose #26101 > > │ points="474,257 494,257 "/> │ 00:41:53 verbose #26102 > > │ </svg> │ 00:41:53 verbose #26103 > > │ │ 00:41:53 verbose #26104 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:53 verbose #26105 > > 00:41:53 verbose #26106 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:53 verbose #26107 > > inl uniform_lorentz_force v_e v_b (st : particle_state) = 00:41:53 verbose #26108 > > st.charge *^ (v_e ^+^ st.velocity >< v_b) 00:41:53 verbose #26109 > > 00:41:53 verbose #26110 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:53 verbose #26111 > > //// test 00:41:53 verbose #26112 > > 00:41:53 verbose #26113 > > inl c : f64 = 299792458 00:41:53 verbose #26114 > > inl ~method = runge_kutta_4 0.000000001 00:41:53 verbose #26115 > > inl forces = [[ uniform_lorentz_force (zero_vec ()) (k_hat ()) ]] 00:41:53 verbose #26116 > > inl (particle_state default_particle_state') = default_particle_state () 00:41:53 verbose #26117 > > inl initial_state = 00:41:53 verbose #26118 > > particle_state { default_particle_state' with 00:41:53 verbose #26119 > > mass = 0.000000000000000000000000001672621898 00:41:53 verbose #26120 > > charge = 0.0000000000000000001602176621 00:41:53 verbose #26121 > > velocity = 0.8 *^ (c *^ j_hat ()) 00:41:53 verbose #26122 > > } 00:41:53 verbose #26123 > > 00:41:53 verbose #26124 > > inl newton_states = solver_ method (newton_second_ps forces) initial_state 00:41:53 verbose #26125 > > inl relativity_states = solver_ method (relativity_ps forces) initial_state 00:41:53 verbose #26126 > > 00:41:53 verbose #26127 > > inl newton_x, newton_y = 00:41:53 verbose #26128 > > newton_states 00:41:53 verbose #26129 > > >> Some 00:41:53 verbose #26130 > > |> seq.take_while_ (fun (particle_state st) i => i < 100i32) 00:41:53 verbose #26131 > > |> listm.map (fun (particle_state st) => st.pos_vec.x, st.pos_vec.y) 00:41:53 verbose #26132 > > |> listm'.unzip 00:41:53 verbose #26133 > > 00:41:53 verbose #26134 > > inl relativity_x, relativity_y = 00:41:53 verbose #26135 > > relativity_states 00:41:53 verbose #26136 > > >> Some 00:41:53 verbose #26137 > > |> seq.take_while_ (fun (particle_state st) i => i < 165i32) 00:41:53 verbose #26138 > > |> listm.map (fun (particle_state st) => st.pos_vec.x, st.pos_vec.y) 00:41:53 verbose #26139 > > |> listm'.unzip 00:41:53 verbose #26140 > > 00:41:53 verbose #26141 > > inl newton_x = newton_x |> listm'.box |> listm'.to_array' 00:41:53 verbose #26142 > > inl newton_y = newton_y |> listm'.box |> listm'.to_array' 00:41:53 verbose #26143 > > 00:41:53 verbose #26144 > > inl relativity_x = relativity_x |> listm'.box |> listm'.to_array' 00:41:53 verbose #26145 > > inl relativity_y = relativity_y |> listm'.box |> listm'.to_array' 00:41:53 verbose #26146 > > 00:41:53 verbose #26147 > > "proton in a 1-t magnetic field", 00:41:53 verbose #26148 > > "x (m)", 00:41:53 verbose #26149 > > "y (m)", 00:41:53 verbose #26150 > > ;[[ 00:41:53 verbose #26151 > > "newtonian", newton_x, newton_y 00:41:53 verbose #26152 > > "relativistic", relativity_x, relativity_y 00:41:53 verbose #26153 > > ]] 00:41:54 verbose #26154 > > 00:41:54 verbose #26155 > > ╭─[ 695.36ms - return value ]──────────────────────────────────────────────────╮ 00:41:54 verbose #26156 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ 00:41:54 verbose #26157 > > │ xmlns="http://www.w3.org/2000/svg"> │ 00:41:54 verbose #26158 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ 00:41:54 verbose #26159 > > │ stroke="none"/> │ 00:41:54 verbose #26160 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ 00:41:54 verbose #26161 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:54 verbose #26162 > > │ fill="#FFFFFF"> │ 00:41:54 verbose #26163 > > │ proton in a 1-t magnetic field │ 00:41:54 verbose #26164 > > │ </text> │ 00:41:54 verbose #26165 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="58" y1="424" x2="58" │ 00:41:54 verbose #26166 > > │ y2="75"/> │ 00:41:54 verbose #26167 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ 00:41:54 verbose #26168 > > │ y2="75"/> │ 00:41:54 verbose #26169 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="81" y1="424" x2="81" │ 00:41:54 verbose #26170 > > │ y2="75"/> │ 00:41:54 verbose #26171 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="93" y1="424" x2="93" │ 00:41:54 verbose #26172 > > │ y2="75"/> │ 00:41:54 verbose #26173 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="105" y1="424" │ 00:41:54 verbose #26174 > > │ x2="105" y2="75"/> │ 00:41:54 verbose #26175 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="117" y1="424" │ 00:41:54 verbose #26176 > > │ x2="117" y2="75"/> │ 00:41:54 verbose #26177 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ 00:41:54 verbose #26178 > > │ x2="129" y2="75"/> │ 00:41:54 verbose #26179 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="141" y1="424" │ 00:41:54 verbose #26180 > > │ x2="141" y2="75"/> │ 00:41:54 verbose #26181 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │ 00:41:54 verbose #26182 > > │ x2="153" y2="75"/> │ 00:41:54 verbose #26183 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="165" y1="424" │ 00:41:54 verbose #26184 > > │ x2="165" y2="75"/> │ 00:41:54 verbose #26185 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="177" y1="424" │ 00:41:54 verbose #26186 > > │ x2="177" y2="75"/> │ 00:41:54 verbose #26187 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="189" y1="424" │ 00:41:54 verbose #26188 > > │ x2="189" y2="75"/> │ 00:41:54 verbose #26189 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="201" y1="424" │ 00:41:54 verbose #26190 > > │ x2="201" y2="75"/> │ 00:41:54 verbose #26191 > > │ <...555,197 560,206 563,216 566,225 567,234 568,244 568,253 568,263 566,272 │ 00:41:54 verbose #26192 > > │ 564,281 561,291 557,300 552,309 547,317 540,326 533,334 526,342 517,350 │ 00:41:54 verbose #26193 > > │ 508,357 499,364 488,371 478,377 466,383 455,388 442,393 430,398 417,402 │ 00:41:54 verbose #26194 > > │ 403,405 390,408 376,410 362,412 348,414 333,414 319,415 305,414 290,414 │ 00:41:54 verbose #26195 > > │ 276,412 262,410 248,408 235,405 221,401 208,397 196,393 183,388 171,383 │ 00:41:54 verbose #26196 > > │ 160,377 149,371 139,364 129,357 120,350 112,342 104,334 97,326 91,317 86,309 │ 00:41:54 verbose #26197 > > │ 81,300 77,290 74,281 72,272 70,263 70,253 70,244 71,234 72,225 75,215 78,206 │ 00:41:54 verbose #26198 > > │ 83,197 88,188 93,180 100,171 107,163 115,155 124,148 133,140 143,133 153,127 │ 00:41:54 verbose #26199 > > │ 164,121 176,115 188,110 200,105 213,101 226,97 239,94 253,91 267,89 281,87 │ 00:41:54 verbose #26200 > > │ 295,86 310,85 324,85 338,86 353,87 367,88 381,90 394,93 408,96 421,100 │ 00:41:54 verbose #26201 > > │ 434,104 447,109 459,114 470,119 482,125 492,131 502,138 512,145 520,153 │ 00:41:54 verbose #26202 > > │ 529,161 536,169 543,177 549,186 554,194 558,203 562,213 565,222 567,231 │ 00:41:54 verbose #26203 > > │ 568,241 569,250 "/> │ 00:41:54 verbose #26204 > > │ <rect x="464" y="227" width="116" height="45" opacity="1" fill="none" │ 00:41:54 verbose #26205 > > │ stroke="#FFFFFF"/> │ 00:41:54 verbose #26206 > > │ <text x="504" y="237" dy="0.76em" text-anchor="start" │ 00:41:54 verbose #26207 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:54 verbose #26208 > > │ fill="#FFFFFF"> │ 00:41:54 verbose #26209 > > │ newtonian │ 00:41:54 verbose #26210 > > │ </text> │ 00:41:54 verbose #26211 > > │ <text x="504" y="252" dy="0.76em" text-anchor="start" │ 00:41:54 verbose #26212 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:54 verbose #26213 > > │ fill="#FFFFFF"> │ 00:41:54 verbose #26214 > > │ relativistic │ 00:41:54 verbose #26215 > > │ </text> │ 00:41:54 verbose #26216 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:41:54 verbose #26217 > > │ points="474,242 494,242 "/> │ 00:41:54 verbose #26218 > > │ <polyline fill="none" opacity="1" stroke="#0000FF" stroke-width="1" │ 00:41:54 verbose #26219 > > │ points="474,257 494,257 "/> │ 00:41:54 verbose #26220 > > │ </svg> │ 00:41:54 verbose #26221 > > │ │ 00:41:54 verbose #26222 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:54 verbose #26223 > > 00:41:54 verbose #26224 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:54 verbose #26225 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:54 verbose #26226 > > │ #### system kinetic energy versus time 1 │ 00:41:54 verbose #26227 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:54 verbose #26228 > > 00:41:54 verbose #26229 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:54 verbose #26230 > > //// test 00:41:54 verbose #26231 > > 00:41:54 verbose #26232 > > inl central_force f (particle_state st1) (particle_state st2) = 00:41:54 verbose #26233 > > inl r1 = st1.pos_vec 00:41:54 verbose #26234 > > inl r2 = st2.pos_vec 00:41:54 verbose #26235 > > inl r21 = r2 ^-^ r1 00:41:54 verbose #26236 > > inl r21mag = magnitude r21 00:41:54 verbose #26237 > > f r21mag *^ r21 ^/ r21mag 00:41:54 verbose #26238 > > 00:41:54 verbose #26239 > > inl billiard_force k re = 00:41:54 verbose #26240 > > inl f r = 00:41:54 verbose #26241 > > if r >= re 00:41:54 verbose #26242 > > then 0 00:41:54 verbose #26243 > > else -k * (r - re) 00:41:54 verbose #26244 > > central_force f 00:41:54 verbose #26245 > > 00:41:54 verbose #26246 > > type force_vector = vec 00:41:54 verbose #26247 > > type two_body_force = particle_state -> particle_state -> force_vector 00:41:54 verbose #26248 > > 00:41:54 verbose #26249 > > union force = 00:41:54 verbose #26250 > > | ExternalForce : i32 * one_body_force 00:41:54 verbose #26251 > > | InternalForce : i32 * i32 * two_body_force 00:41:54 verbose #26252 > > 00:41:54 verbose #26253 > > nominal multi_particle_state = list particle_state 00:41:54 verbose #26254 > > 00:41:54 verbose #26255 > > nominal d_multi_particle_state = list d_particle_state 00:41:54 verbose #26256 > > 00:41:54 verbose #26257 > > inl force_on n sts force = 00:41:54 verbose #26258 > > match force with 00:41:54 verbose #26259 > > | ExternalForce (n0, f_one_body) => 00:41:54 verbose #26260 > > if n = n0 00:41:54 verbose #26261 > > then f_one_body 00:41:54 verbose #26262 > > else fun _ => zero_vec () 00:41:54 verbose #26263 > > | InternalForce (n0, n1, f_two_body) => 00:41:54 verbose #26264 > > if n = n0 00:41:54 verbose #26265 > > then f_two_body (sts |> listm'.item n1) 00:41:54 verbose #26266 > > elif n = n1 00:41:54 verbose #26267 > > then f_two_body (sts |> listm'.item n0) 00:41:54 verbose #26268 > > else fun _ => zero_vec () 00:41:54 verbose #26269 > > 00:41:54 verbose #26270 > > inl forces_on n (multi_particle_state sts) fs = 00:41:54 verbose #26271 > > fs |> listm.map (force_on n sts) 00:41:54 verbose #26272 > > 00:41:54 verbose #26273 > > inl newton_second_mps fs (multi_particle_state sts) : d_multi_particle_state = 00:41:54 verbose #26274 > > inl deriv (n, st) = 00:41:54 verbose #26275 > > newton_second_ps (forces_on n (multi_particle_state sts) fs) st 00:41:54 verbose #26276 > > sts |> listm'.indexed |> listm.map deriv |> d_multi_particle_state 00:41:54 verbose #26277 > > 00:41:54 verbose #26278 > > instance (+++) d_multi_particle_state = fun (d_multi_particle_state dsts1) 00:41:54 verbose #26279 > > (d_multi_particle_state dsts2) => 00:41:54 verbose #26280 > > d_multi_particle_state (listm'.zip_with_ (+++) dsts1 dsts2) 00:41:54 verbose #26281 > > 00:41:54 verbose #26282 > > instance scale d_multi_particle_state = fun w (d_multi_particle_state dsts) => 00:41:54 verbose #26283 > > d_multi_particle_state (dsts |> listm.map (scale w)) 00:41:54 verbose #26284 > > 00:41:54 verbose #26285 > > instance shift multi_particle_state = fun dt dsts (multi_particle_state sts) => 00:41:54 verbose #26286 > > inl (d_multi_particle_state dsts) = 00:41:54 verbose #26287 > > real 00:41:54 verbose #26288 > > match dsts with 00:41:54 verbose #26289 > > | d_multi_particle_state _ => dsts 00:41:54 verbose #26290 > > listm'.zip_with_ (shift dt) dsts sts |> multi_particle_state 00:41:54 verbose #26291 > > 00:41:54 verbose #26292 > > inl euler_cromer_mps dt : numerical_method multi_particle_state 00:41:54 verbose #26293 > > d_multi_particle_state = 00:41:54 verbose #26294 > > fun deriv mpst0 => 00:41:54 verbose #26295 > > inl mpst1 = euler dt deriv mpst0 00:41:54 verbose #26296 > > inl (multi_particle_state sts0) = mpst0 00:41:54 verbose #26297 > > inl (multi_particle_state sts1) = mpst1 00:41:54 verbose #26298 > > sts1 00:41:54 verbose #26299 > > |> listm'.zip_ sts0 00:41:54 verbose #26300 > > |> listm.map (fun ((particle_state st0), (particle_state st1)) => 00:41:54 verbose #26301 > > particle_state { 00:41:54 verbose #26302 > > st1 with 00:41:54 verbose #26303 > > pos_vec = st0.pos_vec ^+^ st1.velocity ^* dt 00:41:54 verbose #26304 > > } 00:41:54 verbose #26305 > > ) 00:41:54 verbose #26306 > > |> multi_particle_state 00:41:54 verbose #26307 > > 00:41:54 verbose #26308 > > inl update_mps (method : numerical_method multi_particle_state 00:41:54 verbose #26309 > > d_multi_particle_state) = 00:41:54 verbose #26310 > > newton_second_mps >> method 00:41:54 verbose #26311 > > 00:41:54 verbose #26312 > > inl states_mps (method : numerical_method multi_particle_state 00:41:54 verbose #26313 > > d_multi_particle_state) = 00:41:54 verbose #26314 > > newton_second_mps >> method >> seq.iterate_ 00:41:54 verbose #26315 > > 00:41:54 verbose #26316 > > 00:41:54 verbose #26317 > > inl kinetic_energy (particle_state st) = 00:41:54 verbose #26318 > > inl m = st.mass 00:41:54 verbose #26319 > > inl v = magnitude st.velocity 00:41:54 verbose #26320 > > 0.5 * m * v ** 2 00:41:54 verbose #26321 > > 00:41:54 verbose #26322 > > inl system_ke (multi_particle_state sts) = 00:41:54 verbose #26323 > > sts |> listm.map kinetic_energy |> listm'.sum 00:41:54 verbose #26324 > > 00:41:54 verbose #26325 > > inl linear_spring_pe k re (particle_state st1) (particle_state st2) = 00:41:54 verbose #26326 > > inl r1 = st1.pos_vec 00:41:54 verbose #26327 > > inl r2 = st2.pos_vec 00:41:54 verbose #26328 > > inl r21 = r2 ^-^ r1 00:41:54 verbose #26329 > > inl r21mag = magnitude r21 00:41:54 verbose #26330 > > k * (r21mag - re) ** 2 / 2 00:41:54 verbose #26331 > > 00:41:54 verbose #26332 > > inl earth_surface_gravity_pe (particle_state st) = 00:41:54 verbose #26333 > > inl g = 9.80665 00:41:54 verbose #26334 > > inl m = st.mass 00:41:54 verbose #26335 > > inl z = st.pos_vec.z 00:41:54 verbose #26336 > > m * g * z 00:41:54 verbose #26337 > > 00:41:54 verbose #26338 > > inl two_springs_pe (multi_particle_state sts) = 00:41:54 verbose #26339 > > inl st0 = sts |> listm'.item 0i32 00:41:54 verbose #26340 > > inl st1 = sts |> listm'.item 1i32 00:41:54 verbose #26341 > > linear_spring_pe 100 0.5 (default_particle_state ()) st0 00:41:54 verbose #26342 > > + linear_spring_pe 100 0.5 st0 st1 00:41:54 verbose #26343 > > + earth_surface_gravity_pe st0 00:41:54 verbose #26344 > > + earth_surface_gravity_pe st1 00:41:54 verbose #26345 > > 00:41:54 verbose #26346 > > inl two_springs_me mpst = 00:41:54 verbose #26347 > > system_ke mpst + two_springs_pe mpst 00:41:54 verbose #26348 > > 00:41:54 verbose #26349 > > inl ball_radius () = 0.03 00:41:54 verbose #26350 > > 00:41:54 verbose #26351 > > inl billiard_forces k = 00:41:54 verbose #26352 > > [[ InternalForce (0, 1, billiard_force k (2 * ball_radius ())) ]] 00:41:54 verbose #26353 > > 00:41:54 verbose #26354 > > inl billiard_update n_method k dt = 00:41:54 verbose #26355 > > update_mps (n_method dt) (billiard_forces k) 00:41:54 verbose #26356 > > 00:41:54 verbose #26357 > > inl billiard_initial () = 00:41:54 verbose #26358 > > inl ball_mass = 0.160 00:41:54 verbose #26359 > > inl (particle_state default_particle_state') = default_particle_state () 00:41:54 verbose #26360 > > multi_particle_state [[ 00:41:54 verbose #26361 > > particle_state { 00:41:54 verbose #26362 > > default_particle_state' with 00:41:54 verbose #26363 > > mass = ball_mass 00:41:54 verbose #26364 > > pos_vec = zero_vec () 00:41:54 verbose #26365 > > velocity = 0.2 *^ i_hat () 00:41:54 verbose #26366 > > } 00:41:54 verbose #26367 > > particle_state { 00:41:54 verbose #26368 > > default_particle_state' with 00:41:54 verbose #26369 > > mass = ball_mass 00:41:54 verbose #26370 > > pos_vec = i_hat () ^+^ 0.02 *^ j_hat () 00:41:54 verbose #26371 > > velocity = zero_vec () 00:41:54 verbose #26372 > > } 00:41:54 verbose #26373 > > ]] 00:41:54 verbose #26374 > > 00:41:54 verbose #26375 > > inl billiard_states ~n_method k dt = 00:41:54 verbose #26376 > > states_mps (n_method dt) (billiard_forces k) (billiard_initial ()) 00:41:54 verbose #26377 > > 00:41:54 verbose #26378 > > inl billiard_states_finite n_method k dt = 00:41:54 verbose #26379 > > billiard_states n_method k dt 00:41:54 verbose #26380 > > >> Some 00:41:54 verbose #26381 > > |> seq.take_while_ (fun (multi_particle_state mpst) (_ : i32) => 00:41:54 verbose #26382 > > (mpst |> listm'.item 0i32).time <= 10 00:41:54 verbose #26383 > > ) 00:41:54 verbose #26384 > > 00:41:54 verbose #26385 > > inl momentum (particle_state st) = 00:41:54 verbose #26386 > > inl m = st.mass 00:41:54 verbose #26387 > > inl v = st.velocity 00:41:54 verbose #26388 > > m *^ v 00:41:54 verbose #26389 > > 00:41:54 verbose #26390 > > inl system_p (multi_particle_state sts) = 00:41:54 verbose #26391 > > sts |> listm.map momentum |> sum_vec 00:41:54 verbose #26392 > > 00:41:54 verbose #26393 > > 00:41:54 verbose #26394 > > inl time_ke_ec_x, time_ke_ec_y = 00:41:54 verbose #26395 > > billiard_states_finite euler_cromer_mps 30 0.03 00:41:54 verbose #26396 > > |> listm.map (fun (multi_particle_state mpst) => 00:41:54 verbose #26397 > > (mpst |> listm'.item 0i32).time, system_ke (multi_particle_state mpst) 00:41:54 verbose #26398 > > ) 00:41:54 verbose #26399 > > |> listm'.unzip 00:41:54 verbose #26400 > > 00:41:54 verbose #26401 > > inl time_ke_rk4_x, time_ke_rk4_y = 00:41:54 verbose #26402 > > billiard_states_finite runge_kutta_4 30 0.03 00:41:54 verbose #26403 > > |> listm.map (fun (multi_particle_state mpst) => 00:41:54 verbose #26404 > > (mpst |> listm'.item 0i32).time, system_ke (multi_particle_state mpst) 00:41:54 verbose #26405 > > ) 00:41:54 verbose #26406 > > |> listm'.unzip 00:41:54 verbose #26407 > > 00:41:54 verbose #26408 > > inl time_ke_ec_x = time_ke_ec_x |> listm'.box |> listm'.to_array' 00:41:54 verbose #26409 > > inl time_ke_ec_y = time_ke_ec_y |> listm'.box |> listm'.to_array' 00:41:54 verbose #26410 > > 00:41:54 verbose #26411 > > inl time_ke_rk4_x = time_ke_rk4_x |> listm'.box |> listm'.to_array' 00:41:54 verbose #26412 > > inl time_ke_rk4_y = time_ke_rk4_y |> listm'.box |> listm'.to_array' 00:41:54 verbose #26413 > > 00:41:54 verbose #26414 > > "system kinetic energy versus time", 00:41:54 verbose #26415 > > "time (s)", 00:41:54 verbose #26416 > > "system kinetic energy (j)", 00:41:54 verbose #26417 > > ;[[ 00:41:54 verbose #26418 > > "euler-cromer", time_ke_ec_x, time_ke_ec_y 00:41:54 verbose #26419 > > "runge-kutta 4", time_ke_rk4_x, time_ke_rk4_y 00:41:54 verbose #26420 > > ]] 00:41:56 verbose #26421 > > 00:41:56 verbose #26422 > > ╭─[ 1.60s - return value ]─────────────────────────────────────────────────────╮ 00:41:56 verbose #26423 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ 00:41:56 verbose #26424 > > │ xmlns="http://www.w3.org/2000/svg"> │ 00:41:56 verbose #26425 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ 00:41:56 verbose #26426 > > │ stroke="none"/> │ 00:41:56 verbose #26427 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ 00:41:56 verbose #26428 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:56 verbose #26429 > > │ fill="#FFFFFF"> │ 00:41:56 verbose #26430 > > │ system kinetic energy versus time │ 00:41:56 verbose #26431 > > │ </text> │ 00:41:56 verbose #26432 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │ 00:41:56 verbose #26433 > > │ y2="75"/> │ 00:41:56 verbose #26434 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ 00:41:56 verbose #26435 > > │ y2="75"/> │ 00:41:56 verbose #26436 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │ 00:41:56 verbose #26437 > > │ y2="75"/> │ 00:41:56 verbose #26438 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │ 00:41:56 verbose #26439 > > │ y2="75"/> │ 00:41:56 verbose #26440 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │ 00:41:56 verbose #26441 > > │ y2="75"/> │ 00:41:56 verbose #26442 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │ 00:41:56 verbose #26443 > > │ x2="109" y2="75"/> │ 00:41:56 verbose #26444 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ 00:41:56 verbose #26445 > > │ x2="119" y2="75"/> │ 00:41:56 verbose #26446 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ 00:41:56 verbose #26447 > > │ x2="129" y2="75"/> │ 00:41:56 verbose #26448 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ 00:41:56 verbose #26449 > > │ x2="139" y2="75"/> │ 00:41:56 verbose #26450 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │ 00:41:56 verbose #26451 > > │ x2="149" y2="75"/> │ 00:41:56 verbose #26452 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │ 00:41:56 verbose #26453 > > │ x2="159" y2="75"/> │ 00:41:56 verbose #26454 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ 00:41:56 verbose #26455 > > │ x2="169" y2="75"/> │ 00:41:56 verbose #26456 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │ 00:41:56 verbose #26457 > > │ x2="179" y2="75"/> │ 00:41:56 verbose #26458 > > │ ...,104 404,104 405,104 407,104 408,104 410,104 411,104 413,104 414,104 │ 00:41:56 verbose #26459 > > │ 416,104 417,104 419,104 420,104 422,104 423,104 425,104 426,104 428,104 │ 00:41:56 verbose #26460 > > │ 429,104 431,104 432,104 434,104 435,104 437,104 438,104 440,104 441,104 │ 00:41:56 verbose #26461 > > │ 443,104 444,104 446,104 447,104 449,104 450,104 452,104 453,104 455,104 │ 00:41:56 verbose #26462 > > │ 456,104 458,104 459,104 461,104 462,104 464,104 465,104 467,104 468,104 │ 00:41:56 verbose #26463 > > │ 470,104 471,104 473,104 474,104 476,104 477,104 479,104 480,104 482,104 │ 00:41:56 verbose #26464 > > │ 483,104 485,104 486,104 488,104 489,104 491,104 492,104 494,104 495,104 │ 00:41:56 verbose #26465 > > │ 497,104 498,104 500,104 501,104 503,104 504,104 506,104 507,104 509,104 │ 00:41:56 verbose #26466 > > │ 510,104 512,104 513,104 515,104 516,104 518,104 519,104 521,104 522,104 │ 00:41:56 verbose #26467 > > │ 524,104 525,104 527,104 528,104 530,104 531,104 533,104 534,104 536,104 │ 00:41:56 verbose #26468 > > │ 537,104 539,104 540,104 542,104 543,104 545,104 546,104 548,104 549,104 │ 00:41:56 verbose #26469 > > │ 551,104 552,104 554,104 555,104 557,104 558,104 560,104 561,104 563,104 │ 00:41:56 verbose #26470 > > │ 564,104 566,104 567,104 569,104 "/> │ 00:41:56 verbose #26471 > > │ <rect x="459" y="227" width="121" height="45" opacity="1" fill="none" │ 00:41:56 verbose #26472 > > │ stroke="#FFFFFF"/> │ 00:41:56 verbose #26473 > > │ <text x="499" y="237" dy="0.76em" text-anchor="start" │ 00:41:56 verbose #26474 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:56 verbose #26475 > > │ fill="#FFFFFF"> │ 00:41:56 verbose #26476 > > │ euler-cromer │ 00:41:56 verbose #26477 > > │ </text> │ 00:41:56 verbose #26478 > > │ <text x="499" y="252" dy="0.76em" text-anchor="start" │ 00:41:56 verbose #26479 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:56 verbose #26480 > > │ fill="#FFFFFF"> │ 00:41:56 verbose #26481 > > │ runge-kutta 4 │ 00:41:56 verbose #26482 > > │ </text> │ 00:41:56 verbose #26483 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:41:56 verbose #26484 > > │ points="469,242 489,242 "/> │ 00:41:56 verbose #26485 > > │ <polyline fill="none" opacity="1" stroke="#0000FF" stroke-width="1" │ 00:41:56 verbose #26486 > > │ points="469,257 489,257 "/> │ 00:41:56 verbose #26487 > > │ </svg> │ 00:41:56 verbose #26488 > > │ │ 00:41:56 verbose #26489 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:56 verbose #26490 > > 00:41:56 verbose #26491 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:56 verbose #26492 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:56 verbose #26493 > > │ #### wave 1 │ 00:41:56 verbose #26494 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:56 verbose #26495 > > 00:41:56 verbose #26496 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:56 verbose #26497 > > //// test 00:41:56 verbose #26498 > > 00:41:56 verbose #26499 > > inl linear_spring k re (particle_state st1) (particle_state st2) = 00:41:56 verbose #26500 > > inl r1 = st1.pos_vec 00:41:56 verbose #26501 > > inl r2 = st2.pos_vec 00:41:56 verbose #26502 > > inl r21 = r2 ^-^ r1 00:41:56 verbose #26503 > > inl r21mag = magnitude r21 00:41:56 verbose #26504 > > -k * (r21mag - re) *^ r21 ^/ r21mag 00:41:56 verbose #26505 > > 00:41:56 verbose #26506 > > inl fixed_linear_spring k re r1 = 00:41:56 verbose #26507 > > inl (particle_state default_particle_state') = default_particle_state () 00:41:56 verbose #26508 > > linear_spring k re (particle_state { default_particle_state' with pos_vec = 00:41:56 verbose #26509 > > r1 }) 00:41:56 verbose #26510 > > 00:41:56 verbose #26511 > > inl forces_string () = 00:41:56 verbose #26512 > > [[ 00:41:56 verbose #26513 > > ExternalForce (0, fixed_linear_spring 5384 0 (zero_vec ())) 00:41:56 verbose #26514 > > ExternalForce (63, fixed_linear_spring 5384 0 (0.65 *^ i_hat ())) 00:41:56 verbose #26515 > > ]] ++ ( 00:41:56 verbose #26516 > > listm'.init_series 0 59 1 00:41:56 verbose #26517 > > |> listm.map (fun n => InternalForce (n, n + 1, linear_spring 5384 0)) 00:41:56 verbose #26518 > > ) 00:41:56 verbose #26519 > > 00:41:56 verbose #26520 > > inl string_update dt = 00:41:56 verbose #26521 > > update_mps (runge_kutta_4 dt) (forces_string ()) 00:41:56 verbose #26522 > > 00:41:56 verbose #26523 > > inl string_initial_overtone n = 00:41:56 verbose #26524 > > inl ball_mass = 0.0008293 * 0.65 / 64 00:41:56 verbose #26525 > > inl (particle_state default_particle_state') = default_particle_state () 00:41:56 verbose #26526 > > listm'.init_series 0.01 0.64 0.01 00:41:56 verbose #26527 > > |> listm.map (fun x => 00:41:56 verbose #26528 > > inl y = 0.005 * sin (conv n * pi * x / 0.65) 00:41:56 verbose #26529 > > particle_state { 00:41:56 verbose #26530 > > default_particle_state' with 00:41:56 verbose #26531 > > mass = ball_mass 00:41:56 verbose #26532 > > pos_vec = x *^ i_hat () ^+^ y *^ j_hat () 00:41:56 verbose #26533 > > velocity = zero_vec () 00:41:56 verbose #26534 > > } 00:41:56 verbose #26535 > > ) 00:41:56 verbose #26536 > > |> multi_particle_state 00:41:56 verbose #26537 > > 00:41:56 verbose #26538 > > inl string_initial_pluck () = 00:41:56 verbose #26539 > > inl ball_mass = 0.0008293 * 0.65 / 64 00:41:56 verbose #26540 > > inl (particle_state default_particle_state') = default_particle_state () 00:41:56 verbose #26541 > > listm'.init_series 0.01 0.64 0.01 00:41:56 verbose #26542 > > |> listm.map (fun x => 00:41:56 verbose #26543 > > inl y = 00:41:56 verbose #26544 > > inl n = if x <= 0.51 then 0 else 0.65 00:41:56 verbose #26545 > > 0.005 / (0.51 - n) * (x - n) 00:41:56 verbose #26546 > > particle_state { 00:41:56 verbose #26547 > > default_particle_state' with 00:41:56 verbose #26548 > > mass = ball_mass 00:41:56 verbose #26549 > > pos_vec = x *^ i_hat () ^+^ y *^ j_hat () 00:41:56 verbose #26550 > > velocity = zero_vec () 00:41:56 verbose #26551 > > } 00:41:56 verbose #26552 > > ) 00:41:56 verbose #26553 > > |> multi_particle_state 00:41:56 verbose #26554 > > 00:41:56 verbose #26555 > > let main () = 00:41:56 verbose #26556 > > inl ~frames = listm'.init_series 0 9 1f64 00:41:56 verbose #26557 > > inl initial_state = string_initial_overtone 3i32 00:41:56 verbose #26558 > > inl frames = 00:41:56 verbose #26559 > > frames 00:41:56 verbose #26560 > > |> listm.map (fun n => 00:41:56 verbose #26561 > > inl (multi_particle_state sts) = 00:41:56 verbose #26562 > > seq.iterate' (string_update 0.000025) initial_state |> fun f => 00:41:56 verbose #26563 > > f 0f64 00:41:56 verbose #26564 > > inl rs = 00:41:56 verbose #26565 > > [[ zero_vec () ]] 00:41:56 verbose #26566 > > ++ (sts |> listm.map (fun (particle_state st) => st.pos_vec)) 00:41:56 verbose #26567 > > ++ [[ 0.65 *^ i_hat () ]] 00:41:56 verbose #26568 > > inl x, y = 00:41:56 verbose #26569 > > rs 00:41:56 verbose #26570 > > |> listm.map (fun r => r.x, r.y) 00:41:56 verbose #26571 > > |> listm'.unzip 00:41:56 verbose #26572 > > inl x = x |> listm'.box |> listm'.to_array' 00:41:56 verbose #26573 > > inl y = y |> listm'.box |> listm'.to_array' 00:41:56 verbose #26574 > > x, y 00:41:56 verbose #26575 > > ) 00:41:56 verbose #26576 > > |> listm'.box |> listm'.to_array' 00:41:56 verbose #26577 > > 00:41:56 verbose #26578 > > inl n = 0i32 00:41:56 verbose #26579 > > 00:41:56 verbose #26580 > > inl x, y = a frames |> am'.index n 00:41:56 verbose #26581 > > 00:41:56 verbose #26582 > > "wave", 00:41:56 verbose #26583 > > "position (m)", 00:41:56 verbose #26584 > > "displacement (m)", 00:41:56 verbose #26585 > > ;[[ 00:41:56 verbose #26586 > > ($'$"{!n}"' : string), x, y 00:41:56 verbose #26587 > > ]] 00:41:56 verbose #26588 > > 00:41:56 verbose #26589 > > ╭─[ 840.87ms - return value ]──────────────────────────────────────────────────╮ 00:41:56 verbose #26590 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ 00:41:56 verbose #26591 > > │ xmlns="http://www.w3.org/2000/svg"> │ 00:41:56 verbose #26592 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ 00:41:56 verbose #26593 > > │ stroke="none"/> │ 00:41:56 verbose #26594 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ 00:41:56 verbose #26595 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:56 verbose #26596 > > │ fill="#FFFFFF"> │ 00:41:56 verbose #26597 > > │ wave │ 00:41:56 verbose #26598 > > │ </text> │ 00:41:56 verbose #26599 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="62" y1="424" x2="62" │ 00:41:56 verbose #26600 > > │ y2="75"/> │ 00:41:56 verbose #26601 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ 00:41:56 verbose #26602 > > │ y2="75"/> │ 00:41:56 verbose #26603 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="77" y1="424" x2="77" │ 00:41:56 verbose #26604 > > │ y2="75"/> │ 00:41:56 verbose #26605 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="85" y1="424" x2="85" │ 00:41:56 verbose #26606 > > │ y2="75"/> │ 00:41:56 verbose #26607 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="93" y1="424" x2="93" │ 00:41:56 verbose #26608 > > │ y2="75"/> │ 00:41:56 verbose #26609 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="100" y1="424" │ 00:41:56 verbose #26610 > > │ x2="100" y2="75"/> │ 00:41:56 verbose #26611 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="108" y1="424" │ 00:41:56 verbose #26612 > > │ x2="108" y2="75"/> │ 00:41:56 verbose #26613 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="116" y1="424" │ 00:41:56 verbose #26614 > > │ x2="116" y2="75"/> │ 00:41:56 verbose #26615 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="123" y1="424" │ 00:41:56 verbose #26616 > > │ x2="123" y2="75"/> │ 00:41:56 verbose #26617 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="131" y1="424" │ 00:41:56 verbose #26618 > > │ x2="131" y2="75"/> │ 00:41:56 verbose #26619 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ 00:41:56 verbose #26620 > > │ x2="139" y2="75"/> │ 00:41:56 verbose #26621 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="146" y1="424" │ 00:41:56 verbose #26622 > > │ x2="146" y2="75"/> │ 00:41:56 verbose #26623 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="154" y1="424" │ 00:41:56 verbose #26624 > > │ x2="154" y2="75"/> │ 00:41:56 verbose #26625 > > │ <line opacity="1" stroke="#32...ne fill="none" opacity="1" stroke="#FFFFFF" │ 00:41:56 verbose #26626 > > │ stroke-width="1" points="585,250 590,250 "/> │ 00:41:56 verbose #26627 > > │ <text x="617" y="184" dy="0.5ex" text-anchor="end" font-family="sans-serif" │ 00:41:56 verbose #26628 > > │ font-size="9.67741935483871" opacity="1" fill="#FFFFFF"> │ 00:41:56 verbose #26629 > > │ 0.0 │ 00:41:56 verbose #26630 > > │ </text> │ 00:41:56 verbose #26631 > > │ <polyline fill="none" opacity="1" stroke="#FFFFFF" stroke-width="1" │ 00:41:56 verbose #26632 > > │ points="585,184 590,184 "/> │ 00:41:56 verbose #26633 > > │ <text x="617" y="118" dy="0.5ex" text-anchor="end" font-family="sans-serif" │ 00:41:56 verbose #26634 > > │ font-size="9.67741935483871" opacity="1" fill="#FFFFFF"> │ 00:41:56 verbose #26635 > > │ 0.0 │ 00:41:56 verbose #26636 > > │ </text> │ 00:41:56 verbose #26637 > > │ <polyline fill="none" opacity="1" stroke="#FFFFFF" stroke-width="1" │ 00:41:56 verbose #26638 > > │ points="585,118 590,118 "/> │ 00:41:56 verbose #26639 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:41:56 verbose #26640 > > │ points="69,250 77,226 85,203 93,181 100,160 108,141 116,124 123,110 131,99 │ 00:41:56 verbose #26641 > > │ 139,91 146,87 154,85 162,88 169,93 177,102 185,115 192,129 200,147 208,167 │ 00:41:56 verbose #26642 > > │ 215,188 223,211 231,234 238,258 246,282 254,305 261,327 269,347 277,365 │ 00:41:56 verbose #26643 > > │ 284,381 292,394 300,404 307,411 315,415 323,415 331,411 338,404 346,394 │ 00:41:56 verbose #26644 > > │ 354,381 361,365 369,347 377,327 384,305 392,282 400,258 407,234 415,211 │ 00:41:56 verbose #26645 > > │ 423,188 430,167 438,147 446,129 453,115 461,102 469,93 476,88 484,85 492,87 │ 00:41:56 verbose #26646 > > │ 499,91 507,99 515,110 522,124 530,141 538,160 545,181 553,203 561,226 │ 00:41:56 verbose #26647 > > │ 569,250 "/> │ 00:41:56 verbose #26648 > > │ <rect x="525" y="235" width="55" height="30" opacity="1" fill="none" │ 00:41:56 verbose #26649 > > │ stroke="#FFFFFF"/> │ 00:41:56 verbose #26650 > > │ <text x="565" y="245" dy="0.76em" text-anchor="start" │ 00:41:56 verbose #26651 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:56 verbose #26652 > > │ fill="#FFFFFF"> │ 00:41:56 verbose #26653 > > │ 0 │ 00:41:56 verbose #26654 > > │ </text> │ 00:41:56 verbose #26655 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:41:56 verbose #26656 > > │ points="535,250 555,250 "/> │ 00:41:56 verbose #26657 > > │ </svg> │ 00:41:56 verbose #26658 > > │ │ 00:41:56 verbose #26659 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:56 verbose #26660 > > 00:41:56 verbose #26661 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:56 verbose #26662 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:56 verbose #26663 > > │ #### system kinetic energy versus time 2 │ 00:41:56 verbose #26664 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:56 verbose #26665 > > 00:41:56 verbose #26666 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:56 verbose #26667 > > //// test 00:41:56 verbose #26668 > > 00:41:56 verbose #26669 > > inl central_force f (particle_state st1) (particle_state st2) = 00:41:56 verbose #26670 > > inl r1 = st1.pos_vec 00:41:56 verbose #26671 > > inl r2 = st2.pos_vec 00:41:56 verbose #26672 > > inl r21 = r2 ^-^ r1 00:41:56 verbose #26673 > > inl r21mag = magnitude r21 00:41:56 verbose #26674 > > f r21mag *^ r21 ^/ r21mag 00:41:56 verbose #26675 > > 00:41:56 verbose #26676 > > inl billiard_force k re = 00:41:56 verbose #26677 > > inl f r = 00:41:56 verbose #26678 > > if r >= re 00:41:56 verbose #26679 > > then 0 00:41:56 verbose #26680 > > else -k * (r - re) 00:41:56 verbose #26681 > > central_force f 00:41:56 verbose #26682 > > 00:41:56 verbose #26683 > > type force_vector = vec 00:41:56 verbose #26684 > > type two_body_force = particle_state -> particle_state -> force_vector 00:41:56 verbose #26685 > > 00:41:56 verbose #26686 > > union force t = 00:41:56 verbose #26687 > > | ExternalForce : t * one_body_force 00:41:56 verbose #26688 > > | InternalForce : t * t * two_body_force 00:41:56 verbose #26689 > > 00:41:56 verbose #26690 > > nominal multi_particle_state = stream.stream particle_state 00:41:56 verbose #26691 > > 00:41:56 verbose #26692 > > nominal d_multi_particle_state = stream.stream d_particle_state 00:41:56 verbose #26693 > > 00:41:56 verbose #26694 > > inl force_on n s force = 00:41:56 verbose #26695 > > match force with 00:41:56 verbose #26696 > > | ExternalForce (n0, f_one_body) => 00:41:56 verbose #26697 > > if n = n0 00:41:56 verbose #26698 > > then f_one_body 00:41:56 verbose #26699 > > else fun _ => zero_vec () 00:41:56 verbose #26700 > > | InternalForce (n0, n1, f_two_body) => 00:41:56 verbose #26701 > > if n = n0 00:41:56 verbose #26702 > > then s |> stream.try_item n1 |> optionm.map f_two_body 00:41:56 verbose #26703 > > elif n = n1 00:41:56 verbose #26704 > > then s |> stream.try_item n0 |> optionm.map f_two_body 00:41:56 verbose #26705 > > else None 00:41:56 verbose #26706 > > |> optionm'.default_value (fun _ => zero_vec ()) 00:41:56 verbose #26707 > > 00:41:56 verbose #26708 > > inl forces_on n (multi_particle_state sts) fs = 00:41:56 verbose #26709 > > fs 00:41:56 verbose #26710 > > |> listm.map (force_on n sts) 00:41:56 verbose #26711 > > 00:41:56 verbose #26712 > > inl newton_second_mps fs ((multi_particle_state sts) as mpst) = 00:41:56 verbose #26713 > > inl deriv (n, st) = 00:41:56 verbose #26714 > > newton_second_ps (forces_on n mpst fs) st 00:41:56 verbose #26715 > > sts |> stream.indexed |> stream.map deriv |> d_multi_particle_state 00:41:56 verbose #26716 > > 00:41:56 verbose #26717 > > instance (+++) d_multi_particle_state = 00:41:56 verbose #26718 > > fun (d_multi_particle_state dsts1) (d_multi_particle_state dsts2) => 00:41:56 verbose #26719 > > (dsts1, dsts2) 00:41:56 verbose #26720 > > ||> stream.zip_with (+++) 00:41:56 verbose #26721 > > |> d_multi_particle_state 00:41:56 verbose #26722 > > 00:41:56 verbose #26723 > > instance scale d_multi_particle_state = fun w (d_multi_particle_state dsts) => 00:41:56 verbose #26724 > > dsts 00:41:56 verbose #26725 > > |> stream.map (scale w) 00:41:56 verbose #26726 > > |> d_multi_particle_state 00:41:56 verbose #26727 > > 00:41:56 verbose #26728 > > instance shift multi_particle_state = fun dt dsts (multi_particle_state sts) => 00:41:56 verbose #26729 > > inl (d_multi_particle_state dsts) = 00:41:56 verbose #26730 > > real 00:41:56 verbose #26731 > > match dsts with 00:41:56 verbose #26732 > > | d_multi_particle_state _ => dsts 00:41:56 verbose #26733 > > (dsts, sts) 00:41:56 verbose #26734 > > ||> stream.zip_with (shift dt) 00:41:56 verbose #26735 > > |> stream.memoize 00:41:56 verbose #26736 > > |> fun x => x () 00:41:56 verbose #26737 > > |> multi_particle_state 00:41:56 verbose #26738 > > 00:41:56 verbose #26739 > > inl euler_cromer_mps dt : numerical_method multi_particle_state 00:41:56 verbose #26740 > > d_multi_particle_state = 00:41:56 verbose #26741 > > fun deriv ((multi_particle_state sts0) as mpst0) => 00:41:56 verbose #26742 > > inl (multi_particle_state sts1) = euler dt deriv mpst0 00:41:56 verbose #26743 > > (sts0, sts1) 00:41:56 verbose #26744 > > ||> stream.zip 00:41:56 verbose #26745 > > |> stream.map (fun ((particle_state st0), (particle_state st1)) => 00:41:56 verbose #26746 > > particle_state { 00:41:56 verbose #26747 > > st1 with 00:41:56 verbose #26748 > > pos_vec = st0.pos_vec ^+^ st1.velocity ^* dt 00:41:56 verbose #26749 > > } 00:41:56 verbose #26750 > > ) 00:41:56 verbose #26751 > > |> multi_particle_state 00:41:56 verbose #26752 > > 00:41:56 verbose #26753 > > inl update_mps (method : numerical_method multi_particle_state 00:41:56 verbose #26754 > > d_multi_particle_state) = 00:41:56 verbose #26755 > > newton_second_mps >> method 00:41:56 verbose #26756 > > 00:41:56 verbose #26757 > > inl states_mps (method : numerical_method multi_particle_state 00:41:56 verbose #26758 > > d_multi_particle_state) = 00:41:56 verbose #26759 > > newton_second_mps 00:41:56 verbose #26760 > > >> method 00:41:56 verbose #26761 > > >> (fun x (multi_particle_state y) => 00:41:56 verbose #26762 > > y 00:41:56 verbose #26763 > > |> stream.memoize 00:41:56 verbose #26764 > > |> (fun x => x ()) 00:41:56 verbose #26765 > > |> multi_particle_state |> x 00:41:56 verbose #26766 > > ) 00:41:56 verbose #26767 > > // >> stream.iterate 00:41:56 verbose #26768 > > >> seq.iterate' 00:41:56 verbose #26769 > > 00:41:56 verbose #26770 > > inl kinetic_energy (particle_state st) = 00:41:56 verbose #26771 > > inl m = st.mass 00:41:56 verbose #26772 > > inl v = magnitude st.velocity 00:41:56 verbose #26773 > > 0.5 * m * v ** 2 00:41:56 verbose #26774 > > 00:41:56 verbose #26775 > > inl system_ke (multi_particle_state sts) = 00:41:56 verbose #26776 > > sts 00:41:56 verbose #26777 > > |> stream.map kinetic_energy 00:41:56 verbose #26778 > > |> stream.sum 00:41:56 verbose #26779 > > 00:41:56 verbose #26780 > > inl linear_spring_pe k re (particle_state st1) (particle_state st2) = 00:41:56 verbose #26781 > > inl r1 = st1.pos_vec 00:41:56 verbose #26782 > > inl r2 = st2.pos_vec 00:41:56 verbose #26783 > > inl r21 = r2 ^-^ r1 00:41:56 verbose #26784 > > inl r21mag = magnitude r21 00:41:56 verbose #26785 > > k * (r21mag - re) ** 2 / 2 00:41:56 verbose #26786 > > 00:41:56 verbose #26787 > > inl earth_surface_gravity_pe (particle_state st) = 00:41:56 verbose #26788 > > inl g = 9.80665 00:41:56 verbose #26789 > > inl m = st.mass 00:41:56 verbose #26790 > > inl z = st.pos_vec.z 00:41:56 verbose #26791 > > m * g * z 00:41:56 verbose #26792 > > 00:41:56 verbose #26793 > > inl ball_radius () = 0.03 00:41:56 verbose #26794 > > 00:41:56 verbose #26795 > > inl billiard_forces k = 00:41:56 verbose #26796 > > [[ InternalForce (0i32, 1, billiard_force k (2 * ball_radius ())) ]] 00:41:56 verbose #26797 > > 00:41:56 verbose #26798 > > inl billiard_initial () = 00:41:56 verbose #26799 > > inl ball_mass = 0.160 00:41:56 verbose #26800 > > inl (particle_state default_particle_state') = default_particle_state () 00:41:56 verbose #26801 > > [[ 00:41:56 verbose #26802 > > particle_state { 00:41:56 verbose #26803 > > default_particle_state' with 00:41:56 verbose #26804 > > mass = ball_mass 00:41:56 verbose #26805 > > pos_vec = zero_vec () 00:41:56 verbose #26806 > > velocity = 0.2 *^ i_hat () 00:41:56 verbose #26807 > > } 00:41:56 verbose #26808 > > particle_state { 00:41:56 verbose #26809 > > default_particle_state' with 00:41:56 verbose #26810 > > mass = ball_mass 00:41:56 verbose #26811 > > pos_vec = i_hat () ^+^ 0.02 *^ j_hat () 00:41:56 verbose #26812 > > velocity = zero_vec () 00:41:56 verbose #26813 > > } 00:41:56 verbose #26814 > > ]] 00:41:56 verbose #26815 > > |> stream.from_list 00:41:56 verbose #26816 > > |> multi_particle_state 00:41:56 verbose #26817 > > 00:41:56 verbose #26818 > > inl billiard_states ~n_method k dt = 00:41:56 verbose #26819 > > states_mps (n_method dt) (billiard_forces k) (billiard_initial ()) 00:41:56 verbose #26820 > > 00:41:56 verbose #26821 > > inl billiard_states_finite n_method k dt = 00:41:56 verbose #26822 > > billiard_states n_method k dt 00:41:56 verbose #26823 > > >> Some 00:41:56 verbose #26824 > > |> seq.take_while_ (fun (multi_particle_state mpst) (_ : i32) => 00:41:56 verbose #26825 > > match mpst |> stream.try_item 0i32 with 00:41:56 verbose #26826 > > | Some st => 00:41:56 verbose #26827 > > st.time <= 10 00:41:56 verbose #26828 > > | None => false 00:41:56 verbose #26829 > > ) 00:41:56 verbose #26830 > > 00:41:56 verbose #26831 > > inl momentum (particle_state st) = 00:41:56 verbose #26832 > > inl m = st.mass 00:41:56 verbose #26833 > > inl v = st.velocity 00:41:56 verbose #26834 > > m *^ v 00:41:56 verbose #26835 > > 00:41:56 verbose #26836 > > inl system_p (multi_particle_state sts) = 00:41:56 verbose #26837 > > sts 00:41:56 verbose #26838 > > |> stream.map momentum 00:41:56 verbose #26839 > > |> stream.fold (^+^) (zero_vec ()) 00:41:56 verbose #26840 > > 00:41:56 verbose #26841 > > inl time_ke_ec_x, time_ke_ec_y = 00:41:56 verbose #26842 > > billiard_states_finite euler_cromer_mps 30 0.03 00:41:56 verbose #26843 > > |> listm.map (fun (multi_particle_state mpst) => 00:41:56 verbose #26844 > > mpst |> stream.try_item 0i32 00:41:56 verbose #26845 > > |> optionm.map (fun st => 00:41:56 verbose #26846 > > st.time, system_ke (multi_particle_state mpst) 00:41:56 verbose #26847 > > ) 00:41:56 verbose #26848 > > ) 00:41:56 verbose #26849 > > // |> stream.to_list 00:41:56 verbose #26850 > > |> listm'.choose id 00:41:56 verbose #26851 > > |> listm'.unzip 00:41:56 verbose #26852 > > 00:41:56 verbose #26853 > > inl time_ke_rk4_x, time_ke_rk4_y = 00:41:56 verbose #26854 > > billiard_states_finite runge_kutta_4 30 0.03 00:41:56 verbose #26855 > > |> listm.map (fun (multi_particle_state mpst) => 00:41:56 verbose #26856 > > mpst |> stream.try_item 0i32 00:41:56 verbose #26857 > > |> optionm.map (fun st => 00:41:56 verbose #26858 > > st.time, system_ke (multi_particle_state mpst) 00:41:56 verbose #26859 > > ) 00:41:56 verbose #26860 > > ) 00:41:56 verbose #26861 > > // |> stream.to_list 00:41:56 verbose #26862 > > |> listm'.choose id 00:41:56 verbose #26863 > > |> listm'.unzip 00:41:56 verbose #26864 > > 00:41:56 verbose #26865 > > inl time_ke_ec_x = time_ke_ec_x |> listm'.box |> listm'.to_array' 00:41:56 verbose #26866 > > inl time_ke_ec_y = time_ke_ec_y |> listm'.box |> listm'.to_array' 00:41:56 verbose #26867 > > 00:41:56 verbose #26868 > > inl time_ke_rk4_x = time_ke_rk4_x |> listm'.box |> listm'.to_array' 00:41:56 verbose #26869 > > inl time_ke_rk4_y = time_ke_rk4_y |> listm'.box |> listm'.to_array' 00:41:56 verbose #26870 > > 00:41:56 verbose #26871 > > "system kinetic energy versus time", 00:41:56 verbose #26872 > > "time (s)", 00:41:56 verbose #26873 > > "system kinetic energy (j)", 00:41:56 verbose #26874 > > ;[[ 00:41:56 verbose #26875 > > "euler-cromer", time_ke_ec_x, time_ke_ec_y 00:41:56 verbose #26876 > > "runge-kutta 4", time_ke_rk4_x, time_ke_rk4_y 00:41:56 verbose #26877 > > ]] 00:41:59 verbose #26878 > > 00:41:59 verbose #26879 > > ╭─[ 2.12s - return value ]─────────────────────────────────────────────────────╮ 00:41:59 verbose #26880 > > │ <svg width="640" height="480" viewBox="0 0 640 480" │ 00:41:59 verbose #26881 > > │ xmlns="http://www.w3.org/2000/svg"> │ 00:41:59 verbose #26882 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ 00:41:59 verbose #26883 > > │ stroke="none"/> │ 00:41:59 verbose #26884 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ 00:41:59 verbose #26885 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:59 verbose #26886 > > │ fill="#FFFFFF"> │ 00:41:59 verbose #26887 > > │ system kinetic energy versus time │ 00:41:59 verbose #26888 > > │ </text> │ 00:41:59 verbose #26889 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │ 00:41:59 verbose #26890 > > │ y2="75"/> │ 00:41:59 verbose #26891 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ 00:41:59 verbose #26892 > > │ y2="75"/> │ 00:41:59 verbose #26893 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │ 00:41:59 verbose #26894 > > │ y2="75"/> │ 00:41:59 verbose #26895 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │ 00:41:59 verbose #26896 > > │ y2="75"/> │ 00:41:59 verbose #26897 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │ 00:41:59 verbose #26898 > > │ y2="75"/> │ 00:41:59 verbose #26899 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │ 00:41:59 verbose #26900 > > │ x2="109" y2="75"/> │ 00:41:59 verbose #26901 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │ 00:41:59 verbose #26902 > > │ x2="119" y2="75"/> │ 00:41:59 verbose #26903 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │ 00:41:59 verbose #26904 > > │ x2="129" y2="75"/> │ 00:41:59 verbose #26905 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ 00:41:59 verbose #26906 > > │ x2="139" y2="75"/> │ 00:41:59 verbose #26907 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │ 00:41:59 verbose #26908 > > │ x2="149" y2="75"/> │ 00:41:59 verbose #26909 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │ 00:41:59 verbose #26910 > > │ x2="159" y2="75"/> │ 00:41:59 verbose #26911 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │ 00:41:59 verbose #26912 > > │ x2="169" y2="75"/> │ 00:41:59 verbose #26913 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │ 00:41:59 verbose #26914 > > │ x2="179" y2="75"/> │ 00:41:59 verbose #26915 > > │ ...,104 404,104 405,104 407,104 408,104 410,104 411,104 413,104 414,104 │ 00:41:59 verbose #26916 > > │ 416,104 417,104 419,104 420,104 422,104 423,104 425,104 426,104 428,104 │ 00:41:59 verbose #26917 > > │ 429,104 431,104 432,104 434,104 435,104 437,104 438,104 440,104 441,104 │ 00:41:59 verbose #26918 > > │ 443,104 444,104 446,104 447,104 449,104 450,104 452,104 453,104 455,104 │ 00:41:59 verbose #26919 > > │ 456,104 458,104 459,104 461,104 462,104 464,104 465,104 467,104 468,104 │ 00:41:59 verbose #26920 > > │ 470,104 471,104 473,104 474,104 476,104 477,104 479,104 480,104 482,104 │ 00:41:59 verbose #26921 > > │ 483,104 485,104 486,104 488,104 489,104 491,104 492,104 494,104 495,104 │ 00:41:59 verbose #26922 > > │ 497,104 498,104 500,104 501,104 503,104 504,104 506,104 507,104 509,104 │ 00:41:59 verbose #26923 > > │ 510,104 512,104 513,104 515,104 516,104 518,104 519,104 521,104 522,104 │ 00:41:59 verbose #26924 > > │ 524,104 525,104 527,104 528,104 530,104 531,104 533,104 534,104 536,104 │ 00:41:59 verbose #26925 > > │ 537,104 539,104 540,104 542,104 543,104 545,104 546,104 548,104 549,104 │ 00:41:59 verbose #26926 > > │ 551,104 552,104 554,104 555,104 557,104 558,104 560,104 561,104 563,104 │ 00:41:59 verbose #26927 > > │ 564,104 566,104 567,104 569,104 "/> │ 00:41:59 verbose #26928 > > │ <rect x="459" y="227" width="121" height="45" opacity="1" fill="none" │ 00:41:59 verbose #26929 > > │ stroke="#FFFFFF"/> │ 00:41:59 verbose #26930 > > │ <text x="499" y="237" dy="0.76em" text-anchor="start" │ 00:41:59 verbose #26931 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:59 verbose #26932 > > │ fill="#FFFFFF"> │ 00:41:59 verbose #26933 > > │ euler-cromer │ 00:41:59 verbose #26934 > > │ </text> │ 00:41:59 verbose #26935 > > │ <text x="499" y="252" dy="0.76em" text-anchor="start" │ 00:41:59 verbose #26936 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:41:59 verbose #26937 > > │ fill="#FFFFFF"> │ 00:41:59 verbose #26938 > > │ runge-kutta 4 │ 00:41:59 verbose #26939 > > │ </text> │ 00:41:59 verbose #26940 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:41:59 verbose #26941 > > │ points="469,242 489,242 "/> │ 00:41:59 verbose #26942 > > │ <polyline fill="none" opacity="1" stroke="#0000FF" stroke-width="1" │ 00:41:59 verbose #26943 > > │ points="469,257 489,257 "/> │ 00:41:59 verbose #26944 > > │ </svg> │ 00:41:59 verbose #26945 > > │ │ 00:41:59 verbose #26946 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:59 verbose #26947 > > 00:41:59 verbose #26948 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:41:59 verbose #26949 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:41:59 verbose #26950 > > │ #### wave 2 │ 00:41:59 verbose #26951 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:41:59 verbose #26952 > > 00:41:59 verbose #26953 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:41:59 verbose #26954 > > //// test 00:41:59 verbose #26955 > > 00:41:59 verbose #26956 > > inl linear_spring k re (particle_state st1) (particle_state st2) = 00:41:59 verbose #26957 > > inl r1 = st1.pos_vec 00:41:59 verbose #26958 > > inl r2 = st2.pos_vec 00:41:59 verbose #26959 > > inl r21 = r2 ^-^ r1 00:41:59 verbose #26960 > > inl r21mag = magnitude r21 00:41:59 verbose #26961 > > -k * (r21mag - re) *^ r21 ^/ r21mag 00:41:59 verbose #26962 > > 00:41:59 verbose #26963 > > inl fixed_linear_spring k re r1 = 00:41:59 verbose #26964 > > inl (particle_state default_particle_state') = default_particle_state () 00:41:59 verbose #26965 > > linear_spring k re (particle_state { default_particle_state' with pos_vec = 00:41:59 verbose #26966 > > r1 }) 00:41:59 verbose #26967 > > 00:41:59 verbose #26968 > > inl forces_string () = 00:41:59 verbose #26969 > > [[ 00:41:59 verbose #26970 > > ExternalForce (0i32, fixed_linear_spring 5384 0 (zero_vec ())) 00:41:59 verbose #26971 > > ExternalForce (63, fixed_linear_spring 5384 0 (0.65 *^ i_hat ())) 00:41:59 verbose #26972 > > ]] ++ ( 00:41:59 verbose #26973 > > listm'.init_series 0 59 1 00:41:59 verbose #26974 > > |> listm.map (fun n => InternalForce (n, n + 1, linear_spring 5384 0)) 00:41:59 verbose #26975 > > ) 00:41:59 verbose #26976 > > 00:41:59 verbose #26977 > > inl string_update dt = 00:41:59 verbose #26978 > > update_mps (join runge_kutta_4 dt) (join forces_string ()) 00:41:59 verbose #26979 > > 00:41:59 verbose #26980 > > inl string_initial_overtone n = 00:41:59 verbose #26981 > > inl ball_mass = 0.0008293 * 0.65 / 64 00:41:59 verbose #26982 > > inl (particle_state default_particle_state') = default_particle_state () 00:41:59 verbose #26983 > > listm'.init_series 0.01 0.64 0.01 00:41:59 verbose #26984 > > |> listm.map (fun x => 00:41:59 verbose #26985 > > inl y = 0.005 * sin (conv n * pi * x / 0.65) 00:41:59 verbose #26986 > > particle_state { 00:41:59 verbose #26987 > > default_particle_state' with 00:41:59 verbose #26988 > > mass = ball_mass 00:41:59 verbose #26989 > > pos_vec = x *^ i_hat () ^+^ y *^ j_hat () 00:41:59 verbose #26990 > > velocity = zero_vec () 00:41:59 verbose #26991 > > } 00:41:59 verbose #26992 > > ) 00:41:59 verbose #26993 > > |> stream.from_list 00:41:59 verbose #26994 > > |> multi_particle_state 00:41:59 verbose #26995 > > 00:41:59 verbose #26996 > > let main () = 00:41:59 verbose #26997 > > inl ~frames = listm'.init_series 0 65 1f64 |> stream.from_list 00:41:59 verbose #26998 > > inl ~initial_state = string_initial_overtone 3i32 00:41:59 verbose #26999 > > inl frames = 00:41:59 verbose #27000 > > frames 00:41:59 verbose #27001 > > |> stream.map (fun n => 00:41:59 verbose #27002 > > inl (multi_particle_state sts) = 00:41:59 verbose #27003 > > stream.iterate (string_update 0.000025) initial_state |> 00:41:59 verbose #27004 > > stream.item n 00:41:59 verbose #27005 > > inl x, y = 00:41:59 verbose #27006 > > [[ zero_vec () ]] 00:41:59 verbose #27007 > > ++ (sts |> stream.map (fun (particle_state st) => st.pos_vec) |> 00:41:59 verbose #27008 > > stream.to_list) 00:41:59 verbose #27009 > > ++ [[ 0.65 *^ i_hat () ]] 00:41:59 verbose #27010 > > |> listm.map (fun r => r.x, r.y) 00:41:59 verbose #27011 > > |> stream.from_list 00:41:59 verbose #27012 > > |> stream.unzip 00:41:59 verbose #27013 > > inl x = x |> stream.to_list |> listm'.box |> listm'.to_array' 00:41:59 verbose #27014 > > inl y = y |> stream.to_list |> listm'.box |> listm'.to_array' 00:41:59 verbose #27015 > > x, y 00:41:59 verbose #27016 > > ) 00:41:59 verbose #27017 > > 00:41:59 verbose #27018 > > inl plots = 00:41:59 verbose #27019 > > frames 00:41:59 verbose #27020 > > |> stream.indexed 00:41:59 verbose #27021 > > |> stream.map (fun ((n : i32), (x, y)) => 00:41:59 verbose #27022 > > "wave", 00:41:59 verbose #27023 > > "position (m)", 00:41:59 verbose #27024 > > "displacement (m)", 00:41:59 verbose #27025 > > ;[[ 00:41:59 verbose #27026 > > ($'$"{!n}"' : string), x, y 00:41:59 verbose #27027 > > ]] 00:41:59 verbose #27028 > > ) 00:41:59 verbose #27029 > > 00:41:59 verbose #27030 > > plots |> stream.to_list |> listm'.box |> listm'.to_array' 00:42:05 verbose #27031 > > 00:42:05 verbose #27032 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:05 verbose #27033 > > ╭─[ 6.23s - diagnostics ]──────────────────────────────────────────────────────╮ 00:42:05 verbose #27034 > > │ input.fsx (22,25)-(1084,1085) typecheck warning Incomplete pattern matches │ 00:42:05 verbose #27035 > > │ on this expression. For example, the value 'UH7_1 (_, _, _, _)' may indicate │ 00:42:05 verbose #27036 > > │ a case not covered by the pattern(s). │ 00:42:05 verbose #27037 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:05 verbose #27038 > > 00:42:05 verbose #27039 > > ╭─[ 6.44s - return value ]─────────────────────────────────────────────────────╮ 00:42:05 verbose #27040 > > │ <table><thead><tr><th><i>index</i></th><th>value</th></tr></thead><tbody><tr │ 00:42:05 verbose #27041 > > │ ><td>0</td><td><svg width="640" height="480" viewBox="0 0 640 480" │ 00:42:05 verbose #27042 > > │ xmlns="http://www.w3.org/2000/svg"> │ 00:42:05 verbose #27043 > > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │ 00:42:05 verbose #27044 > > │ stroke="none"/> │ 00:42:05 verbose #27045 > > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │ 00:42:05 verbose #27046 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:42:05 verbose #27047 > > │ fill="#FFFFFF"> │ 00:42:05 verbose #27048 > > │ wave │ 00:42:05 verbose #27049 > > │ </text> │ 00:42:05 verbose #27050 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="62" y1="424" x2="62" │ 00:42:05 verbose #27051 > > │ y2="75"/> │ 00:42:05 verbose #27052 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │ 00:42:05 verbose #27053 > > │ y2="75"/> │ 00:42:05 verbose #27054 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="77" y1="424" x2="77" │ 00:42:05 verbose #27055 > > │ y2="75"/> │ 00:42:05 verbose #27056 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="85" y1="424" x2="85" │ 00:42:05 verbose #27057 > > │ y2="75"/> │ 00:42:05 verbose #27058 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="93" y1="424" x2="93" │ 00:42:05 verbose #27059 > > │ y2="75"/> │ 00:42:05 verbose #27060 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="100" y1="424" │ 00:42:05 verbose #27061 > > │ x2="100" y2="75"/> │ 00:42:05 verbose #27062 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="108" y1="424" │ 00:42:05 verbose #27063 > > │ x2="108" y2="75"/> │ 00:42:05 verbose #27064 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="116" y1="424" │ 00:42:05 verbose #27065 > > │ x2="116" y2="75"/> │ 00:42:05 verbose #27066 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="123" y1="424" │ 00:42:05 verbose #27067 > > │ x2="123" y2="75"/> │ 00:42:05 verbose #27068 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="131" y1="424" │ 00:42:05 verbose #27069 > > │ x2="131" y2="75"/> │ 00:42:05 verbose #27070 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │ 00:42:05 verbose #27071 > > │ x2="139" y2="75"/> │ 00:42:05 verbose #27072 > > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="146" y1="424" │ 00:42:05 verbose #27073 > > │ x2="146" y2="75"/> │ 00:42:05 verbose #27074 > > │ <line opacity="1" stroke="#...28 590,128 "/> │ 00:42:05 verbose #27075 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:42:05 verbose #27076 > > │ points="69,363 77,322 85,283 92,246 100,211 107,179 115,151 122,127 130,108 │ 00:42:05 verbose #27077 > > │ 138,95 145,87 153,85 160,89 168,99 175,114 183,134 190,159 198,188 205,220 │ 00:42:05 verbose #27078 > > │ 212,253 218,284 223,311 226,329 227,337 226,337 224,333 223,334 223,344 │ 00:42:05 verbose #27079 > > │ 224,357 225,367 224,370 223,374 224,383 224,393 224,397 224,400 224,406 │ 00:42:05 verbose #27080 > > │ 224,411 224,412 224,413 224,415 224,413 224,411 224,409 224,405 224,400 │ 00:42:05 verbose #27081 > > │ 224,395 224,388 224,382 224,375 224,367 224,360 224,353 224,346 224,339 │ 00:42:05 verbose #27082 > > │ 224,332 224,327 224,322 224,318 224,314 224,312 224,311 539,239 546,279 │ 00:42:05 verbose #27083 > > │ 569,403 561,363 "/> │ 00:42:05 verbose #27084 > > │ <rect x="519" y="235" width="61" height="30" opacity="1" fill="none" │ 00:42:05 verbose #27085 > > │ stroke="#FFFFFF"/> │ 00:42:05 verbose #27086 > > │ <text x="559" y="245" dy="0.76em" text-anchor="start" │ 00:42:05 verbose #27087 > > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │ 00:42:05 verbose #27088 > > │ fill="#FFFFFF"> │ 00:42:05 verbose #27089 > > │ 65 │ 00:42:05 verbose #27090 > > │ </text> │ 00:42:05 verbose #27091 > > │ <polyline fill="none" opacity="1" stroke="#FF0000" stroke-width="1" │ 00:42:05 verbose #27092 > > │ points="529,250 549,250 "/> │ 00:42:05 verbose #27093 > > │ </svg> │ 00:42:05 verbose #27094 > > │ </td></tr></tbody></table><style> │ 00:42:05 verbose #27095 > > │ .dni-code-hint { │ 00:42:05 verbose #27096 > > │ font-style: italic; │ 00:42:05 verbose #27097 > > │ overflow: hidden; │ 00:42:05 verbose #27098 > > │ white-space: nowrap; │ 00:42:05 verbose #27099 > > │ } │ 00:42:05 verbose #27100 > > │ .dni-treeview { │ 00:42:05 verbose #27101 > > │ white-space: nowrap; │ 00:42:05 verbose #27102 > > │ } │ 00:42:05 verbose #27103 > > │ .dni-treeview td { │ 00:42:05 verbose #27104 > > │ vertical-align: top; │ 00:42:05 verbose #27105 > > │ text-align: start; │ 00:42:05 verbose #27106 > > │ } │ 00:42:05 verbose #27107 > > │ details.dni-treeview { │ 00:42:05 verbose #27108 > > │ padding-left: 1em; │ 00:42:05 verbose #27109 > > │ } │ 00:42:05 verbose #27110 > > │ table td { │ 00:42:05 verbose #27111 > > │ text-align: start; │ 00:42:05 verbose #27112 > > │ } │ 00:42:05 verbose #27113 > > │ table tr { │ 00:42:05 verbose #27114 > > │ vertical-align: top; │ 00:42:05 verbose #27115 > > │ margin: 0em 0px; │ 00:42:05 verbose #27116 > > │ } │ 00:42:05 verbose #27117 > > │ table tr td pre │ 00:42:05 verbose #27118 > > │ { │ 00:42:05 verbose #27119 > > │ vertical-align: top !important; │ 00:42:05 verbose #27120 > > │ margin: 0em 0px !important; │ 00:42:05 verbose #27121 > > │ } │ 00:42:05 verbose #27122 > > │ table th { │ 00:42:05 verbose #27123 > > │ text-align: start; │ 00:42:05 verbose #27124 > > │ } │ 00:42:05 verbose #27125 > > │ </style> │ 00:42:05 verbose #27126 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:05 verbose #27127 > > 00:42:05 verbose #27128 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:05 verbose #27129 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:05 verbose #27130 > > │ ## end │ 00:42:05 verbose #27131 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:05 verbose #27132 > 00:01:08 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 157679 } 00:42:05 verbose #27133 > 00:01:08 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:42:05 verbose #27134 > "nbconvert", 00:42:05 verbose #27135 > "c:/home/git/polyglot/lib/spiral/physics.dib.ipynb", 00:42:05 verbose #27136 > "--to", 00:42:05 verbose #27137 > "html", 00:42:05 verbose #27138 > "--HTMLExporter.theme=dark", 00:42:05 verbose #27139 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/physics.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:42:08 verbose #27140 > 00:01:10 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/physics.dib.ipynb to html 00:42:08 verbose #27141 > 00:01:10 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:42:08 verbose #27142 > 00:01:10 verbose #7 ! validate(nb) 00:42:13 verbose #27143 > 00:01:16 verbose #8 ! [NbConvertApp] Writing 2508212 bytes to c:\home\git\polyglot\lib\spiral\physics.dib.html 00:42:14 verbose #27144 > 00:01:16 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 646 } 00:42:14 verbose #27145 > 00:01:16 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 646 } 00:42:14 verbose #27146 > 00:01:16 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:42:14 verbose #27147 > "-c", 00:42:14 verbose #27148 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/physics.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:42:14 verbose #27149 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/physics.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:42:14 verbose #27150 > 00:01:17 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:42:14 verbose #27151 > 00:01:17 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:42:14 verbose #27152 > 00:01:17 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 158384 } 00:42:14 debug #27153 runtime.execute_with_options_async / { exit_code = 0; output_length = 166909 } 00:42:14 debug #32 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path physics.dib --retries 3 00:42:14 debug #27154 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path seq.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:42:14 verbose #27155 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "seq.dib", "--retries", "3"])) } 00:42:14 verbose #27156 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:42:14 verbose #27157 > "repl", 00:42:14 verbose #27158 > "--exit-after-run", 00:42:14 verbose #27159 > "--run", 00:42:14 verbose #27160 > "c:/home/git/polyglot/lib/spiral/seq.dib", 00:42:14 verbose #27161 > "--output-path", 00:42:14 verbose #27162 > "c:/home/git/polyglot/lib/spiral/seq.dib.ipynb", 00:42:14 verbose #27163 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/seq.dib" --output-path "c:/home/git/polyglot/lib/spiral/seq.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:42:16 verbose #27164 > > 00:42:16 verbose #27165 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:16 verbose #27166 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:16 verbose #27167 > > │ # seq │ 00:42:16 verbose #27168 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:20 verbose #27169 > > 00:42:20 verbose #27170 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:20 verbose #27171 > > //// test 00:42:20 verbose #27172 > > 00:42:20 verbose #27173 > > open testing 00:42:21 verbose #27174 > > 00:42:21 verbose #27175 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:21 verbose #27176 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:21 verbose #27177 > > │ ## seq │ 00:42:21 verbose #27178 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:21 verbose #27179 > > 00:42:21 verbose #27180 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:21 verbose #27181 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:21 verbose #27182 > > │ ### seq │ 00:42:21 verbose #27183 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:21 verbose #27184 > > 00:42:21 verbose #27185 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:21 verbose #27186 > > type seq dim el = dim -> option el 00:42:22 verbose #27187 > > 00:42:22 verbose #27188 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:22 verbose #27189 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:22 verbose #27190 > > │ ### try_item │ 00:42:22 verbose #27191 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:22 verbose #27192 > > 00:42:22 verbose #27193 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:22 verbose #27194 > > inl try_item n s = 00:42:22 verbose #27195 > > n |> s 00:42:22 verbose #27196 > > 00:42:22 verbose #27197 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:22 verbose #27198 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:22 verbose #27199 > > │ ### from_list │ 00:42:22 verbose #27200 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:22 verbose #27201 > > 00:42:22 verbose #27202 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:22 verbose #27203 > > inl from_list list = 00:42:22 verbose #27204 > > fun n => 00:42:22 verbose #27205 > > list 00:42:22 verbose #27206 > > |> listm'.try_item n 00:42:22 verbose #27207 > > 00:42:22 verbose #27208 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:22 verbose #27209 > > //// test 00:42:22 verbose #27210 > > 00:42:22 verbose #27211 > > listm.init 10i32 print_and_return 00:42:22 verbose #27212 > > |> from_list 00:42:22 verbose #27213 > > |> try_item 5i32 00:42:22 verbose #27214 > > |> _assert_eq (Some 5i32) 00:42:24 verbose #27215 > > 00:42:24 verbose #27216 > > ╭─[ 1.59s - stdout ]───────────────────────────────────────────────────────────╮ 00:42:24 verbose #27217 > > │ print_and_return / x: 0 │ 00:42:24 verbose #27218 > > │ print_and_return / x: 1 │ 00:42:24 verbose #27219 > > │ print_and_return / x: 2 │ 00:42:24 verbose #27220 > > │ print_and_return / x: 3 │ 00:42:24 verbose #27221 > > │ print_and_return / x: 4 │ 00:42:24 verbose #27222 > > │ print_and_return / x: 5 │ 00:42:24 verbose #27223 > > │ print_and_return / x: 6 │ 00:42:24 verbose #27224 > > │ print_and_return / x: 7 │ 00:42:24 verbose #27225 > > │ print_and_return / x: 8 │ 00:42:24 verbose #27226 > > │ print_and_return / x: 9 │ 00:42:24 verbose #27227 > > │ __assert_eq / actual: US0_0 5 / expected: US0_0 5 │ 00:42:24 verbose #27228 > > │ │ 00:42:24 verbose #27229 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:24 verbose #27230 > > 00:42:24 verbose #27231 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:24 verbose #27232 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:24 verbose #27233 > > │ ### map │ 00:42:24 verbose #27234 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:24 verbose #27235 > > 00:42:24 verbose #27236 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:24 verbose #27237 > > inl map fn s = 00:42:24 verbose #27238 > > fun n => 00:42:24 verbose #27239 > > n 00:42:24 verbose #27240 > > |> s 00:42:24 verbose #27241 > > |> optionm.map fn 00:42:24 verbose #27242 > > 00:42:24 verbose #27243 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:24 verbose #27244 > > //// test 00:42:24 verbose #27245 > > 00:42:24 verbose #27246 > > listm.init 10i32 id 00:42:24 verbose #27247 > > |> from_list 00:42:24 verbose #27248 > > |> map ((*) 2) 00:42:24 verbose #27249 > > |> try_item 5i32 00:42:24 verbose #27250 > > |> _assert_eq (Some 10i32) 00:42:25 verbose #27251 > > 00:42:25 verbose #27252 > > ╭─[ 479.62ms - stdout ]────────────────────────────────────────────────────────╮ 00:42:25 verbose #27253 > > │ __assert_eq / actual: US0_0 10 / expected: US0_0 10 │ 00:42:25 verbose #27254 > > │ │ 00:42:25 verbose #27255 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:25 verbose #27256 > > 00:42:25 verbose #27257 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:25 verbose #27258 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:25 verbose #27259 > > │ ### mapi │ 00:42:25 verbose #27260 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:25 verbose #27261 > > 00:42:25 verbose #27262 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:25 verbose #27263 > > inl mapi fn s = 00:42:25 verbose #27264 > > fun n => 00:42:25 verbose #27265 > > n 00:42:25 verbose #27266 > > |> s 00:42:25 verbose #27267 > > |> optionm.map (fn n) 00:42:25 verbose #27268 > > 00:42:25 verbose #27269 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:25 verbose #27270 > > //// test 00:42:25 verbose #27271 > > 00:42:25 verbose #27272 > > listm.init 10i32 print_and_return 00:42:25 verbose #27273 > > |> from_list 00:42:25 verbose #27274 > > |> mapi fun i x => i + x 00:42:25 verbose #27275 > > |> try_item 5i32 00:42:25 verbose #27276 > > |> _assert_eq (Some 10i32) 00:42:26 verbose #27277 > > 00:42:26 verbose #27278 > > ╭─[ 517.27ms - stdout ]────────────────────────────────────────────────────────╮ 00:42:26 verbose #27279 > > │ print_and_return / x: 0 │ 00:42:26 verbose #27280 > > │ print_and_return / x: 1 │ 00:42:26 verbose #27281 > > │ print_and_return / x: 2 │ 00:42:26 verbose #27282 > > │ print_and_return / x: 3 │ 00:42:26 verbose #27283 > > │ print_and_return / x: 4 │ 00:42:26 verbose #27284 > > │ print_and_return / x: 5 │ 00:42:26 verbose #27285 > > │ print_and_return / x: 6 │ 00:42:26 verbose #27286 > > │ print_and_return / x: 7 │ 00:42:26 verbose #27287 > > │ print_and_return / x: 8 │ 00:42:26 verbose #27288 > > │ print_and_return / x: 9 │ 00:42:26 verbose #27289 > > │ __assert_eq / actual: US0_0 10 / expected: US0_0 10 │ 00:42:26 verbose #27290 > > │ │ 00:42:26 verbose #27291 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:26 verbose #27292 > > 00:42:26 verbose #27293 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:26 verbose #27294 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:26 verbose #27295 > > │ ### choose │ 00:42:26 verbose #27296 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:26 verbose #27297 > > 00:42:26 verbose #27298 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:26 verbose #27299 > > inl choose forall dim {number} t u. (fn : t -> option u) (s : seq dim t) : seq 00:42:26 verbose #27300 > > dim u = 00:42:26 verbose #27301 > > fun n => 00:42:26 verbose #27302 > > inl rec body fn s i i' = 00:42:26 verbose #27303 > > match i |> s with 00:42:26 verbose #27304 > > | None => None 00:42:26 verbose #27305 > > | Some x => 00:42:26 verbose #27306 > > match x |> fn with 00:42:26 verbose #27307 > > | Some x when n = i' => Some x 00:42:26 verbose #27308 > > | Some _ => loop (i + 1) (i' + 1) 00:42:26 verbose #27309 > > | _ => loop (i + 1) i' 00:42:26 verbose #27310 > > and inl loop i i' = 00:42:26 verbose #27311 > > if n |> var_is |> not 00:42:26 verbose #27312 > > then body fn s i i' 00:42:26 verbose #27313 > > else 00:42:26 verbose #27314 > > inl fn = join fn 00:42:26 verbose #27315 > > inl s = join s 00:42:26 verbose #27316 > > join body fn s i i' 00:42:26 verbose #27317 > > loop 0 0 00:42:26 verbose #27318 > > 00:42:26 verbose #27319 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:26 verbose #27320 > > //// test 00:42:26 verbose #27321 > > 00:42:26 verbose #27322 > > listm.init 10i32 print_and_return 00:42:26 verbose #27323 > > |> from_list 00:42:26 verbose #27324 > > |> choose (fun x => if x % 2 = 0 then Some x else None) 00:42:26 verbose #27325 > > |> try_item 1i32 00:42:26 verbose #27326 > > |> _assert_eq (Some 2i32) 00:42:27 verbose #27327 > > 00:42:27 verbose #27328 > > ╭─[ 478.09ms - stdout ]────────────────────────────────────────────────────────╮ 00:42:27 verbose #27329 > > │ print_and_return / x: 0 │ 00:42:27 verbose #27330 > > │ print_and_return / x: 1 │ 00:42:27 verbose #27331 > > │ print_and_return / x: 2 │ 00:42:27 verbose #27332 > > │ print_and_return / x: 3 │ 00:42:27 verbose #27333 > > │ print_and_return / x: 4 │ 00:42:27 verbose #27334 > > │ print_and_return / x: 5 │ 00:42:27 verbose #27335 > > │ print_and_return / x: 6 │ 00:42:27 verbose #27336 > > │ print_and_return / x: 7 │ 00:42:27 verbose #27337 > > │ print_and_return / x: 8 │ 00:42:27 verbose #27338 > > │ print_and_return / x: 9 │ 00:42:27 verbose #27339 > > │ __assert_eq / actual: US0_0 2 / expected: US0_0 2 │ 00:42:27 verbose #27340 > > │ │ 00:42:27 verbose #27341 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:27 verbose #27342 > > 00:42:27 verbose #27343 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:27 verbose #27344 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:27 verbose #27345 > > │ ### indexed │ 00:42:27 verbose #27346 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:27 verbose #27347 > > 00:42:27 verbose #27348 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:27 verbose #27349 > > inl indexed s = 00:42:27 verbose #27350 > > s 00:42:27 verbose #27351 > > |> mapi fun i x => 00:42:27 verbose #27352 > > i, x 00:42:27 verbose #27353 > > 00:42:27 verbose #27354 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:27 verbose #27355 > > //// test 00:42:27 verbose #27356 > > 00:42:27 verbose #27357 > > listm.init 10i32 ((*) 2) 00:42:27 verbose #27358 > > |> from_list 00:42:27 verbose #27359 > > |> indexed 00:42:27 verbose #27360 > > |> try_item 5i32 00:42:27 verbose #27361 > > |> _assert_eq (Some (5i32, 10i32)) 00:42:28 verbose #27362 > > 00:42:28 verbose #27363 > > ╭─[ 472.59ms - stdout ]────────────────────────────────────────────────────────╮ 00:42:28 verbose #27364 > > │ __assert_eq / actual: US0_0 (5, 10) / expected: US0_0 (5, 10) │ 00:42:28 verbose #27365 > > │ │ 00:42:28 verbose #27366 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:28 verbose #27367 > > 00:42:28 verbose #27368 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:28 verbose #27369 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:28 verbose #27370 > > │ ### zip │ 00:42:28 verbose #27371 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:28 verbose #27372 > > 00:42:28 verbose #27373 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:28 verbose #27374 > > inl zip n seq1 seq2 = 00:42:28 verbose #27375 > > seq1 n, seq2 n 00:42:28 verbose #27376 > > 00:42:28 verbose #27377 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:28 verbose #27378 > > //// test 00:42:28 verbose #27379 > > 00:42:28 verbose #27380 > > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list)) 00:42:28 verbose #27381 > > ||> zip 5i32 00:42:28 verbose #27382 > > |> _assert_eq (Some 5, Some 10) 00:42:29 verbose #27383 > > 00:42:29 verbose #27384 > > ╭─[ 505.43ms - stdout ]────────────────────────────────────────────────────────╮ 00:42:29 verbose #27385 > > │ __assert_eq / actual: struct (US0_0 5, US0_0 10) / expected: struct (US0_0 │ 00:42:29 verbose #27386 > > │ 5, US0_0 10) │ 00:42:29 verbose #27387 > > │ │ 00:42:29 verbose #27388 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:29 verbose #27389 > > 00:42:29 verbose #27390 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:29 verbose #27391 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:29 verbose #27392 > > │ ### zip_with │ 00:42:29 verbose #27393 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:29 verbose #27394 > > 00:42:29 verbose #27395 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:29 verbose #27396 > > inl zip_with fn seq1 seq2 = 00:42:29 verbose #27397 > > fun n => 00:42:29 verbose #27398 > > fn (seq1 n) (seq2 n) 00:42:29 verbose #27399 > > 00:42:29 verbose #27400 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:29 verbose #27401 > > //// test 00:42:29 verbose #27402 > > 00:42:29 verbose #27403 > > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list)) 00:42:29 verbose #27404 > > ||> zip_with (optionm'.choose (+)) 00:42:29 verbose #27405 > > |> try_item 2i32 00:42:29 verbose #27406 > > |> _assert_eq (Some 6) 00:42:30 verbose #27407 > > 00:42:30 verbose #27408 > > ╭─[ 425.46ms - stdout ]────────────────────────────────────────────────────────╮ 00:42:30 verbose #27409 > > │ __assert_eq / actual: US0_0 6 / expected: US0_0 6 │ 00:42:30 verbose #27410 > > │ │ 00:42:30 verbose #27411 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:30 verbose #27412 > > 00:42:30 verbose #27413 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:30 verbose #27414 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:30 verbose #27415 > > │ ### fold │ 00:42:30 verbose #27416 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:30 verbose #27417 > > 00:42:30 verbose #27418 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:30 verbose #27419 > > inl fold fn init seq = 00:42:30 verbose #27420 > > inl rec loop acc n = 00:42:30 verbose #27421 > > match seq n with 00:42:30 verbose #27422 > > | Some x => loop (fn acc x) (n + 1) 00:42:30 verbose #27423 > > | None => acc 00:42:30 verbose #27424 > > loop init 0 00:42:30 verbose #27425 > > 00:42:30 verbose #27426 > > inl fold_ fn init seq = 00:42:30 verbose #27427 > > let rec loop acc n = 00:42:30 verbose #27428 > > match seq n with 00:42:30 verbose #27429 > > | Some x => loop (fn acc x) (n + 1) 00:42:30 verbose #27430 > > | None => acc 00:42:30 verbose #27431 > > loop init 0 00:42:30 verbose #27432 > > 00:42:30 verbose #27433 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:30 verbose #27434 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:30 verbose #27435 > > │ ### sum │ 00:42:30 verbose #27436 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:30 verbose #27437 > > 00:42:30 verbose #27438 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:30 verbose #27439 > > inl sum seq = 00:42:30 verbose #27440 > > seq |> fold (+) 0 00:42:30 verbose #27441 > > 00:42:30 verbose #27442 > > inl sum_ seq = 00:42:30 verbose #27443 > > seq |> fold_ (+) 0 00:42:30 verbose #27444 > > 00:42:30 verbose #27445 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:30 verbose #27446 > > //// test 00:42:30 verbose #27447 > > 00:42:30 verbose #27448 > > listm.init 10i32 id 00:42:30 verbose #27449 > > |> from_list 00:42:30 verbose #27450 > > |> fun f (n : i32) => f n 00:42:30 verbose #27451 > > |> sum 00:42:30 verbose #27452 > > |> _assert_eq 45 00:42:31 verbose #27453 > > 00:42:31 verbose #27454 > > ╭─[ 479.55ms - stdout ]────────────────────────────────────────────────────────╮ 00:42:31 verbose #27455 > > │ __assert_eq / actual: 45 / expected: 45 │ 00:42:31 verbose #27456 > > │ │ 00:42:31 verbose #27457 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:31 verbose #27458 > > 00:42:31 verbose #27459 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:31 verbose #27460 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:31 verbose #27461 > > │ ### to_list │ 00:42:31 verbose #27462 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:31 verbose #27463 > > 00:42:31 verbose #27464 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:31 verbose #27465 > > inl to_list seq = 00:42:31 verbose #27466 > > seq 00:42:31 verbose #27467 > > |> fold (fun acc x => x :: acc) [[]] 00:42:31 verbose #27468 > > |> listm.rev 00:42:31 verbose #27469 > > 00:42:31 verbose #27470 > > inl to_list_ seq = 00:42:31 verbose #27471 > > seq 00:42:31 verbose #27472 > > |> fold_ (fun acc x => x :: acc) [[]] 00:42:31 verbose #27473 > > |> listm.rev 00:42:31 verbose #27474 > > 00:42:31 verbose #27475 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:31 verbose #27476 > > //// test 00:42:31 verbose #27477 > > 00:42:31 verbose #27478 > > listm.init 10i32 id 00:42:31 verbose #27479 > > |> from_list 00:42:31 verbose #27480 > > |> fun f (n : i32) => f n 00:42:31 verbose #27481 > > |> to_list 00:42:31 verbose #27482 > > |> _assert_eq (listm.init 10i32 id) 00:42:32 verbose #27483 > > 00:42:32 verbose #27484 > > ╭─[ 517.43ms - stdout ]────────────────────────────────────────────────────────╮ 00:42:32 verbose #27485 > > │ __assert_eq / actual: UH0_1 │ 00:42:32 verbose #27486 > > │ (0, │ 00:42:32 verbose #27487 > > │ UH0_1 │ 00:42:32 verbose #27488 > > │ (1, │ 00:42:32 verbose #27489 > > │ UH0_1 │ 00:42:32 verbose #27490 > > │ (2, │ 00:42:32 verbose #27491 > > │ UH0_1 │ 00:42:32 verbose #27492 > > │ (3, │ 00:42:32 verbose #27493 > > │ UH0_1 │ 00:42:32 verbose #27494 > > │ (4, UH0_1 (5, UH0_1 (6, UH0_1 (7, UH0_1 (8, UH0_1 (9, │ 00:42:32 verbose #27495 > > │ UH0_0)))))))))) / expected: UH0_1 │ 00:42:32 verbose #27496 > > │ (0, │ 00:42:32 verbose #27497 > > │ UH0_1 │ 00:42:32 verbose #27498 > > │ (1, │ 00:42:32 verbose #27499 > > │ UH0_1 │ 00:42:32 verbose #27500 > > │ (2, │ 00:42:32 verbose #27501 > > │ UH0_1 │ 00:42:32 verbose #27502 > > │ (3, │ 00:42:32 verbose #27503 > > │ UH0_1 │ 00:42:32 verbose #27504 > > │ (4, UH0_1 (5, UH0_1 (6, UH0_1 (7, UH0_1 (8, UH0_1 (9, │ 00:42:32 verbose #27505 > > │ UH0_0)))))))))) │ 00:42:32 verbose #27506 > > │ │ 00:42:32 verbose #27507 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:32 verbose #27508 > > 00:42:32 verbose #27509 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:32 verbose #27510 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:32 verbose #27511 > > │ ### from_array │ 00:42:32 verbose #27512 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:32 verbose #27513 > > 00:42:32 verbose #27514 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:32 verbose #27515 > > inl from_array forall dim {number; int} el. (array : a dim el) : seq dim el = 00:42:32 verbose #27516 > > fun n => 00:42:32 verbose #27517 > > if n >= length array 00:42:32 verbose #27518 > > then None 00:42:32 verbose #27519 > > else index array n |> Some 00:42:32 verbose #27520 > > 00:42:32 verbose #27521 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:32 verbose #27522 > > //// test 00:42:32 verbose #27523 > > 00:42:32 verbose #27524 > > a ;[[ 1; 2; 3 ]] 00:42:32 verbose #27525 > > |> from_array 00:42:32 verbose #27526 > > |> try_item 1i32 00:42:32 verbose #27527 > > |> _assert_eq (Some 2i32) 00:42:33 verbose #27528 > > 00:42:33 verbose #27529 > > ╭─[ 610.90ms - stdout ]────────────────────────────────────────────────────────╮ 00:42:33 verbose #27530 > > │ __assert_eq / actual: US0_0 2 / expected: US0_0 2 │ 00:42:33 verbose #27531 > > │ │ 00:42:33 verbose #27532 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:33 verbose #27533 > > 00:42:33 verbose #27534 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:33 verbose #27535 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:33 verbose #27536 > > │ ### to_array │ 00:42:33 verbose #27537 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:33 verbose #27538 > > 00:42:33 verbose #27539 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:33 verbose #27540 > > inl to_array seq = 00:42:33 verbose #27541 > > inl ar = a ;[[]] |> mut 00:42:33 verbose #27542 > > ((), seq) 00:42:33 verbose #27543 > > ||> fold fun _ x => 00:42:33 verbose #27544 > > ar <- *ar ++ a ;[[x]] 00:42:33 verbose #27545 > > *ar 00:42:33 verbose #27546 > > 00:42:33 verbose #27547 > > inl to_array_ seq = 00:42:33 verbose #27548 > > inl ar = a ;[[]] |> mut 00:42:33 verbose #27549 > > ((), seq) 00:42:33 verbose #27550 > > ||> fold_ fun _ x => 00:42:33 verbose #27551 > > ar <- *ar ++ a ;[[x]] 00:42:33 verbose #27552 > > *ar 00:42:33 verbose #27553 > > 00:42:33 verbose #27554 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:33 verbose #27555 > > //// test 00:42:33 verbose #27556 > > 00:42:33 verbose #27557 > > listm.init 10i32 id 00:42:33 verbose #27558 > > |> from_list 00:42:33 verbose #27559 > > |> fun (x : i32 -> _) => x 00:42:33 verbose #27560 > > |> to_array 00:42:33 verbose #27561 > > |> _assert_eq (a ;[[ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9 ]] : _ i32 _) 00:42:34 verbose #27562 > > 00:42:34 verbose #27563 > > ╭─[ 703.23ms - stdout ]────────────────────────────────────────────────────────╮ 00:42:34 verbose #27564 > > │ __assert_eq / actual: [|0; 1; 2; 3; 4; 5; 6; 7; 8; 9|] / expected: [|0; 1; │ 00:42:34 verbose #27565 > > │ 2; 3; 4; 5; 6; 7; 8; 9|] │ 00:42:34 verbose #27566 > > │ │ 00:42:34 verbose #27567 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:34 verbose #27568 > > 00:42:34 verbose #27569 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:34 verbose #27570 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:34 verbose #27571 > > │ ### take_while │ 00:42:34 verbose #27572 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:34 verbose #27573 > > 00:42:34 verbose #27574 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:34 verbose #27575 > > inl take_while cond seq = 00:42:34 verbose #27576 > > inl rec loop acc i = 00:42:34 verbose #27577 > > match seq i with 00:42:34 verbose #27578 > > | Some st when cond st i => loop (st :: acc) (i + 1) 00:42:34 verbose #27579 > > | _ => acc |> listm.rev 00:42:34 verbose #27580 > > loop [[]] 0 00:42:34 verbose #27581 > > 00:42:34 verbose #27582 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:34 verbose #27583 > > //// test 00:42:34 verbose #27584 > > 00:42:34 verbose #27585 > > listm.init 10i32 id 00:42:34 verbose #27586 > > |> from_list 00:42:34 verbose #27587 > > |> take_while (fun n (_ : i32) => n < 5) 00:42:34 verbose #27588 > > |> listm'.sum 00:42:34 verbose #27589 > > |> _assert_eq 10 00:42:35 verbose #27590 > > 00:42:35 verbose #27591 > > ╭─[ 470.41ms - stdout ]────────────────────────────────────────────────────────╮ 00:42:35 verbose #27592 > > │ __assert_eq / actual: 10 / expected: 10 │ 00:42:35 verbose #27593 > > │ │ 00:42:35 verbose #27594 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:35 verbose #27595 > > 00:42:35 verbose #27596 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:35 verbose #27597 > > //// test 00:42:35 verbose #27598 > > 00:42:35 verbose #27599 > > stream.new_finite_stream print_and_return 10i32 00:42:35 verbose #27600 > > |> flip stream.try_item 00:42:35 verbose #27601 > > |> take_while (fun n (_ : i32) => n < 5) 00:42:35 verbose #27602 > > |> listm'.sum 00:42:35 verbose #27603 > > |> _assert_eq 10 00:42:35 verbose #27604 > > 00:42:35 verbose #27605 > > ╭─[ 510.46ms - stdout ]────────────────────────────────────────────────────────╮ 00:42:35 verbose #27606 > > │ print_and_return / x: 0 │ 00:42:35 verbose #27607 > > │ print_and_return / x: 1 │ 00:42:35 verbose #27608 > > │ print_and_return / x: 1 │ 00:42:35 verbose #27609 > > │ print_and_return / x: 2 │ 00:42:35 verbose #27610 > > │ print_and_return / x: 1 │ 00:42:35 verbose #27611 > > │ print_and_return / x: 2 │ 00:42:35 verbose #27612 > > │ print_and_return / x: 3 │ 00:42:35 verbose #27613 > > │ print_and_return / x: 1 │ 00:42:35 verbose #27614 > > │ print_and_return / x: 2 │ 00:42:35 verbose #27615 > > │ print_and_return / x: 3 │ 00:42:35 verbose #27616 > > │ print_and_return / x: 4 │ 00:42:35 verbose #27617 > > │ print_and_return / x: 1 │ 00:42:35 verbose #27618 > > │ print_and_return / x: 2 │ 00:42:35 verbose #27619 > > │ print_and_return / x: 3 │ 00:42:35 verbose #27620 > > │ print_and_return / x: 4 │ 00:42:35 verbose #27621 > > │ print_and_return / x: 5 │ 00:42:35 verbose #27622 > > │ __assert_eq / actual: 10 / expected: 10 │ 00:42:35 verbose #27623 > > │ │ 00:42:35 verbose #27624 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:35 verbose #27625 > > 00:42:35 verbose #27626 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:35 verbose #27627 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:35 verbose #27628 > > │ ### take_while_ │ 00:42:35 verbose #27629 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:35 verbose #27630 > > 00:42:35 verbose #27631 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:35 verbose #27632 > > inl take_while_ cond seq = 00:42:35 verbose #27633 > > let rec loop acc i = 00:42:35 verbose #27634 > > match seq i with 00:42:35 verbose #27635 > > | Some st when cond st i => loop (st :: acc) (i + 1) 00:42:35 verbose #27636 > > | _ => acc |> listm.rev 00:42:35 verbose #27637 > > loop [[]] 0 00:42:36 verbose #27638 > > 00:42:36 verbose #27639 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:36 verbose #27640 > > //// test 00:42:36 verbose #27641 > > 00:42:36 verbose #27642 > > stream.new_infinite_stream_ print_and_return 00:42:36 verbose #27643 > > |> flip stream.try_item 00:42:36 verbose #27644 > > |> take_while_ (fun n (_ : i32) => n < 5i32) 00:42:36 verbose #27645 > > |> listm'.sum 00:42:36 verbose #27646 > > |> _assert_eq 10 00:42:36 verbose #27647 > > 00:42:36 verbose #27648 > > ╭─[ 552.17ms - stdout ]────────────────────────────────────────────────────────╮ 00:42:36 verbose #27649 > > │ print_and_return / x: 0 │ 00:42:36 verbose #27650 > > │ print_and_return / x: 1 │ 00:42:36 verbose #27651 > > │ print_and_return / x: 1 │ 00:42:36 verbose #27652 > > │ print_and_return / x: 2 │ 00:42:36 verbose #27653 > > │ print_and_return / x: 1 │ 00:42:36 verbose #27654 > > │ print_and_return / x: 2 │ 00:42:36 verbose #27655 > > │ print_and_return / x: 3 │ 00:42:36 verbose #27656 > > │ print_and_return / x: 1 │ 00:42:36 verbose #27657 > > │ print_and_return / x: 2 │ 00:42:36 verbose #27658 > > │ print_and_return / x: 3 │ 00:42:36 verbose #27659 > > │ print_and_return / x: 4 │ 00:42:36 verbose #27660 > > │ print_and_return / x: 1 │ 00:42:36 verbose #27661 > > │ print_and_return / x: 2 │ 00:42:36 verbose #27662 > > │ print_and_return / x: 3 │ 00:42:36 verbose #27663 > > │ print_and_return / x: 4 │ 00:42:36 verbose #27664 > > │ print_and_return / x: 5 │ 00:42:36 verbose #27665 > > │ __assert_eq / actual: 10 / expected: 10 │ 00:42:36 verbose #27666 > > │ │ 00:42:36 verbose #27667 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:36 verbose #27668 > > 00:42:36 verbose #27669 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:36 verbose #27670 > > //// test 00:42:36 verbose #27671 > > 00:42:36 verbose #27672 > > stream.new_infinite_stream_ print_and_return 00:42:36 verbose #27673 > > |> stream.memoize 00:42:36 verbose #27674 > > |> fun list => 00:42:36 verbose #27675 > > inl list = list () 00:42:36 verbose #27676 > > fun n => 00:42:36 verbose #27677 > > list |> stream.try_item n 00:42:36 verbose #27678 > > |> take_while_ (fun n (_ : i32) => n < 5i32) 00:42:36 verbose #27679 > > |> listm'.sum 00:42:36 verbose #27680 > > |> _assert_eq 10 00:42:37 verbose #27681 > > 00:42:37 verbose #27682 > > ╭─[ 484.29ms - stdout ]────────────────────────────────────────────────────────╮ 00:42:37 verbose #27683 > > │ print_and_return / x: 0 │ 00:42:37 verbose #27684 > > │ print_and_return / x: 1 │ 00:42:37 verbose #27685 > > │ print_and_return / x: 2 │ 00:42:37 verbose #27686 > > │ print_and_return / x: 3 │ 00:42:37 verbose #27687 > > │ print_and_return / x: 4 │ 00:42:37 verbose #27688 > > │ print_and_return / x: 5 │ 00:42:37 verbose #27689 > > │ __assert_eq / actual: 10 / expected: 10 │ 00:42:37 verbose #27690 > > │ │ 00:42:37 verbose #27691 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:37 verbose #27692 > > 00:42:37 verbose #27693 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:37 verbose #27694 > > //// test 00:42:37 verbose #27695 > > 00:42:37 verbose #27696 > > stream.new_finite_stream print_and_return 10i32 00:42:37 verbose #27697 > > |> stream.memoize 00:42:37 verbose #27698 > > |> fun list => 00:42:37 verbose #27699 > > inl list = list () 00:42:37 verbose #27700 > > fun n => 00:42:37 verbose #27701 > > list |> stream.try_item n 00:42:37 verbose #27702 > > |> take_while_ (fun n (_ : i32) => n < 5) 00:42:37 verbose #27703 > > |> listm'.sum 00:42:37 verbose #27704 > > |> _assert_eq 10 00:42:38 verbose #27705 > > 00:42:38 verbose #27706 > > ╭─[ 679.60ms - stdout ]────────────────────────────────────────────────────────╮ 00:42:38 verbose #27707 > > │ print_and_return / x: 0 │ 00:42:38 verbose #27708 > > │ print_and_return / x: 1 │ 00:42:38 verbose #27709 > > │ print_and_return / x: 2 │ 00:42:38 verbose #27710 > > │ print_and_return / x: 3 │ 00:42:38 verbose #27711 > > │ print_and_return / x: 4 │ 00:42:38 verbose #27712 > > │ print_and_return / x: 5 │ 00:42:38 verbose #27713 > > │ __assert_eq / actual: 10 / expected: 10 │ 00:42:38 verbose #27714 > > │ │ 00:42:38 verbose #27715 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:38 verbose #27716 > > 00:42:38 verbose #27717 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:38 verbose #27718 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:38 verbose #27719 > > │ ### memoize │ 00:42:38 verbose #27720 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:38 verbose #27721 > > 00:42:38 verbose #27722 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:38 verbose #27723 > > inl memoize seq = 00:42:38 verbose #27724 > > inl state = mut [[]] 00:42:38 verbose #27725 > > fun n => 00:42:38 verbose #27726 > > match *state |> listm'.try_find (fun (n', _) => n' = n) with 00:42:38 verbose #27727 > > | Some (_, v) => v 00:42:38 verbose #27728 > > | None => 00:42:38 verbose #27729 > > inl new_state = seq n 00:42:38 verbose #27730 > > state <- (n, new_state) :: *state 00:42:38 verbose #27731 > > new_state 00:42:38 verbose #27732 > > 00:42:38 verbose #27733 > > inl memoize_ seq = 00:42:38 verbose #27734 > > inl state = mut [[]] 00:42:38 verbose #27735 > > fun n => 00:42:38 verbose #27736 > > match *state |> listm'.try_find_ (fun (n', _) => n' = n) with 00:42:38 verbose #27737 > > | Some (_, v) => v 00:42:38 verbose #27738 > > | None => 00:42:38 verbose #27739 > > inl new_state = seq n 00:42:38 verbose #27740 > > state <- (n, new_state) :: *state 00:42:38 verbose #27741 > > new_state 00:42:38 verbose #27742 > > 00:42:38 verbose #27743 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:38 verbose #27744 > > //// test 00:42:38 verbose #27745 > > 00:42:38 verbose #27746 > > inl seq = 00:42:38 verbose #27747 > > fun n => 00:42:38 verbose #27748 > > n |> print_and_return |> Some 00:42:38 verbose #27749 > > |> memoize_ 00:42:38 verbose #27750 > > 00:42:38 verbose #27751 > > seq 00:42:38 verbose #27752 > > |> take_while_ (fun n (_ : i32) => n < 5) 00:42:38 verbose #27753 > > |> listm'.sum 00:42:38 verbose #27754 > > |> _assert_eq 10 00:42:38 verbose #27755 > > 00:42:38 verbose #27756 > > seq 00:42:38 verbose #27757 > > |> take_while_ (fun n _ => n < 5) 00:42:38 verbose #27758 > > |> listm'.sum 00:42:38 verbose #27759 > > |> _assert_eq 10 00:42:39 verbose #27760 > > 00:42:39 verbose #27761 > > ╭─[ 1.41s - stdout ]───────────────────────────────────────────────────────────╮ 00:42:39 verbose #27762 > > │ print_and_return / x: 0 │ 00:42:39 verbose #27763 > > │ print_and_return / x: 1 │ 00:42:39 verbose #27764 > > │ print_and_return / x: 2 │ 00:42:39 verbose #27765 > > │ print_and_return / x: 3 │ 00:42:39 verbose #27766 > > │ print_and_return / x: 4 │ 00:42:39 verbose #27767 > > │ print_and_return / x: 5 │ 00:42:39 verbose #27768 > > │ __assert_eq / actual: 10 / expected: 10 │ 00:42:39 verbose #27769 > > │ __assert_eq / actual: 10 / expected: 10 │ 00:42:39 verbose #27770 > > │ │ 00:42:39 verbose #27771 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:39 verbose #27772 > > 00:42:39 verbose #27773 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:39 verbose #27774 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:39 verbose #27775 > > │ ### iterate │ 00:42:39 verbose #27776 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:39 verbose #27777 > > 00:42:39 verbose #27778 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:39 verbose #27779 > > inl iterate f x0 num_steps = 00:42:39 verbose #27780 > > inl rec loop x n = 00:42:39 verbose #27781 > > if n <= 0 00:42:39 verbose #27782 > > then x 00:42:39 verbose #27783 > > else loop (f x) (n - 1) 00:42:39 verbose #27784 > > loop x0 num_steps 00:42:40 verbose #27785 > > 00:42:40 verbose #27786 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:40 verbose #27787 > > //// test 00:42:40 verbose #27788 > > 00:42:40 verbose #27789 > > 10i32 |> iterate ((*) 2) 1i32 00:42:40 verbose #27790 > > |> _assert_eq 1024 00:42:40 verbose #27791 > > 00:42:40 verbose #27792 > > ╭─[ 619.99ms - stdout ]────────────────────────────────────────────────────────╮ 00:42:40 verbose #27793 > > │ __assert_eq / actual: 1024 / expected: 1024 │ 00:42:40 verbose #27794 > > │ │ 00:42:40 verbose #27795 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:40 verbose #27796 > > 00:42:40 verbose #27797 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:40 verbose #27798 > > inl iterate_ f x0 num_steps = 00:42:40 verbose #27799 > > let rec loop x n = 00:42:40 verbose #27800 > > if n <= 0 00:42:40 verbose #27801 > > then x 00:42:40 verbose #27802 > > else loop (f x) (n - 1) 00:42:40 verbose #27803 > > loop x0 num_steps 00:42:41 verbose #27804 > > 00:42:41 verbose #27805 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:41 verbose #27806 > > //// test 00:42:41 verbose #27807 > > 00:42:41 verbose #27808 > > 10i32 |> iterate_ ((*) 2) 1i32 00:42:41 verbose #27809 > > |> _assert_eq 1024 00:42:42 verbose #27810 > > 00:42:42 verbose #27811 > > ╭─[ 609.64ms - stdout ]────────────────────────────────────────────────────────╮ 00:42:42 verbose #27812 > > │ __assert_eq / actual: 1024 / expected: 1024 │ 00:42:42 verbose #27813 > > │ │ 00:42:42 verbose #27814 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:42 verbose #27815 > > 00:42:42 verbose #27816 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:42 verbose #27817 > > inl iterate' f x0 num_steps = 00:42:42 verbose #27818 > > listm.init num_steps id 00:42:42 verbose #27819 > > |> listm.fold (fun x _ => f x) x0 00:42:42 verbose #27820 > > 00:42:42 verbose #27821 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:42 verbose #27822 > > //// test 00:42:42 verbose #27823 > > 00:42:42 verbose #27824 > > 10i32 |> iterate' ((*) 2) 1i32 00:42:42 verbose #27825 > > |> _assert_eq 1024 00:42:43 verbose #27826 > > 00:42:43 verbose #27827 > > ╭─[ 538.04ms - stdout ]────────────────────────────────────────────────────────╮ 00:42:43 verbose #27828 > > │ __assert_eq / actual: 1024 / expected: 1024 │ 00:42:43 verbose #27829 > > │ │ 00:42:43 verbose #27830 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:43 verbose #27831 > > 00:42:43 verbose #27832 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:43 verbose #27833 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:43 verbose #27834 > > │ ### find_last │ 00:42:43 verbose #27835 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:43 verbose #27836 > > 00:42:43 verbose #27837 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:43 verbose #27838 > > inl find_last forall item result. fold_fn fn target : option result = 00:42:43 verbose #27839 > > fold_fn (fun (item : item) (result : option result) => 00:42:43 verbose #27840 > > match result with 00:42:43 verbose #27841 > > | None => fn item 00:42:43 verbose #27842 > > | result => result 00:42:43 verbose #27843 > > ) target (None : option result) 00:42:43 verbose #27844 > > 00:42:43 verbose #27845 > > inl array_find_last forall item result. (fn : item -> option result) (target : a 00:42:43 verbose #27846 > > i32 item) : option result = 00:42:43 verbose #27847 > > find_last am.foldBack fn target 00:42:43 verbose #27848 > > 00:42:43 verbose #27849 > > inl list_find_last forall item result. (fn : item -> option result) (target : 00:42:43 verbose #27850 > > list item) : option result = 00:42:43 verbose #27851 > > find_last listm.foldBack fn target 00:42:43 verbose #27852 > > 00:42:43 verbose #27853 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:43 verbose #27854 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:43 verbose #27855 > > │ ## fsharp │ 00:42:43 verbose #27856 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:43 verbose #27857 > > 00:42:43 verbose #27858 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:43 verbose #27859 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:43 verbose #27860 > > │ ### seq' │ 00:42:43 verbose #27861 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:43 verbose #27862 > > 00:42:43 verbose #27863 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:43 verbose #27864 > > nominal seq' t = $"backend_switch `({ Fsharp : $"`t seq"; Python : t })" 00:42:44 verbose #27865 > > 00:42:44 verbose #27866 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:44 verbose #27867 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:44 verbose #27868 > > │ ### of_array' │ 00:42:44 verbose #27869 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:44 verbose #27870 > > 00:42:44 verbose #27871 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:44 verbose #27872 > > inl of_array' forall dim t. (items : a dim t) : seq' t = 00:42:44 verbose #27873 > > backend_switch { 00:42:44 verbose #27874 > > Fsharp = fun () => $'seq { for i = 0 to !items.Length - 1 do yield 00:42:44 verbose #27875 > > !items.[[i]] }' : seq' t 00:42:44 verbose #27876 > > Python = fun () => $'!items ' : seq' t 00:42:44 verbose #27877 > > } 00:42:45 verbose #27878 > > 00:42:45 verbose #27879 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:45 verbose #27880 > > //// test 00:42:45 verbose #27881 > > 00:42:45 verbose #27882 > > (a ;[[ "a"; "b" ]] : _ i32 _) 00:42:45 verbose #27883 > > |> of_array' 00:42:46 verbose #27884 > > 00:42:46 verbose #27885 > > ╭─[ 1.20s - return value ]─────────────────────────────────────────────────────╮ 00:42:46 verbose #27886 > > │ <details open="open" class="dni-treeview"><summary><span │ 00:42:46 verbose #27887 > > │ class="dni-code-hint"><code>[ a, b │ 00:42:46 verbose #27888 > > │ ]</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ 00:42:46 verbose #27889 > > │ CheckClose</td><td><div │ 00:42:46 verbose #27890 > > │ class="dni-plaintext"><pre>False</pre></div></td></tr><tr><td>LastGenerated< │ 00:42:46 verbose #27891 > > │ /td><td><div │ 00:42:46 verbose #27892 > > │ class="dni-plaintext"><pre><null></pre></div></td></tr><tr><td>v2</td> │ 00:42:46 verbose #27893 > > │ <td><div class="dni-plaintext"><pre>[ a, b │ 00:42:46 verbose #27894 > > │ ]</pre></div></td></tr><tr><td>enum</td><td><div │ 00:42:46 verbose #27895 > > │ class="dni-plaintext"><pre><null></pre></div></td></tr><tr><td>pc</td> │ 00:42:46 verbose #27896 > > │ <td><div │ 00:42:46 verbose #27897 > > │ class="dni-plaintext"><pre>0</pre></div></td></tr><tr><td>current</td><td><d │ 00:42:46 verbose #27898 > > │ iv │ 00:42:46 verbose #27899 > > │ class="dni-plaintext"><pre><null></pre></div></td></tr><tr><td><i>(val │ 00:42:46 verbose #27900 > > │ ues)</i></td><td><div class="dni-plaintext"><pre>[ a, b │ 00:42:46 verbose #27901 > > │ ]</pre></div></td></tr></tbody></table></div></details><style> │ 00:42:46 verbose #27902 > > │ .dni-code-hint { │ 00:42:46 verbose #27903 > > │ font-style: italic; │ 00:42:46 verbose #27904 > > │ overflow: hidden; │ 00:42:46 verbose #27905 > > │ white-space: nowrap; │ 00:42:46 verbose #27906 > > │ } │ 00:42:46 verbose #27907 > > │ .dni-treeview { │ 00:42:46 verbose #27908 > > │ white-space: nowrap; │ 00:42:46 verbose #27909 > > │ } │ 00:42:46 verbose #27910 > > │ .dni-treeview td { │ 00:42:46 verbose #27911 > > │ vertical-align: top; │ 00:42:46 verbose #27912 > > │ text-align: start; │ 00:42:46 verbose #27913 > > │ } │ 00:42:46 verbose #27914 > > │ details.dni-treeview { │ 00:42:46 verbose #27915 > > │ padding-left: 1em; │ 00:42:46 verbose #27916 > > │ } │ 00:42:46 verbose #27917 > > │ table td { │ 00:42:46 verbose #27918 > > │ text-align: start; │ 00:42:46 verbose #27919 > > │ } │ 00:42:46 verbose #27920 > > │ table tr { │ 00:42:46 verbose #27921 > > │ vertical-align: top; │ 00:42:46 verbose #27922 > > │ margin: 0em 0px; │ 00:42:46 verbose #27923 > > │ } │ 00:42:46 verbose #27924 > > │ table tr td pre │ 00:42:46 verbose #27925 > > │ { │ 00:42:46 verbose #27926 > > │ vertical-align: top !important; │ 00:42:46 verbose #27927 > > │ margin: 0em 0px !important; │ 00:42:46 verbose #27928 > > │ } │ 00:42:46 verbose #27929 > > │ table th { │ 00:42:46 verbose #27930 > > │ text-align: start; │ 00:42:46 verbose #27931 > > │ } │ 00:42:46 verbose #27932 > > │ </style> │ 00:42:46 verbose #27933 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:46 verbose #27934 > > 00:42:46 verbose #27935 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:46 verbose #27936 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:46 verbose #27937 > > │ ### of_array │ 00:42:46 verbose #27938 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:46 verbose #27939 > > 00:42:46 verbose #27940 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:46 verbose #27941 > > inl of_array forall dim t. (items : a dim t) : seq' t = 00:42:46 verbose #27942 > > backend_switch { 00:42:46 verbose #27943 > > Fsharp = fun () => $'!items |> Seq.ofArray' : seq' t 00:42:46 verbose #27944 > > Python = fun () => $'!items ' : seq' t 00:42:46 verbose #27945 > > } 00:42:47 verbose #27946 > > 00:42:47 verbose #27947 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:47 verbose #27948 > > //// test 00:42:47 verbose #27949 > > 00:42:47 verbose #27950 > > (a ;[[ "a"; "b" ]] : _ i32 _) 00:42:47 verbose #27951 > > |> of_array 00:42:47 verbose #27952 > > 00:42:47 verbose #27953 > > ╭─[ 701.79ms - return value ]──────────────────────────────────────────────────╮ 00:42:47 verbose #27954 > > │ <details open="open" class="dni-treeview"><summary><span │ 00:42:47 verbose #27955 > > │ class="dni-code-hint"><code>[ a, b │ 00:42:47 verbose #27956 > > │ ]</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ 00:42:47 verbose #27957 > > │ f</td><td><details class="dni-treeview"><summary><span │ 00:42:47 verbose #27958 > > │ class="dni-code-hint"><code>Microsoft.FSharp.Collections.SeqModule+OfArray@1 │ 00:42:47 verbose #27959 > > │ 010[ │ 00:42:47 verbose #27960 > > │ System.String]</code></span></summary><div><table><thead><tr></tr></thead><t │ 00:42:47 verbose #27961 > > │ body><tr><td>source</td><td><div class="dni-plaintext"><pre>[ a, b │ 00:42:47 verbose #27962 > > │ ]</pre></div></td></tr></tbody></table></div></details></td></tr><tr><td><i> │ 00:42:47 verbose #27963 > > │ (values)</i></td><td><div class="dni-plaintext"><pre>[ a, b │ 00:42:47 verbose #27964 > > │ ]</pre></div></td></tr></tbody></table></div></details><style> │ 00:42:47 verbose #27965 > > │ .dni-code-hint { │ 00:42:47 verbose #27966 > > │ font-style: italic; │ 00:42:47 verbose #27967 > > │ overflow: hidden; │ 00:42:47 verbose #27968 > > │ white-space: nowrap; │ 00:42:47 verbose #27969 > > │ } │ 00:42:47 verbose #27970 > > │ .dni-treeview { │ 00:42:47 verbose #27971 > > │ white-space: nowrap; │ 00:42:47 verbose #27972 > > │ } │ 00:42:47 verbose #27973 > > │ .dni-treeview td { │ 00:42:47 verbose #27974 > > │ vertical-align: top; │ 00:42:47 verbose #27975 > > │ text-align: start; │ 00:42:47 verbose #27976 > > │ } │ 00:42:47 verbose #27977 > > │ details.dni-treeview { │ 00:42:47 verbose #27978 > > │ padding-left: 1em; │ 00:42:47 verbose #27979 > > │ } │ 00:42:47 verbose #27980 > > │ table td { │ 00:42:47 verbose #27981 > > │ text-align: start; │ 00:42:47 verbose #27982 > > │ } │ 00:42:47 verbose #27983 > > │ table tr { │ 00:42:47 verbose #27984 > > │ vertical-align: top; │ 00:42:47 verbose #27985 > > │ margin: 0em 0px; │ 00:42:47 verbose #27986 > > │ } │ 00:42:47 verbose #27987 > > │ table tr td pre │ 00:42:47 verbose #27988 > > │ { │ 00:42:47 verbose #27989 > > │ vertical-align: top !important; │ 00:42:47 verbose #27990 > > │ margin: 0em 0px !important; │ 00:42:47 verbose #27991 > > │ } │ 00:42:47 verbose #27992 > > │ table th { │ 00:42:47 verbose #27993 > > │ text-align: start; │ 00:42:47 verbose #27994 > > │ } │ 00:42:47 verbose #27995 > > │ </style> │ 00:42:47 verbose #27996 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:47 verbose #27997 > > 00:42:47 verbose #27998 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:47 verbose #27999 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:47 verbose #28000 > > │ ### of_array_base │ 00:42:47 verbose #28001 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:47 verbose #28002 > > 00:42:47 verbose #28003 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:47 verbose #28004 > > inl of_array_base forall t. (items : array_base t) : seq' t = 00:42:47 verbose #28005 > > a items 00:42:47 verbose #28006 > > |> fun x => x : _ int _ 00:42:47 verbose #28007 > > |> of_array 00:42:48 verbose #28008 > > 00:42:48 verbose #28009 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:48 verbose #28010 > > //// test 00:42:48 verbose #28011 > > 00:42:48 verbose #28012 > > ;[[ "a"; "b" ]] 00:42:48 verbose #28013 > > |> of_array_base 00:42:48 verbose #28014 > > 00:42:48 verbose #28015 > > ╭─[ 573.07ms - return value ]──────────────────────────────────────────────────╮ 00:42:48 verbose #28016 > > │ <details open="open" class="dni-treeview"><summary><span │ 00:42:48 verbose #28017 > > │ class="dni-code-hint"><code>[ a, b │ 00:42:48 verbose #28018 > > │ ]</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ 00:42:48 verbose #28019 > > │ f</td><td><details class="dni-treeview"><summary><span │ 00:42:48 verbose #28020 > > │ class="dni-code-hint"><code>Microsoft.FSharp.Collections.SeqModule+OfArray@1 │ 00:42:48 verbose #28021 > > │ 010[ │ 00:42:48 verbose #28022 > > │ System.String]</code></span></summary><div><table><thead><tr></tr></thead><t │ 00:42:48 verbose #28023 > > │ body><tr><td>source</td><td><div class="dni-plaintext"><pre>[ a, b │ 00:42:48 verbose #28024 > > │ ]</pre></div></td></tr></tbody></table></div></details></td></tr><tr><td><i> │ 00:42:48 verbose #28025 > > │ (values)</i></td><td><div class="dni-plaintext"><pre>[ a, b │ 00:42:48 verbose #28026 > > │ ]</pre></div></td></tr></tbody></table></div></details><style> │ 00:42:48 verbose #28027 > > │ .dni-code-hint { │ 00:42:48 verbose #28028 > > │ font-style: italic; │ 00:42:48 verbose #28029 > > │ overflow: hidden; │ 00:42:48 verbose #28030 > > │ white-space: nowrap; │ 00:42:48 verbose #28031 > > │ } │ 00:42:48 verbose #28032 > > │ .dni-treeview { │ 00:42:48 verbose #28033 > > │ white-space: nowrap; │ 00:42:48 verbose #28034 > > │ } │ 00:42:48 verbose #28035 > > │ .dni-treeview td { │ 00:42:48 verbose #28036 > > │ vertical-align: top; │ 00:42:48 verbose #28037 > > │ text-align: start; │ 00:42:48 verbose #28038 > > │ } │ 00:42:48 verbose #28039 > > │ details.dni-treeview { │ 00:42:48 verbose #28040 > > │ padding-left: 1em; │ 00:42:48 verbose #28041 > > │ } │ 00:42:48 verbose #28042 > > │ table td { │ 00:42:48 verbose #28043 > > │ text-align: start; │ 00:42:48 verbose #28044 > > │ } │ 00:42:48 verbose #28045 > > │ table tr { │ 00:42:48 verbose #28046 > > │ vertical-align: top; │ 00:42:48 verbose #28047 > > │ margin: 0em 0px; │ 00:42:48 verbose #28048 > > │ } │ 00:42:48 verbose #28049 > > │ table tr td pre │ 00:42:48 verbose #28050 > > │ { │ 00:42:48 verbose #28051 > > │ vertical-align: top !important; │ 00:42:48 verbose #28052 > > │ margin: 0em 0px !important; │ 00:42:48 verbose #28053 > > │ } │ 00:42:48 verbose #28054 > > │ table th { │ 00:42:48 verbose #28055 > > │ text-align: start; │ 00:42:48 verbose #28056 > > │ } │ 00:42:48 verbose #28057 > > │ </style> │ 00:42:48 verbose #28058 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:48 verbose #28059 > > 00:42:48 verbose #28060 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:48 verbose #28061 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:48 verbose #28062 > > │ ### to_array' │ 00:42:48 verbose #28063 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:48 verbose #28064 > > 00:42:48 verbose #28065 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:48 verbose #28066 > > inl to_array' forall dim t. (items : seq' t) : a dim t = 00:42:48 verbose #28067 > > backend_switch { 00:42:48 verbose #28068 > > Fsharp = fun () => items |> $'Seq.toArray' : a dim t 00:42:48 verbose #28069 > > Python = fun () => $'!items ' : a dim t 00:42:48 verbose #28070 > > } 00:42:49 verbose #28071 > > 00:42:49 verbose #28072 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:49 verbose #28073 > > //// test 00:42:49 verbose #28074 > > 00:42:49 verbose #28075 > > (a ;[[ "a"; "b" ]] : _ i32 _) 00:42:49 verbose #28076 > > |> of_array' 00:42:49 verbose #28077 > > |> to_array' 00:42:49 verbose #28078 > > |> _assert_eq' (a ;[[ "a"; "b" ]] : _ i32 _) 00:42:49 verbose #28079 > > 00:42:49 verbose #28080 > > ╭─[ 501.52ms - stdout ]────────────────────────────────────────────────────────╮ 00:42:49 verbose #28081 > > │ __assert_eq' / actual: [|"a"; "b"|] / expected: [|"a"; "b"|] │ 00:42:49 verbose #28082 > > │ │ 00:42:49 verbose #28083 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:49 verbose #28084 > > 00:42:49 verbose #28085 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:49 verbose #28086 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:49 verbose #28087 > > │ ### of_list' │ 00:42:49 verbose #28088 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:49 verbose #28089 > > 00:42:49 verbose #28090 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:49 verbose #28091 > > inl of_list' forall t. (items : listm'.list' t) : seq' t = 00:42:49 verbose #28092 > > backend_switch { 00:42:49 verbose #28093 > > Fsharp = fun () => $'seq { for i = 0 to !items.Length - 1 do yield 00:42:49 verbose #28094 > > !items.[[i]] }' : seq' t 00:42:49 verbose #28095 > > Python = fun () => $'!items ' : seq' t 00:42:49 verbose #28096 > > } 00:42:50 verbose #28097 > > 00:42:50 verbose #28098 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:50 verbose #28099 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:50 verbose #28100 > > │ ### to_list' │ 00:42:50 verbose #28101 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:50 verbose #28102 > > 00:42:50 verbose #28103 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:50 verbose #28104 > > inl to_list' forall t. (items : seq' t) : listm'.list' t = 00:42:50 verbose #28105 > > backend_switch { 00:42:50 verbose #28106 > > Fsharp = fun () => items |> $'Seq.toList' : listm'.list' t 00:42:50 verbose #28107 > > Python = fun () => $'!items ' : listm'.list' t 00:42:50 verbose #28108 > > } 00:42:51 verbose #28109 > > 00:42:51 verbose #28110 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:51 verbose #28111 > > //// test 00:42:51 verbose #28112 > > 00:42:51 verbose #28113 > > (a ;[[ "a"; "b" ]] : _ i32 _) 00:42:51 verbose #28114 > > |> of_array 00:42:51 verbose #28115 > > |> to_list' 00:42:51 verbose #28116 > > |> listm'.unbox 00:42:51 verbose #28117 > > |> _assert_eq ([[ "a"; "b" ]]) 00:42:51 verbose #28118 > > 00:42:51 verbose #28119 > > ╭─[ 591.98ms - stdout ]────────────────────────────────────────────────────────╮ 00:42:51 verbose #28120 > > │ __assert_eq / actual: UH0_1 ("a", UH0_1 ("b", UH0_0)) / expected: UH0_1 │ 00:42:51 verbose #28121 > > │ ("a", UH0_1 ("b", UH0_0)) │ 00:42:51 verbose #28122 > > │ │ 00:42:51 verbose #28123 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:51 verbose #28124 > > 00:42:51 verbose #28125 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:51 verbose #28126 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:51 verbose #28127 > > │ ### rev' │ 00:42:51 verbose #28128 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:51 verbose #28129 > > 00:42:51 verbose #28130 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:51 verbose #28131 > > inl rev'' forall t u. (items : t) : seq' u = 00:42:51 verbose #28132 > > backend_switch { 00:42:51 verbose #28133 > > Fsharp = fun () => items |> $'Seq.rev' : seq' u 00:42:51 verbose #28134 > > Python = fun () => $'reversed(!items)' : seq' u 00:42:51 verbose #28135 > > } 00:42:52 verbose #28136 > > 00:42:52 verbose #28137 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:52 verbose #28138 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:52 verbose #28139 > > │ ## rust │ 00:42:52 verbose #28140 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:52 verbose #28141 > > 00:42:52 verbose #28142 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:42:52 verbose #28143 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:42:52 verbose #28144 > > │ ### fuse │ 00:42:52 verbose #28145 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:42:52 verbose #28146 > > 00:42:52 verbose #28147 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:42:52 verbose #28148 > > nominal fuse t = 00:42:52 verbose #28149 > > `( 00:42:52 verbose #28150 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:42:52 verbose #28151 > > Fable.Core.Emit(\"core::iter::Fuse<$0>\")>]]\n#endif\ntype core_iter_Fuse<'T> = 00:42:52 verbose #28152 > > class end" 00:42:52 verbose #28153 > > $'' : $'core_iter_Fuse<`t>' 00:42:52 verbose #28154 > > ) 00:42:52 verbose #28155 > 00:00:38 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 50263 } 00:42:52 verbose #28156 > 00:00:38 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:42:52 verbose #28157 > "nbconvert", 00:42:52 verbose #28158 > "c:/home/git/polyglot/lib/spiral/seq.dib.ipynb", 00:42:52 verbose #28159 > "--to", 00:42:52 verbose #28160 > "html", 00:42:52 verbose #28161 > "--HTMLExporter.theme=dark", 00:42:52 verbose #28162 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/seq.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:42:55 verbose #28163 > 00:00:40 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/seq.dib.ipynb to html 00:42:55 verbose #28164 > 00:00:40 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:42:55 verbose #28165 > 00:00:40 verbose #7 ! validate(nb) 00:42:57 verbose #28166 > 00:00:42 verbose #8 ! [NbConvertApp] Writing 385656 bytes to c:\home\git\polyglot\lib\spiral\seq.dib.html 00:42:57 verbose #28167 > 00:00:42 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 637 } 00:42:57 verbose #28168 > 00:00:42 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 637 } 00:42:57 verbose #28169 > 00:00:42 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:42:57 verbose #28170 > "-c", 00:42:57 verbose #28171 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/seq.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:42:57 verbose #28172 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/seq.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:42:58 verbose #28173 > 00:00:43 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:42:58 verbose #28174 > 00:00:43 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:42:58 verbose #28175 > 00:00:43 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 50959 } 00:42:58 debug #28176 runtime.execute_with_options_async / { exit_code = 0; output_length = 55592 } 00:42:58 debug #33 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path seq.dib --retries 3 00:42:58 debug #28177 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path env.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:42:58 verbose #28178 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "env.dib", "--retries", "3"])) } 00:42:58 verbose #28179 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:42:58 verbose #28180 > "repl", 00:42:58 verbose #28181 > "--exit-after-run", 00:42:58 verbose #28182 > "--run", 00:42:58 verbose #28183 > "c:/home/git/polyglot/lib/spiral/env.dib", 00:42:58 verbose #28184 > "--output-path", 00:42:58 verbose #28185 > "c:/home/git/polyglot/lib/spiral/env.dib.ipynb", 00:42:58 verbose #28186 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/env.dib" --output-path "c:/home/git/polyglot/lib/spiral/env.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:43:00 verbose #28187 > > 00:43:00 verbose #28188 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:00 verbose #28189 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:00 verbose #28190 > > │ # env │ 00:43:00 verbose #28191 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:00 verbose #28192 > > 00:43:00 verbose #28193 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:00 verbose #28194 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:00 verbose #28195 > > │ ## rust │ 00:43:00 verbose #28196 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:00 verbose #28197 > > 00:43:00 verbose #28198 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:00 verbose #28199 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:00 verbose #28200 > > │ ### var_error │ 00:43:00 verbose #28201 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:04 verbose #28202 > > 00:43:04 verbose #28203 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:04 verbose #28204 > > nominal var_error = 00:43:04 verbose #28205 > > `( 00:43:04 verbose #28206 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:43:04 verbose #28207 > > Fable.Core.Emit(\"std::env::VarError\")>]]\n#endif\ntype std_env_VarError = 00:43:04 verbose #28208 > > class end" 00:43:04 verbose #28209 > > $'' : $'std_env_VarError' 00:43:04 verbose #28210 > > ) 00:43:05 verbose #28211 > > 00:43:05 verbose #28212 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:05 verbose #28213 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:05 verbose #28214 > > │ ### get_environment_variable_comptime │ 00:43:05 verbose #28215 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:05 verbose #28216 > > 00:43:05 verbose #28217 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:05 verbose #28218 > > inl get_environment_variable_comptime (var : string) : string = 00:43:05 verbose #28219 > > run_target_args (fun () => var) function 00:43:05 verbose #28220 > > | Rust _ => fun var => 00:43:05 verbose #28221 > > open rust.rust_operators 00:43:05 verbose #28222 > > !\($'"env\!(\\\"" + !var + "\\\")"') 00:43:05 verbose #28223 > > |> sm'.ref_to_std_string 00:43:05 verbose #28224 > > |> sm'.from_std_string 00:43:05 verbose #28225 > > | target => fun _ => null () 00:43:06 verbose #28226 > > 00:43:06 verbose #28227 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:06 verbose #28228 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:06 verbose #28229 > > │ ## python │ 00:43:06 verbose #28230 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:06 verbose #28231 > > 00:43:06 verbose #28232 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:06 verbose #28233 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:06 verbose #28234 > > │ ### os_environ │ 00:43:06 verbose #28235 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:06 verbose #28236 > > 00:43:06 verbose #28237 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:06 verbose #28238 > > nominal os_environ = any 00:43:06 verbose #28239 > > 00:43:06 verbose #28240 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:06 verbose #28241 > > inl os_environ () : os_environ = 00:43:06 verbose #28242 > > backend_switch { 00:43:06 verbose #28243 > > Fsharp = fun () => 00:43:06 verbose #28244 > > open python_operators 00:43:06 verbose #28245 > > global "type IOsEnviron = abstract environ: x: unit -> obj" 00:43:06 verbose #28246 > > inl os : $'IOsEnviron' = python.import_all "os" 00:43:06 verbose #28247 > > !\($'"!os.environ"') : os_environ 00:43:06 verbose #28248 > > Python = fun () => 00:43:06 verbose #28249 > > global "import os" 00:43:06 verbose #28250 > > $'os.environ' : os_environ 00:43:06 verbose #28251 > > } 00:43:06 verbose #28252 > > 00:43:06 verbose #28253 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:06 verbose #28254 > > inl environ_get (key : string) (os_environ : os_environ) : string = 00:43:06 verbose #28255 > > backend_switch { 00:43:06 verbose #28256 > > Fsharp = fun () => 00:43:06 verbose #28257 > > open python_operators 00:43:06 verbose #28258 > > !\\(key, $'"!os_environ.get($0)"') : string 00:43:06 verbose #28259 > > Python = fun () => 00:43:06 verbose #28260 > > $'!os_environ.get(!key)' : string 00:43:06 verbose #28261 > > } 00:43:07 verbose #28262 > > 00:43:07 verbose #28263 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:07 verbose #28264 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:07 verbose #28265 > > │ ## env │ 00:43:07 verbose #28266 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:07 verbose #28267 > > 00:43:07 verbose #28268 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:07 verbose #28269 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:07 verbose #28270 > > │ ### get_environment_variable │ 00:43:07 verbose #28271 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:07 verbose #28272 > > 00:43:07 verbose #28273 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:07 verbose #28274 > > let get_environment_variable (var : string) : string = 00:43:07 verbose #28275 > > run_target function 00:43:07 verbose #28276 > > | Rust _ => fun () => 00:43:07 verbose #28277 > > open rust.rust_operators 00:43:07 verbose #28278 > > !\\(var, $'"std::env::var(&*$0)"') 00:43:07 verbose #28279 > > |> fun x => x : resultm.result' sm'.std_string var_error 00:43:07 verbose #28280 > > |> resultm.map' sm'.from_std_string 00:43:07 verbose #28281 > > |> resultm.unwrap_or' (join "") 00:43:07 verbose #28282 > > | Fsharp _ => fun () => 00:43:07 verbose #28283 > > var 00:43:07 verbose #28284 > > |> $'System.Environment.GetEnvironmentVariable' 00:43:07 verbose #28285 > > |> optionm'.of_obj 00:43:07 verbose #28286 > > |> optionm'.unbox 00:43:07 verbose #28287 > > |> optionm'.default_value "" 00:43:07 verbose #28288 > > | TypeScript _ => fun () => 00:43:07 verbose #28289 > > open typescript_operators 00:43:07 verbose #28290 > > !\\(var, $'"process.env[[$0]] ?? \\\"\\\""') 00:43:07 verbose #28291 > > | Python _ | Cuda _ => fun () => 00:43:07 verbose #28292 > > os_environ () 00:43:07 verbose #28293 > > |> environ_get var 00:43:07 verbose #28294 > > |> optionm'.of_obj 00:43:07 verbose #28295 > > |> optionm'.unbox 00:43:07 verbose #28296 > > |> optionm'.default_value "" 00:43:07 verbose #28297 > > | target => fun () => failwith $'$"env.get_environment_variable 00:43:07 verbose #28298 > > target: {!target} / var: {!var}"' 00:43:07 verbose #28299 > > 00:43:07 verbose #28300 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:07 verbose #28301 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:07 verbose #28302 > > │ ### get_entry_assembly_name │ 00:43:07 verbose #28303 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:07 verbose #28304 > > 00:43:07 verbose #28305 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:07 verbose #28306 > > let get_entry_assembly_name () : string = 00:43:07 verbose #28307 > > run_target function 00:43:07 verbose #28308 > > | Rust _ => fun () => 00:43:07 verbose #28309 > > (join "CARGO_PKG_NAME") |> get_environment_variable 00:43:07 verbose #28310 > > | Fsharp _ => fun () => 00:43:07 verbose #28311 > > $'System.Reflection.Assembly.GetEntryAssembly().GetName().Name' 00:43:07 verbose #28312 > > | target => fun () => failwith $'$"env.get_entry_assembly_name / target: 00:43:07 verbose #28313 > > {!target}"' 00:43:08 verbose #28314 > > 00:43:08 verbose #28315 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:08 verbose #28316 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:08 verbose #28317 > > │ ### append_path │ 00:43:08 verbose #28318 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:08 verbose #28319 > > 00:43:08 verbose #28320 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:08 verbose #28321 > > inl append_path (path : string) : option string = 00:43:08 verbose #28322 > > inl env_path = "PATH" |> get_environment_variable 00:43:08 verbose #28323 > > if env_path = "" 00:43:08 verbose #28324 > > then None 00:43:08 verbose #28325 > > else 00:43:08 verbose #28326 > > inl env_sep = 00:43:08 verbose #28327 > > if platform.is_windows () 00:43:08 verbose #28328 > > then ";" 00:43:08 verbose #28329 > > else ":" 00:43:08 verbose #28330 > > Some $'$"{!path}{!env_sep}{!env_path}"' 00:43:08 verbose #28331 > 00:00:10 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 6822 } 00:43:08 verbose #28332 > 00:00:10 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:43:08 verbose #28333 > "nbconvert", 00:43:08 verbose #28334 > "c:/home/git/polyglot/lib/spiral/env.dib.ipynb", 00:43:08 verbose #28335 > "--to", 00:43:08 verbose #28336 > "html", 00:43:08 verbose #28337 > "--HTMLExporter.theme=dark", 00:43:08 verbose #28338 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/env.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:43:11 verbose #28339 > 00:00:12 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/env.dib.ipynb to html 00:43:11 verbose #28340 > 00:00:12 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:43:11 verbose #28341 > 00:00:12 verbose #7 ! validate(nb) 00:43:12 verbose #28342 > 00:00:14 verbose #8 ! [NbConvertApp] Writing 290902 bytes to c:\home\git\polyglot\lib\spiral\env.dib.html 00:43:12 verbose #28343 > 00:00:14 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 637 } 00:43:12 verbose #28344 > 00:00:14 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 637 } 00:43:12 verbose #28345 > 00:00:14 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:43:12 verbose #28346 > "-c", 00:43:12 verbose #28347 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/env.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:43:12 verbose #28348 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/env.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:43:13 verbose #28349 > 00:00:14 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:43:13 verbose #28350 > 00:00:14 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:43:13 verbose #28351 > 00:00:14 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 7518 } 00:43:13 debug #28352 runtime.execute_with_options_async / { exit_code = 0; output_length = 10455 } 00:43:13 debug #34 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path env.dib --retries 3 00:43:13 debug #28353 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path python.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:43:13 verbose #28354 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "python.dib", "--retries", "3"])) } 00:43:13 verbose #28355 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:43:13 verbose #28356 > "repl", 00:43:13 verbose #28357 > "--exit-after-run", 00:43:13 verbose #28358 > "--run", 00:43:13 verbose #28359 > "c:/home/git/polyglot/lib/spiral/python.dib", 00:43:13 verbose #28360 > "--output-path", 00:43:13 verbose #28361 > "c:/home/git/polyglot/lib/spiral/python.dib.ipynb", 00:43:13 verbose #28362 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/python.dib" --output-path "c:/home/git/polyglot/lib/spiral/python.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:43:15 verbose #28363 > > 00:43:15 verbose #28364 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:15 verbose #28365 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:15 verbose #28366 > > │ # python │ 00:43:15 verbose #28367 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:15 verbose #28368 > > 00:43:15 verbose #28369 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:15 verbose #28370 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:15 verbose #28371 > > │ ### emit_expr │ 00:43:15 verbose #28372 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:19 verbose #28373 > > 00:43:19 verbose #28374 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:19 verbose #28375 > > inl emit_expr forall a t. (args : a) (code : string) : t = 00:43:19 verbose #28376 > > real 00:43:19 verbose #28377 > > $'Fable.Core.PyInterop.emitPyExpr !args !code ' : t 00:43:20 verbose #28378 > > 00:43:20 verbose #28379 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:20 verbose #28380 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:20 verbose #28381 > > │ ### │ 00:43:20 verbose #28382 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:20 verbose #28383 > > 00:43:20 verbose #28384 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:20 verbose #28385 > > inl (~!\) forall t. (code : string) : t = 00:43:20 verbose #28386 > > emit_expr () code 00:43:20 verbose #28387 > > 00:43:20 verbose #28388 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:20 verbose #28389 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:20 verbose #28390 > > │ ### │ 00:43:20 verbose #28391 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:20 verbose #28392 > > 00:43:20 verbose #28393 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:20 verbose #28394 > > inl (~!\\) forall t u. ((args : t), (code : string)) : u = 00:43:20 verbose #28395 > > emit_expr args code 00:43:21 verbose #28396 > > 00:43:21 verbose #28397 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:21 verbose #28398 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:21 verbose #28399 > > │ ### │ 00:43:21 verbose #28400 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:21 verbose #28401 > > 00:43:21 verbose #28402 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:21 verbose #28403 > > inl import_all forall t. (file : string) : t = 00:43:21 verbose #28404 > > real 00:43:21 verbose #28405 > > $'Fable.Core.PyInterop.importAll !file ' : t 00:43:21 verbose #28406 > > 00:43:21 verbose #28407 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:21 verbose #28408 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:21 verbose #28409 > > │ ### │ 00:43:21 verbose #28410 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:21 verbose #28411 > > 00:43:21 verbose #28412 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:21 verbose #28413 > > inl import forall t. (name : string) (file : string) : t = 00:43:21 verbose #28414 > > real 00:43:21 verbose #28415 > > $'Fable.Core.PyInterop.import !name !file ' : t 00:43:22 verbose #28416 > 00:00:09 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 2867 } 00:43:22 verbose #28417 > 00:00:09 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:43:22 verbose #28418 > "nbconvert", 00:43:22 verbose #28419 > "c:/home/git/polyglot/lib/spiral/python.dib.ipynb", 00:43:22 verbose #28420 > "--to", 00:43:22 verbose #28421 > "html", 00:43:22 verbose #28422 > "--HTMLExporter.theme=dark", 00:43:22 verbose #28423 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/python.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:43:24 verbose #28424 > 00:00:11 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/python.dib.ipynb to html 00:43:24 verbose #28425 > 00:00:11 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:43:24 verbose #28426 > 00:00:11 verbose #7 ! validate(nb) 00:43:25 verbose #28427 > 00:00:12 verbose #8 ! [NbConvertApp] Writing 278637 bytes to c:\home\git\polyglot\lib\spiral\python.dib.html 00:43:25 verbose #28428 > 00:00:12 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 643 } 00:43:25 verbose #28429 > 00:00:12 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 643 } 00:43:25 verbose #28430 > 00:00:12 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:43:25 verbose #28431 > "-c", 00:43:25 verbose #28432 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/python.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:43:25 verbose #28433 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/python.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:43:26 verbose #28434 > 00:00:13 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:43:26 verbose #28435 > 00:00:13 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:43:26 verbose #28436 > 00:00:13 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 3569 } 00:43:26 debug #28437 runtime.execute_with_options_async / { exit_code = 0; output_length = 6351 } 00:43:26 debug #35 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path python.dib --retries 3 00:43:26 debug #28438 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path typescript.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:43:26 verbose #28439 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "typescript.dib", "--retries", "3"])) } 00:43:26 verbose #28440 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:43:26 verbose #28441 > "repl", 00:43:26 verbose #28442 > "--exit-after-run", 00:43:26 verbose #28443 > "--run", 00:43:26 verbose #28444 > "c:/home/git/polyglot/lib/spiral/typescript.dib", 00:43:26 verbose #28445 > "--output-path", 00:43:26 verbose #28446 > "c:/home/git/polyglot/lib/spiral/typescript.dib.ipynb", 00:43:26 verbose #28447 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/typescript.dib" --output-path "c:/home/git/polyglot/lib/spiral/typescript.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:43:28 verbose #28448 > > 00:43:28 verbose #28449 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:28 verbose #28450 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:28 verbose #28451 > > │ # typescript │ 00:43:28 verbose #28452 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:28 verbose #28453 > > 00:43:28 verbose #28454 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:28 verbose #28455 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:28 verbose #28456 > > │ ### emit_expr │ 00:43:28 verbose #28457 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:32 verbose #28458 > > 00:43:32 verbose #28459 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:32 verbose #28460 > > inl emit_expr forall a t. (args : a) (code : string) : t = 00:43:32 verbose #28461 > > real 00:43:32 verbose #28462 > > $'Fable.Core.JsInterop.emitJsExpr !args !code ' : t 00:43:34 verbose #28463 > > 00:43:34 verbose #28464 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:34 verbose #28465 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:34 verbose #28466 > > │ ### │ 00:43:34 verbose #28467 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:34 verbose #28468 > > 00:43:34 verbose #28469 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:34 verbose #28470 > > inl (~!\) forall t. (code : string) : t = 00:43:34 verbose #28471 > > emit_expr () code 00:43:34 verbose #28472 > > 00:43:34 verbose #28473 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:34 verbose #28474 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:34 verbose #28475 > > │ ### │ 00:43:34 verbose #28476 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:34 verbose #28477 > > 00:43:34 verbose #28478 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:34 verbose #28479 > > inl (~!\\) forall t u. ((args : t), (code : string)) : u = 00:43:34 verbose #28480 > > emit_expr args code 00:43:35 verbose #28481 > > 00:43:35 verbose #28482 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:35 verbose #28483 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:35 verbose #28484 > > │ ### │ 00:43:35 verbose #28485 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:35 verbose #28486 > > 00:43:35 verbose #28487 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:35 verbose #28488 > > inl import_all forall t. (file : string) : t = 00:43:35 verbose #28489 > > real 00:43:35 verbose #28490 > > $'Fable.Core.JsInterop.importAll !file ' : t 00:43:35 verbose #28491 > > 00:43:35 verbose #28492 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:35 verbose #28493 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:35 verbose #28494 > > │ ### │ 00:43:35 verbose #28495 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:35 verbose #28496 > > 00:43:35 verbose #28497 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:35 verbose #28498 > > inl import forall t. (name : string) (file : string) : t = 00:43:35 verbose #28499 > > real 00:43:35 verbose #28500 > > $'Fable.Core.JsInterop.import !name !file ' : t 00:43:36 verbose #28501 > 00:00:09 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 2867 } 00:43:36 verbose #28502 > 00:00:09 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:43:36 verbose #28503 > "nbconvert", 00:43:36 verbose #28504 > "c:/home/git/polyglot/lib/spiral/typescript.dib.ipynb", 00:43:36 verbose #28505 > "--to", 00:43:36 verbose #28506 > "html", 00:43:36 verbose #28507 > "--HTMLExporter.theme=dark", 00:43:36 verbose #28508 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/typescript.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:43:38 verbose #28509 > 00:00:11 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/typescript.dib.ipynb to html 00:43:38 verbose #28510 > 00:00:11 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:43:38 verbose #28511 > 00:00:11 verbose #7 ! validate(nb) 00:43:39 verbose #28512 > 00:00:13 verbose #8 ! [NbConvertApp] Writing 278653 bytes to c:\home\git\polyglot\lib\spiral\typescript.dib.html 00:43:39 verbose #28513 > 00:00:13 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 651 } 00:43:39 verbose #28514 > 00:00:13 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 651 } 00:43:39 verbose #28515 > 00:00:13 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:43:39 verbose #28516 > "-c", 00:43:39 verbose #28517 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/typescript.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:43:39 verbose #28518 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/typescript.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:43:40 verbose #28519 > 00:00:13 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:43:40 verbose #28520 > 00:00:13 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:43:40 verbose #28521 > 00:00:13 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 3577 } 00:43:40 debug #28522 runtime.execute_with_options_async / { exit_code = 0; output_length = 6395 } 00:43:40 debug #36 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path typescript.dib --retries 3 00:43:40 debug #28523 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path file_system.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:43:40 verbose #28524 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "file_system.dib", "--retries", "3"])) } 00:43:40 verbose #28525 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:43:40 verbose #28526 > "repl", 00:43:40 verbose #28527 > "--exit-after-run", 00:43:40 verbose #28528 > "--run", 00:43:40 verbose #28529 > "c:/home/git/polyglot/lib/spiral/file_system.dib", 00:43:40 verbose #28530 > "--output-path", 00:43:40 verbose #28531 > "c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb", 00:43:40 verbose #28532 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/file_system.dib" --output-path "c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:43:42 verbose #28533 > > 00:43:42 verbose #28534 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:42 verbose #28535 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:42 verbose #28536 > > │ # file_system │ 00:43:42 verbose #28537 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:46 verbose #28538 > > 00:43:46 verbose #28539 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:46 verbose #28540 > > open sm'_operators 00:43:46 verbose #28541 > > open rust 00:43:46 verbose #28542 > > open rust_operators 00:43:47 verbose #28543 > > 00:43:47 verbose #28544 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:47 verbose #28545 > > //// test 00:43:47 verbose #28546 > > 00:43:47 verbose #28547 > > open testing 00:43:47 verbose #28548 > > 00:43:47 verbose #28549 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:47 verbose #28550 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:47 verbose #28551 > > │ ## fsharp │ 00:43:47 verbose #28552 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:47 verbose #28553 > > 00:43:47 verbose #28554 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:47 verbose #28555 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:47 verbose #28556 > > │ ### file_mode │ 00:43:47 verbose #28557 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:47 verbose #28558 > > 00:43:47 verbose #28559 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:47 verbose #28560 > > nominal file_mode' = $'System.IO.FileMode' 00:43:47 verbose #28561 > > 00:43:47 verbose #28562 > > union file_mode = 00:43:47 verbose #28563 > > | ModeCreateNew 00:43:47 verbose #28564 > > | ModeCreate 00:43:47 verbose #28565 > > | ModeOpen 00:43:47 verbose #28566 > > | ModeOpenOrCreate 00:43:47 verbose #28567 > > | Truncate 00:43:47 verbose #28568 > > | Append 00:43:47 verbose #28569 > > 00:43:47 verbose #28570 > > inl file_mode = function 00:43:47 verbose #28571 > > | ModeCreateNew => $'System.IO.FileMode.CreateNew' : file_mode' 00:43:47 verbose #28572 > > | ModeCreate => $'System.IO.FileMode.Create' : file_mode' 00:43:47 verbose #28573 > > | ModeOpen => $'System.IO.FileMode.Open' : file_mode' 00:43:47 verbose #28574 > > | ModeOpenOrCreate => $'System.IO.FileMode.OpenOrCreate' : file_mode' 00:43:47 verbose #28575 > > | Truncate => $'System.IO.FileMode.Truncate' : file_mode' 00:43:47 verbose #28576 > > | Append => $'System.IO.FileMode.Append' : file_mode' 00:43:48 verbose #28577 > > 00:43:48 verbose #28578 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:48 verbose #28579 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:48 verbose #28580 > > │ ### file_access │ 00:43:48 verbose #28581 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:48 verbose #28582 > > 00:43:48 verbose #28583 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:48 verbose #28584 > > nominal file_access' = $'System.IO.FileAccess' 00:43:48 verbose #28585 > > 00:43:48 verbose #28586 > > union file_access = 00:43:48 verbose #28587 > > | AccessRead 00:43:48 verbose #28588 > > | AccessWrite 00:43:48 verbose #28589 > > | AccessReadWrite 00:43:48 verbose #28590 > > 00:43:48 verbose #28591 > > inl file_access = function 00:43:48 verbose #28592 > > | AccessRead => $'System.IO.FileAccess.Read' : file_access' 00:43:48 verbose #28593 > > | AccessWrite => $'System.IO.FileAccess.ReadWrite' : file_access' 00:43:48 verbose #28594 > > | AccessReadWrite => $'System.IO.FileAccess.ReadWrite' : file_access' 00:43:48 verbose #28595 > > 00:43:48 verbose #28596 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:48 verbose #28597 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:48 verbose #28598 > > │ ### file_share │ 00:43:48 verbose #28599 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:48 verbose #28600 > > 00:43:48 verbose #28601 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:48 verbose #28602 > > nominal file_share' = $'System.IO.FileShare' 00:43:48 verbose #28603 > > 00:43:48 verbose #28604 > > union file_share = 00:43:48 verbose #28605 > > | ShareNone 00:43:48 verbose #28606 > > | ShareRead 00:43:48 verbose #28607 > > | ShareWrite 00:43:48 verbose #28608 > > | ShareReadWrite 00:43:48 verbose #28609 > > | ShareDelete 00:43:48 verbose #28610 > > 00:43:48 verbose #28611 > > inl file_share = function 00:43:48 verbose #28612 > > | ShareNone => $'System.IO.FileShare.None' : file_share' 00:43:48 verbose #28613 > > | ShareRead => $'System.IO.FileShare.Read' : file_share' 00:43:48 verbose #28614 > > | ShareWrite => $'System.IO.FileShare.Write' : file_share' 00:43:48 verbose #28615 > > | ShareReadWrite => $'System.IO.FileShare.ReadWrite' : file_share' 00:43:48 verbose #28616 > > | ShareDelete => $'System.IO.FileShare.Delete' : file_share' 00:43:49 verbose #28617 > > 00:43:49 verbose #28618 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:49 verbose #28619 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:49 verbose #28620 > > │ ### file_stream │ 00:43:49 verbose #28621 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:49 verbose #28622 > > 00:43:49 verbose #28623 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:49 verbose #28624 > > nominal file_stream' = $'System.IO.FileStream' 00:43:49 verbose #28625 > > 00:43:49 verbose #28626 > > inl file_stream (path : string) mode access share : file_stream' = 00:43:49 verbose #28627 > > run_target function 00:43:49 verbose #28628 > > | Fsharp (Native) => fun () => 00:43:49 verbose #28629 > > inl mode = mode |> file_mode 00:43:49 verbose #28630 > > inl access = access |> file_access 00:43:49 verbose #28631 > > inl share = share |> file_share 00:43:49 verbose #28632 > > $'new System.IO.FileStream (!path, !mode, !access, !share)' 00:43:49 verbose #28633 > > | _ => fun () => null () 00:43:49 verbose #28634 > > 00:43:49 verbose #28635 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:49 verbose #28636 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:49 verbose #28637 > > │ ### file_info │ 00:43:49 verbose #28638 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:49 verbose #28639 > > 00:43:49 verbose #28640 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:49 verbose #28641 > > nominal file_info = 00:43:49 verbose #28642 > > `( 00:43:49 verbose #28643 > > global "#if FABLE_COMPILER\ntype file_info = unit\n#else\ntype file_info 00:43:49 verbose #28644 > > = System.IO.FileInfo\n#endif\n" 00:43:49 verbose #28645 > > $'' : $'file_info' 00:43:49 verbose #28646 > > ) 00:43:49 verbose #28647 > > 00:43:49 verbose #28648 > > inl file_info (path : string) : file_info = 00:43:49 verbose #28649 > > run_target function 00:43:49 verbose #28650 > > | Fsharp (Native) => fun () => 00:43:49 verbose #28651 > > path |> $'`file_info ' 00:43:49 verbose #28652 > > | _ => fun () => null () 00:43:50 verbose #28653 > > 00:43:50 verbose #28654 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:50 verbose #28655 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:50 verbose #28656 > > │ ### directory_info │ 00:43:50 verbose #28657 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:50 verbose #28658 > > 00:43:50 verbose #28659 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:50 verbose #28660 > > nominal directory_info = $'System.IO.DirectoryInfo' 00:43:50 verbose #28661 > > 00:43:50 verbose #28662 > > inl directory_info (path : string) : directory_info = 00:43:50 verbose #28663 > > path |> $'`directory_info ' 00:43:50 verbose #28664 > > 00:43:50 verbose #28665 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:50 verbose #28666 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:50 verbose #28667 > > │ ### directory_info_exists │ 00:43:50 verbose #28668 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:50 verbose #28669 > > 00:43:50 verbose #28670 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:50 verbose #28671 > > inl directory_info_exists (info : directory_info) : bool = 00:43:50 verbose #28672 > > run_target function 00:43:50 verbose #28673 > > | Fsharp (Native) => fun () => 00:43:50 verbose #28674 > > $'!info.Exists' 00:43:50 verbose #28675 > > | _ => fun () => null () 00:43:50 verbose #28676 > > 00:43:50 verbose #28677 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:50 verbose #28678 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:50 verbose #28679 > > │ ### directory_info_creation_time │ 00:43:50 verbose #28680 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:50 verbose #28681 > > 00:43:50 verbose #28682 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:50 verbose #28683 > > inl directory_info_creation_time (info : directory_info) : date_time.date_time = 00:43:50 verbose #28684 > > run_target function 00:43:50 verbose #28685 > > | Fsharp (Native) => fun () => 00:43:50 verbose #28686 > > $'!info.CreationTime' 00:43:50 verbose #28687 > > | _ => fun () => null () 00:43:51 verbose #28688 > > 00:43:51 verbose #28689 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:51 verbose #28690 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:51 verbose #28691 > > │ ### directory_info_name │ 00:43:51 verbose #28692 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:51 verbose #28693 > > 00:43:51 verbose #28694 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:51 verbose #28695 > > inl directory_info_name (info : directory_info) : string = 00:43:51 verbose #28696 > > run_target function 00:43:51 verbose #28697 > > | Fsharp (Native) => fun () => 00:43:51 verbose #28698 > > $'!info.Name' 00:43:51 verbose #28699 > > | _ => fun () => null () 00:43:51 verbose #28700 > > 00:43:51 verbose #28701 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:51 verbose #28702 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:51 verbose #28703 > > │ ### directory_info_full_name │ 00:43:51 verbose #28704 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:51 verbose #28705 > > 00:43:51 verbose #28706 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:51 verbose #28707 > > inl directory_info_full_name (info : directory_info) : string = 00:43:51 verbose #28708 > > run_target function 00:43:51 verbose #28709 > > | Fsharp (Native) => fun () => 00:43:51 verbose #28710 > > $'!info.FullName' 00:43:51 verbose #28711 > > | _ => fun () => null () 00:43:52 verbose #28712 > > 00:43:52 verbose #28713 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:52 verbose #28714 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:52 verbose #28715 > > │ ### file_attributes │ 00:43:52 verbose #28716 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:52 verbose #28717 > > 00:43:52 verbose #28718 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:52 verbose #28719 > > nominal file_attributes = $'System.IO.FileAttributes' 00:43:52 verbose #28720 > > 00:43:52 verbose #28721 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:52 verbose #28722 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:52 verbose #28723 > > │ ### directory_info_attributes │ 00:43:52 verbose #28724 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:52 verbose #28725 > > 00:43:52 verbose #28726 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:52 verbose #28727 > > inl directory_info_attributes (info : directory_info) : file_attributes = 00:43:52 verbose #28728 > > run_target function 00:43:52 verbose #28729 > > | Fsharp (Native) => fun () => 00:43:52 verbose #28730 > > $'!info.Attributes' 00:43:52 verbose #28731 > > | _ => fun () => null () 00:43:53 verbose #28732 > > 00:43:53 verbose #28733 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:53 verbose #28734 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:53 verbose #28735 > > │ ### file_attributes_reparse_point │ 00:43:53 verbose #28736 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:53 verbose #28737 > > 00:43:53 verbose #28738 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:53 verbose #28739 > > inl file_attributes_reparse_point () : file_attributes = 00:43:53 verbose #28740 > > run_target function 00:43:53 verbose #28741 > > | Fsharp (Native) => fun () => 00:43:53 verbose #28742 > > $'`file_attributes.ReparsePoint' 00:43:53 verbose #28743 > > | _ => fun () => null () 00:43:53 verbose #28744 > > 00:43:53 verbose #28745 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:53 verbose #28746 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:53 verbose #28747 > > │ ### file_attributes_has_flag │ 00:43:53 verbose #28748 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:53 verbose #28749 > > 00:43:53 verbose #28750 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:53 verbose #28751 > > inl file_attributes_has_flag (flag : file_attributes) (file_attributes : 00:43:53 verbose #28752 > > file_attributes) : bool = 00:43:53 verbose #28753 > > run_target function 00:43:53 verbose #28754 > > | Fsharp (Native) => fun () => 00:43:53 verbose #28755 > > $'!file_attributes.HasFlag !flag ' 00:43:53 verbose #28756 > > | _ => fun () => null () 00:43:53 verbose #28757 > > 00:43:53 verbose #28758 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:53 verbose #28759 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:53 verbose #28760 > > │ ### create_directory │ 00:43:53 verbose #28761 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:53 verbose #28762 > > 00:43:53 verbose #28763 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:53 verbose #28764 > > inl create_directory (path : string) : directory_info = 00:43:53 verbose #28765 > > run_target function 00:43:53 verbose #28766 > > | Fsharp (Native) => fun () => 00:43:53 verbose #28767 > > path |> $'System.IO.Directory.CreateDirectory' 00:43:53 verbose #28768 > > | _ => fun () => null () 00:43:54 verbose #28769 > > 00:43:54 verbose #28770 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:54 verbose #28771 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:54 verbose #28772 > > │ ### directory_get_files │ 00:43:54 verbose #28773 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:54 verbose #28774 > > 00:43:54 verbose #28775 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:54 verbose #28776 > > inl directory_get_files (path : string) : array_base string = 00:43:54 verbose #28777 > > run_target function 00:43:54 verbose #28778 > > | Fsharp (Native) => fun () => 00:43:54 verbose #28779 > > path |> $'System.IO.Directory.GetFiles' 00:43:54 verbose #28780 > > | _ => fun () => null () 00:43:54 verbose #28781 > > 00:43:54 verbose #28782 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:54 verbose #28783 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:54 verbose #28784 > > │ ### file_move │ 00:43:54 verbose #28785 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:54 verbose #28786 > > 00:43:54 verbose #28787 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:54 verbose #28788 > > inl file_move (new_path : string) (old_path : string) : () = 00:43:54 verbose #28789 > > run_target function 00:43:54 verbose #28790 > > | Fsharp (Native) => fun () => 00:43:54 verbose #28791 > > $'System.IO.File.Move (!old_path, !new_path)' 00:43:54 verbose #28792 > > | _ => fun () => () 00:43:55 verbose #28793 > > 00:43:55 verbose #28794 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:55 verbose #28795 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:55 verbose #28796 > > │ ### read_all_text_async │ 00:43:55 verbose #28797 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:55 verbose #28798 > > 00:43:55 verbose #28799 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:55 verbose #28800 > > inl read_all_text_async (path : string) : _ string = 00:43:55 verbose #28801 > > run_target function 00:43:55 verbose #28802 > > | Fsharp (Native) => fun () => 00:43:55 verbose #28803 > > path |> $'System.IO.File.ReadAllTextAsync' |> async.await_task 00:43:55 verbose #28804 > > | _ => fun () => null () 00:43:55 verbose #28805 > > 00:43:55 verbose #28806 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:55 verbose #28807 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:55 verbose #28808 > > │ ### write_all_text_async │ 00:43:55 verbose #28809 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:55 verbose #28810 > > 00:43:55 verbose #28811 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:55 verbose #28812 > > inl write_all_text_async (path : string) (text : string) : _ () = 00:43:55 verbose #28813 > > run_target function 00:43:55 verbose #28814 > > | Fsharp (Native) => fun () => 00:43:55 verbose #28815 > > $'System.IO.File.WriteAllTextAsync (!path, !text)' |> 00:43:55 verbose #28816 > > async.await_task 00:43:55 verbose #28817 > > | _ => fun () => null () 00:43:56 verbose #28818 > > 00:43:56 verbose #28819 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:56 verbose #28820 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:56 verbose #28821 > > │ ### file_system_info │ 00:43:56 verbose #28822 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:56 verbose #28823 > > 00:43:56 verbose #28824 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:56 verbose #28825 > > nominal file_system_info = $'System.IO.FileSystemInfo' 00:43:56 verbose #28826 > > 00:43:56 verbose #28827 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:56 verbose #28828 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:56 verbose #28829 > > │ ### get_source_directory │ 00:43:56 verbose #28830 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:56 verbose #28831 > > 00:43:56 verbose #28832 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:56 verbose #28833 > > inl get_source_directory () = 00:43:56 verbose #28834 > > $'__SOURCE_DIRECTORY__' : string 00:43:57 verbose #28835 > > 00:43:57 verbose #28836 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:57 verbose #28837 > > //// test 00:43:57 verbose #28838 > > 00:43:57 verbose #28839 > > get_source_directory () 00:43:57 verbose #28840 > > |> directory_info 00:43:57 verbose #28841 > > |> directory_info_name 00:43:57 verbose #28842 > > |> _assert_eq "spiral" 00:43:58 verbose #28843 > > 00:43:58 verbose #28844 > > ╭─[ 1.31s - stdout ]───────────────────────────────────────────────────────────╮ 00:43:58 verbose #28845 > > │ __assert_eq / actual: "spiral" / expected: "spiral" │ 00:43:58 verbose #28846 > > │ │ 00:43:58 verbose #28847 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:58 verbose #28848 > > 00:43:58 verbose #28849 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:58 verbose #28850 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:58 verbose #28851 > > │ ## rust │ 00:43:58 verbose #28852 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:58 verbose #28853 > > 00:43:58 verbose #28854 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:58 verbose #28855 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:58 verbose #28856 > > │ ### display │ 00:43:58 verbose #28857 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:58 verbose #28858 > > 00:43:58 verbose #28859 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:58 verbose #28860 > > nominal display = 00:43:58 verbose #28861 > > `( 00:43:58 verbose #28862 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:43:58 verbose #28863 > > Fable.Core.Emit(\"std::path::Display\")>]]\ntype std_path_Display = class 00:43:58 verbose #28864 > > end\n#else\ntype std_path_Display = string\n#endif\n" 00:43:58 verbose #28865 > > $'' : $'std_path_Display' 00:43:58 verbose #28866 > > ) 00:43:58 verbose #28867 > > 00:43:58 verbose #28868 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:58 verbose #28869 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:58 verbose #28870 > > │ ### path │ 00:43:58 verbose #28871 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:58 verbose #28872 > > 00:43:58 verbose #28873 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:58 verbose #28874 > > nominal path = 00:43:58 verbose #28875 > > `( 00:43:58 verbose #28876 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:43:58 verbose #28877 > > Fable.Core.Emit(\"std::path::Path\")>]]\n#endif\ntype std_path_Path = class end" 00:43:58 verbose #28878 > > $'' : $'std_path_Path' 00:43:58 verbose #28879 > > ) 00:43:59 verbose #28880 > > 00:43:59 verbose #28881 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:59 verbose #28882 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:59 verbose #28883 > > │ ### path_buf │ 00:43:59 verbose #28884 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:59 verbose #28885 > > 00:43:59 verbose #28886 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:59 verbose #28887 > > nominal path_buf = 00:43:59 verbose #28888 > > `( 00:43:59 verbose #28889 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:43:59 verbose #28890 > > Fable.Core.Emit(\"std::path::PathBuf\")>]]\ntype std_path_PathBuf = class 00:43:59 verbose #28891 > > end\n#else\ntype std_path_PathBuf = string\n#endif\n" 00:43:59 verbose #28892 > > $'' : $'std_path_PathBuf' 00:43:59 verbose #28893 > > ) 00:43:59 verbose #28894 > > 00:43:59 verbose #28895 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:43:59 verbose #28896 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:43:59 verbose #28897 > > │ ### new_path_buf │ 00:43:59 verbose #28898 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:43:59 verbose #28899 > > 00:43:59 verbose #28900 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:43:59 verbose #28901 > > inl new_path_buf (path : sm'.std_string) : path_buf = 00:43:59 verbose #28902 > > run_target function 00:43:59 verbose #28903 > > | Rust _ => fun () => !\\(path, $'"std::path::PathBuf::from($0)"') 00:43:59 verbose #28904 > > | _ => fun () => path |> convert 00:44:00 verbose #28905 > > 00:44:00 verbose #28906 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:00 verbose #28907 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:00 verbose #28908 > > │ ### path_buf_from │ 00:44:00 verbose #28909 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:00 verbose #28910 > > 00:44:00 verbose #28911 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:00 verbose #28912 > > inl path_buf_from (path : rust.box path) : path_buf = 00:44:00 verbose #28913 > > !\\(path, $'"std::path::PathBuf::from($0)"') 00:44:00 verbose #28914 > > 00:44:00 verbose #28915 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:00 verbose #28916 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:00 verbose #28917 > > │ ### path_buf_join │ 00:44:00 verbose #28918 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:00 verbose #28919 > > 00:44:00 verbose #28920 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:00 verbose #28921 > > inl path_buf_join (s : string) (path_buf : path_buf) : path_buf = 00:44:00 verbose #28922 > > !\\((path_buf, s |> sm'.to_std_string), $'"$0.join($1)"') 00:44:01 verbose #28923 > > 00:44:01 verbose #28924 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:01 verbose #28925 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:01 verbose #28926 > > │ ### path_buf_strip_prefix │ 00:44:01 verbose #28927 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:01 verbose #28928 > > 00:44:01 verbose #28929 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:01 verbose #28930 > > inl path_buf_strip_prefix (s : string) (path_buf : path_buf) : path_buf = 00:44:01 verbose #28931 > > !\\((path_buf, s |> sm'.to_std_string), 00:44:01 verbose #28932 > > $'"$0.strip_prefix($1).unwrap().to_path_buf()"') 00:44:01 verbose #28933 > > 00:44:01 verbose #28934 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:01 verbose #28935 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:01 verbose #28936 > > │ ### path_display │ 00:44:01 verbose #28937 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:01 verbose #28938 > > 00:44:01 verbose #28939 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:01 verbose #28940 > > inl path_display (path : rust.ref path) : display = 00:44:01 verbose #28941 > > !\\(path, $'"$0.display()"') 00:44:01 verbose #28942 > > 00:44:01 verbose #28943 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:01 verbose #28944 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:01 verbose #28945 > > │ ### path_buf_display │ 00:44:01 verbose #28946 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:01 verbose #28947 > > 00:44:01 verbose #28948 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:01 verbose #28949 > > inl path_buf_display (path_buf : path_buf) : display = 00:44:01 verbose #28950 > > run_target_args (fun () => path_buf) function 00:44:01 verbose #28951 > > | Rust _ => fun path_buf => !\\(path_buf, $'"$0.display()"') 00:44:01 verbose #28952 > > | _ => fun path_buf => path_buf |> unbox 00:44:02 verbose #28953 > > 00:44:02 verbose #28954 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:02 verbose #28955 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:02 verbose #28956 > > │ ### path_buf_file_name │ 00:44:02 verbose #28957 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:02 verbose #28958 > > 00:44:02 verbose #28959 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:02 verbose #28960 > > inl path_buf_file_name (path : path_buf) : optionm'.option' (rust.ref 00:44:02 verbose #28961 > > sm'.os_str) = 00:44:02 verbose #28962 > > !\\(path, $'"$0.file_name()"') 00:44:02 verbose #28963 > > 00:44:02 verbose #28964 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:02 verbose #28965 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:02 verbose #28966 > > │ ### path_buf_exists │ 00:44:02 verbose #28967 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:02 verbose #28968 > > 00:44:02 verbose #28969 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:02 verbose #28970 > > inl path_buf_exists (path_buf : path_buf) : bool = 00:44:02 verbose #28971 > > !\\(path_buf, $'"$0.exists()"') 00:44:03 verbose #28972 > > 00:44:03 verbose #28973 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:03 verbose #28974 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:03 verbose #28975 > > │ ### path_buf_is_dir │ 00:44:03 verbose #28976 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:03 verbose #28977 > > 00:44:03 verbose #28978 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:03 verbose #28979 > > inl path_buf_is_dir (path_buf : path_buf) : bool = 00:44:03 verbose #28980 > > !\\(path_buf, $'"$0.is_dir()"') 00:44:03 verbose #28981 > > 00:44:03 verbose #28982 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:03 verbose #28983 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:03 verbose #28984 > > │ ### path_buf_is_file │ 00:44:03 verbose #28985 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:03 verbose #28986 > > 00:44:03 verbose #28987 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:03 verbose #28988 > > inl path_buf_is_file (path_buf : path_buf) : bool = 00:44:03 verbose #28989 > > !\\(path_buf, $'"$0.is_file()"') 00:44:04 verbose #28990 > > 00:44:04 verbose #28991 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:04 verbose #28992 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:04 verbose #28993 > > │ ### path_buf_is_symlink │ 00:44:04 verbose #28994 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:04 verbose #28995 > > 00:44:04 verbose #28996 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:04 verbose #28997 > > inl path_buf_is_symlink (path_buf : path_buf) : bool = 00:44:04 verbose #28998 > > !\\(path_buf, $'"$0.is_symlink()"') 00:44:04 verbose #28999 > > 00:44:04 verbose #29000 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:04 verbose #29001 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:04 verbose #29002 > > │ ### path_buf_parent │ 00:44:04 verbose #29003 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:04 verbose #29004 > > 00:44:04 verbose #29005 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:04 verbose #29006 > > inl path_buf_parent (path_buf : path_buf) : optionm'.option' path_buf = 00:44:04 verbose #29007 > > !\\(path_buf, $'"$0.parent().map(std::path::PathBuf::from)"') 00:44:05 verbose #29008 > > 00:44:05 verbose #29009 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:05 verbose #29010 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:05 verbose #29011 > > │ ### dir_entry │ 00:44:05 verbose #29012 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:05 verbose #29013 > > 00:44:05 verbose #29014 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:05 verbose #29015 > > nominal dir_entry = 00:44:05 verbose #29016 > > `( 00:44:05 verbose #29017 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:44:05 verbose #29018 > > Fable.Core.Emit(\"async_walkdir::DirEntry\")>]]\n#endif\ntype 00:44:05 verbose #29019 > > async_walkdir_DirEntry = class end" 00:44:05 verbose #29020 > > $'' : $'async_walkdir_DirEntry' 00:44:05 verbose #29021 > > ) 00:44:05 verbose #29022 > > 00:44:05 verbose #29023 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:05 verbose #29024 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:05 verbose #29025 > > │ ### walk_dir │ 00:44:05 verbose #29026 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:05 verbose #29027 > > 00:44:05 verbose #29028 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:05 verbose #29029 > > nominal walk_dir = 00:44:05 verbose #29030 > > `( 00:44:05 verbose #29031 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:44:05 verbose #29032 > > Fable.Core.Emit(\"async_walkdir::WalkDir\")>]]\n#endif\ntype 00:44:05 verbose #29033 > > async_walkdir_WalkDir = class end" 00:44:05 verbose #29034 > > $'' : $'async_walkdir_WalkDir' 00:44:05 verbose #29035 > > ) 00:44:05 verbose #29036 > > 00:44:05 verbose #29037 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:05 verbose #29038 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:05 verbose #29039 > > │ ### async_walkdir_filtering │ 00:44:05 verbose #29040 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:05 verbose #29041 > > 00:44:05 verbose #29042 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:05 verbose #29043 > > nominal async_walkdir_filtering = 00:44:05 verbose #29044 > > `( 00:44:05 verbose #29045 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:44:05 verbose #29046 > > Fable.Core.Emit(\"async_walkdir::Filtering\")>]]\n#endif\ntype 00:44:05 verbose #29047 > > async_walkdir_Filtering = class end" 00:44:05 verbose #29048 > > $'' : $'async_walkdir_Filtering' 00:44:05 verbose #29049 > > ) 00:44:06 verbose #29050 > > 00:44:06 verbose #29051 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:06 verbose #29052 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:06 verbose #29053 > > │ ### filtering │ 00:44:06 verbose #29054 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:06 verbose #29055 > > 00:44:06 verbose #29056 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:06 verbose #29057 > > union filtering = 00:44:06 verbose #29058 > > | Ignore 00:44:06 verbose #29059 > > | IgnoreDir 00:44:06 verbose #29060 > > | Continue 00:44:06 verbose #29061 > > 00:44:06 verbose #29062 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:06 verbose #29063 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:06 verbose #29064 > > │ ### async_walkdir_error │ 00:44:06 verbose #29065 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:06 verbose #29066 > > 00:44:06 verbose #29067 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:06 verbose #29068 > > nominal async_walkdir_error = 00:44:06 verbose #29069 > > `( 00:44:06 verbose #29070 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:44:06 verbose #29071 > > Fable.Core.Emit(\"async_walkdir::Error\")>]]\n#endif\ntype async_walkdir_Error = 00:44:06 verbose #29072 > > class end" 00:44:06 verbose #29073 > > $'' : $'async_walkdir_Error' 00:44:06 verbose #29074 > > ) 00:44:07 verbose #29075 > > 00:44:07 verbose #29076 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:07 verbose #29077 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:07 verbose #29078 > > │ ### new_walk_dir │ 00:44:07 verbose #29079 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:07 verbose #29080 > > 00:44:07 verbose #29081 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:07 verbose #29082 > > inl new_walk_dir (dir : string) : walk_dir = 00:44:07 verbose #29083 > > !\\(dir, $'"async_walkdir::WalkDir::new(&*$0)"') 00:44:07 verbose #29084 > > // inl walk_dir : walk_dir = walk_dir |> rust.to_mut 00:44:07 verbose #29085 > > // (!\($'"true; let mut !walk_dir = !walk_dir"') : bool) |> ignore 00:44:07 verbose #29086 > > 00:44:07 verbose #29087 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:07 verbose #29088 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:07 verbose #29089 > > │ ### walk_dir_filter │ 00:44:07 verbose #29090 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:07 verbose #29091 > > 00:44:07 verbose #29092 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:07 verbose #29093 > > inl walk_dir_filter (fn : dir_entry -> async.future_pin_send filtering) 00:44:07 verbose #29094 > > (walk_dir : walk_dir) : walk_dir = 00:44:07 verbose #29095 > > inl fn entry = async.new_future_send fun () => 00:44:07 verbose #29096 > > inl result = fn entry |> async.await_send 00:44:07 verbose #29097 > > inl filtering : async_walkdir_filtering = 00:44:07 verbose #29098 > > match result with 00:44:07 verbose #29099 > > | Ignore => !\($'"async_walkdir::Filtering::Ignore"') 00:44:07 verbose #29100 > > | IgnoreDir => !\($'"async_walkdir::Filtering::IgnoreDir"') 00:44:07 verbose #29101 > > | Continue => !\($'"async_walkdir::Filtering::Continue"') 00:44:07 verbose #29102 > > filtering 00:44:07 verbose #29103 > > !\\((walk_dir, fn), $'"async_walkdir::WalkDir::filter($0, |x| $1(x))"') 00:44:08 verbose #29104 > > 00:44:08 verbose #29105 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:08 verbose #29106 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:08 verbose #29107 > > │ ### file_type │ 00:44:08 verbose #29108 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:08 verbose #29109 > > 00:44:08 verbose #29110 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:08 verbose #29111 > > nominal file_type = 00:44:08 verbose #29112 > > `( 00:44:08 verbose #29113 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:44:08 verbose #29114 > > Fable.Core.Emit(\"std::fs::FileType\")>]]\n#endif\ntype std_fs_FileType = class 00:44:08 verbose #29115 > > end" 00:44:08 verbose #29116 > > $'' : $'std_fs_FileType' 00:44:08 verbose #29117 > > ) 00:44:08 verbose #29118 > > 00:44:08 verbose #29119 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:08 verbose #29120 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:08 verbose #29121 > > │ ### dir_entry_file_type │ 00:44:08 verbose #29122 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:08 verbose #29123 > > 00:44:08 verbose #29124 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:08 verbose #29125 > > inl dir_entry_file_type (dir_entry : dir_entry) : async.future_pin_send 00:44:08 verbose #29126 > > (resultm.result' file_type stream.io_error) = 00:44:08 verbose #29127 > > inl dir_entry = join dir_entry 00:44:08 verbose #29128 > > !\($'"Box::pin(async_walkdir::DirEntry::file_type(&!dir_entry))"') 00:44:09 verbose #29129 > > 00:44:09 verbose #29130 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:09 verbose #29131 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:09 verbose #29132 > > │ ### file_type_is_dir │ 00:44:09 verbose #29133 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:09 verbose #29134 > > 00:44:09 verbose #29135 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:09 verbose #29136 > > inl file_type_is_dir (file_type : file_type) : bool = 00:44:09 verbose #29137 > > inl file_type = join file_type 00:44:09 verbose #29138 > > !\($'"std::fs::FileType::is_dir(&!file_type)"') 00:44:09 verbose #29139 > > 00:44:09 verbose #29140 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:09 verbose #29141 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:09 verbose #29142 > > │ ### file │ 00:44:09 verbose #29143 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:09 verbose #29144 > > 00:44:09 verbose #29145 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:09 verbose #29146 > > nominal file = 00:44:09 verbose #29147 > > `( 00:44:09 verbose #29148 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:44:09 verbose #29149 > > Fable.Core.Emit(\"std::fs::File\")>]]\n#endif\ntype std_fs_File = class end" 00:44:09 verbose #29150 > > $'' : $'std_fs_File' 00:44:09 verbose #29151 > > ) 00:44:10 verbose #29152 > > 00:44:10 verbose #29153 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:10 verbose #29154 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:10 verbose #29155 > > │ ### file_open │ 00:44:10 verbose #29156 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:10 verbose #29157 > > 00:44:10 verbose #29158 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:10 verbose #29159 > > inl file_open (path : string) : resultm.result' file stream.io_error = 00:44:10 verbose #29160 > > !\($'"std::fs::File::open(&*!path)"') 00:44:10 verbose #29161 > > 00:44:10 verbose #29162 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:10 verbose #29163 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:10 verbose #29164 > > │ ### rename │ 00:44:10 verbose #29165 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:10 verbose #29166 > > 00:44:10 verbose #29167 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:10 verbose #29168 > > inl rename (to : string) (path : string) : resultm.result' () stream.io_error = 00:44:10 verbose #29169 > > !\($'"std::fs::rename(&*!path, &*!to)"') 00:44:10 verbose #29170 > > 00:44:10 verbose #29171 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:10 verbose #29172 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:10 verbose #29173 > > │ ### dir_entry_path │ 00:44:10 verbose #29174 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:10 verbose #29175 > > 00:44:10 verbose #29176 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:10 verbose #29177 > > inl dir_entry_path (dir_entry : dir_entry) : path_buf = 00:44:10 verbose #29178 > > !\\(dir_entry, $'"async_walkdir::DirEntry::path(&$0)"') 00:44:11 verbose #29179 > > 00:44:11 verbose #29180 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:11 verbose #29181 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:11 verbose #29182 > > │ ### create_dir_all │ 00:44:11 verbose #29183 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:11 verbose #29184 > > 00:44:11 verbose #29185 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:11 verbose #29186 > > inl create_dir_all (path : string) : resultm.result' () stream.io_error = 00:44:11 verbose #29187 > > !\\(path, $'"std::fs::create_dir_all(&*$0)"') 00:44:11 verbose #29188 > > 00:44:11 verbose #29189 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:11 verbose #29190 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:11 verbose #29191 > > │ ### file_info_link_target │ 00:44:11 verbose #29192 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:11 verbose #29193 > > 00:44:11 verbose #29194 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:11 verbose #29195 > > inl file_info_link_target (file_info : file_info) : string = 00:44:11 verbose #29196 > > run_target function 00:44:11 verbose #29197 > > | Fsharp (Native) => fun () => 00:44:11 verbose #29198 > > $'!file_info.LinkTarget' 00:44:11 verbose #29199 > > | _ => fun () => null () 00:44:12 verbose #29200 > > 00:44:12 verbose #29201 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:12 verbose #29202 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:12 verbose #29203 > > │ ### read │ 00:44:12 verbose #29204 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:12 verbose #29205 > > 00:44:12 verbose #29206 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:12 verbose #29207 > > inl read (path : string) : resultm.result' (am'.vec u8) stream.io_error = 00:44:12 verbose #29208 > > !\\(path, $'"std::fs::read(&*$0)"') 00:44:12 verbose #29209 > > 00:44:12 verbose #29210 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:12 verbose #29211 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:12 verbose #29212 > > │ ## typescript │ 00:44:12 verbose #29213 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:12 verbose #29214 > > 00:44:12 verbose #29215 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:12 verbose #29216 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:12 verbose #29217 > > │ ### ts_path_join │ 00:44:12 verbose #29218 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:12 verbose #29219 > > 00:44:12 verbose #29220 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:12 verbose #29221 > > inl ts_path_join (b : string) (a : string) : string = 00:44:12 verbose #29222 > > open typescript_operators 00:44:12 verbose #29223 > > global "type IPathJoin = abstract join: [[<System.ParamArray>]] paths: 00:44:12 verbose #29224 > > string[[]] -> string" 00:44:12 verbose #29225 > > inl path : $'IPathJoin' = typescript.import_all "path" 00:44:12 verbose #29226 > > !\\((join a, join b), $'"!path.join($0, $1)"') 00:44:12 verbose #29227 > > 00:44:12 verbose #29228 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:12 verbose #29229 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:12 verbose #29230 > > │ ## file_system │ 00:44:12 verbose #29231 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:12 verbose #29232 > > 00:44:12 verbose #29233 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:12 verbose #29234 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:12 verbose #29235 > > │ ### (< />) │ 00:44:12 verbose #29236 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:12 verbose #29237 > > 00:44:12 verbose #29238 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:12 verbose #29239 > > let (</>) (a : string) (b : string) : string = 00:44:12 verbose #29240 > > run_target function 00:44:12 verbose #29241 > > | Rust (Contract) => fun () => null () 00:44:12 verbose #29242 > > | Rust (Native) => fun () => 00:44:12 verbose #29243 > > a 00:44:12 verbose #29244 > > |> sm'.to_std_string 00:44:12 verbose #29245 > > |> new_path_buf 00:44:12 verbose #29246 > > |> path_buf_join b 00:44:12 verbose #29247 > > |> path_buf_display 00:44:12 verbose #29248 > > |> sm'.format' 00:44:12 verbose #29249 > > |> sm'.from_std_string 00:44:12 verbose #29250 > > | TypeScript (Native) => fun () => 00:44:12 verbose #29251 > > a |> ts_path_join b 00:44:12 verbose #29252 > > | Fsharp (Native) => fun () => 00:44:12 verbose #29253 > > $'System.IO.Path.Combine (!a, !b)' 00:44:12 verbose #29254 > > | target => fun () => failwith $'$"file_system.(</>) / target: {!target} 00:44:12 verbose #29255 > > / a: {!a} / b: {!b}"' 00:44:13 verbose #29256 > > 00:44:13 verbose #29257 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:13 verbose #29258 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:13 verbose #29259 > > │ ### get_temp_path │ 00:44:13 verbose #29260 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:13 verbose #29261 > > 00:44:13 verbose #29262 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:13 verbose #29263 > > let get_temp_path () : string = 00:44:13 verbose #29264 > > run_target function 00:44:13 verbose #29265 > > | Rust (Contract) => fun () => null () 00:44:13 verbose #29266 > > | Rust (Native) => fun () => 00:44:13 verbose #29267 > > !\($'"std::env::temp_dir()"') 00:44:13 verbose #29268 > > |> path_buf_display 00:44:13 verbose #29269 > > |> sm'.format' 00:44:13 verbose #29270 > > |> sm'.from_std_string 00:44:13 verbose #29271 > > | Fsharp (Native) => fun () => 00:44:13 verbose #29272 > > $'System.IO.Path.GetTempPath' () 00:44:13 verbose #29273 > > | target => fun () => failwith $'$"file_system.get_temp_path / target: 00:44:13 verbose #29274 > > {!target}"' 00:44:13 verbose #29275 > > 00:44:13 verbose #29276 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:13 verbose #29277 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:13 verbose #29278 > > │ ### get_file_name │ 00:44:13 verbose #29279 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:13 verbose #29280 > > 00:44:13 verbose #29281 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:13 verbose #29282 > > let get_file_name (path : string) : string = 00:44:13 verbose #29283 > > run_target function 00:44:13 verbose #29284 > > | Rust (Contract) => fun () => null () 00:44:13 verbose #29285 > > | Rust (Native) => fun () => 00:44:13 verbose #29286 > > path 00:44:13 verbose #29287 > > |> sm'.to_std_string 00:44:13 verbose #29288 > > |> new_path_buf 00:44:13 verbose #29289 > > |> path_buf_file_name 00:44:13 verbose #29290 > > |> optionm'.map' sm'.from_os_str_ref 00:44:13 verbose #29291 > > |> optionm'.unbox 00:44:13 verbose #29292 > > |> optionm'.default_value "" 00:44:13 verbose #29293 > > | Fsharp (Native) => fun () => 00:44:13 verbose #29294 > > path |> $'System.IO.Path.GetFileName' 00:44:13 verbose #29295 > > | target => fun () => failwith $'$"file_system.get_file_name / target: 00:44:13 verbose #29296 > > {!target} / path: {!path}"' 00:44:14 verbose #29297 > > 00:44:14 verbose #29298 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:14 verbose #29299 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:14 verbose #29300 > > │ ### get_file_name_without_extension │ 00:44:14 verbose #29301 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:14 verbose #29302 > > 00:44:14 verbose #29303 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:14 verbose #29304 > > let get_file_name_without_extension (path : string) : string = 00:44:14 verbose #29305 > > run_target function 00:44:14 verbose #29306 > > | Rust (Contract) => fun () => null () 00:44:14 verbose #29307 > > | Rust (Native) => fun () => 00:44:14 verbose #29308 > > inl path_buf = path |> sm'.to_std_string |> new_path_buf 00:44:14 verbose #29309 > > inl file_stem = !\\(path_buf, $'"$0.file_stem()"') 00:44:14 verbose #29310 > > match file_stem |> optionm'.map' sm'.from_os_str_ref |> 00:44:14 verbose #29311 > > optionm'.unbox with 00:44:14 verbose #29312 > > | Some file_stem => file_stem 00:44:14 verbose #29313 > > | None => "" 00:44:14 verbose #29314 > > | _ => fun () => 00:44:14 verbose #29315 > > path |> $'System.IO.Path.GetFileNameWithoutExtension' 00:44:14 verbose #29316 > > 00:44:14 verbose #29317 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:14 verbose #29318 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:14 verbose #29319 > > │ ### get_directory_name │ 00:44:14 verbose #29320 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:14 verbose #29321 > > 00:44:14 verbose #29322 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:14 verbose #29323 > > let get_directory_name (path : string) : string = 00:44:14 verbose #29324 > > run_target function 00:44:14 verbose #29325 > > | Rust (Native) => fun () => 00:44:14 verbose #29326 > > inl path_buf = path |> sm'.to_std_string |> new_path_buf 00:44:14 verbose #29327 > > inl parent = path_buf |> path_buf_parent 00:44:14 verbose #29328 > > parent 00:44:14 verbose #29329 > > |> optionm'.map' (path_buf_display >> sm'.format' >> 00:44:14 verbose #29330 > > sm'.from_std_string) 00:44:14 verbose #29331 > > |> optionm'.default_value' "" 00:44:14 verbose #29332 > > | Fsharp _ => fun () => 00:44:14 verbose #29333 > > path |> $'System.IO.Path.GetDirectoryName' 00:44:14 verbose #29334 > > | _ => fun () => null () 00:44:15 verbose #29335 > > 00:44:15 verbose #29336 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:15 verbose #29337 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:15 verbose #29338 > > │ ### get_extension │ 00:44:15 verbose #29339 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:15 verbose #29340 > > 00:44:15 verbose #29341 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:15 verbose #29342 > > let get_extension (path : string) : string = 00:44:15 verbose #29343 > > run_target function 00:44:15 verbose #29344 > > | Rust (Contract) => fun () => null () 00:44:15 verbose #29345 > > | Rust (Native) => fun () => 00:44:15 verbose #29346 > > inl path_buf = path |> sm'.to_std_string |> new_path_buf 00:44:15 verbose #29347 > > !\\(path_buf, $'"$0.extension()"') 00:44:15 verbose #29348 > > |> optionm'.unwrap 00:44:15 verbose #29349 > > |> sm'.from_os_str_ref 00:44:15 verbose #29350 > > | _ => fun () => 00:44:15 verbose #29351 > > path |> $'System.IO.Path.GetExtension' 00:44:15 verbose #29352 > > 00:44:15 verbose #29353 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:15 verbose #29354 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:15 verbose #29355 > > │ ### directory_separator_char │ 00:44:15 verbose #29356 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:15 verbose #29357 > > 00:44:15 verbose #29358 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:15 verbose #29359 > > let directory_separator_char () : char = 00:44:15 verbose #29360 > > run_target function 00:44:15 verbose #29361 > > | Rust (Native) => fun () => 00:44:15 verbose #29362 > > !\($'"std::path::MAIN_SEPARATOR"') 00:44:15 verbose #29363 > > | _ => fun () => 00:44:15 verbose #29364 > > $'System.IO.Path.DirectorySeparatorChar' 00:44:16 verbose #29365 > > 00:44:16 verbose #29366 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:16 verbose #29367 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:16 verbose #29368 > > │ ### get_current_directory │ 00:44:16 verbose #29369 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:16 verbose #29370 > > 00:44:16 verbose #29371 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:16 verbose #29372 > > let get_current_directory () : string = 00:44:16 verbose #29373 > > run_target function 00:44:16 verbose #29374 > > | Rust (Contract | Wasm) => fun () => null () 00:44:16 verbose #29375 > > | Rust (Native) => fun () => 00:44:16 verbose #29376 > > inl current_dir = !\($'"std::env::current_dir()"') : resultm.result' 00:44:16 verbose #29377 > > path_buf stream.io_error 00:44:16 verbose #29378 > > current_dir 00:44:16 verbose #29379 > > |> resultm.unwrap' 00:44:16 verbose #29380 > > |> path_buf_display 00:44:16 verbose #29381 > > |> sm'.format' 00:44:16 verbose #29382 > > |> sm'.from_std_string 00:44:16 verbose #29383 > > | Fsharp (Native) => fun () => 00:44:16 verbose #29384 > > $'System.IO.Directory.GetCurrentDirectory' () 00:44:16 verbose #29385 > > | _ => fun () => null () 00:44:16 verbose #29386 > > 00:44:16 verbose #29387 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:16 verbose #29388 > > //// test 00:44:16 verbose #29389 > > 00:44:16 verbose #29390 > > get_current_directory () 00:44:16 verbose #29391 > > |> _assert_contains (directory_separator_char ()) 00:44:17 verbose #29392 > > 00:44:17 verbose #29393 > > ╭─[ 1.23s - stdout ]───────────────────────────────────────────────────────────╮ 00:44:17 verbose #29394 > > │ __assert_contains / actual: "C:\home\git\polyglot\lib\spiral" / expected: │ 00:44:17 verbose #29395 > > │ '\\' │ 00:44:17 verbose #29396 > > │ │ 00:44:17 verbose #29397 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:17 verbose #29398 > > 00:44:17 verbose #29399 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:17 verbose #29400 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:17 verbose #29401 > > │ ### directory_exists │ 00:44:17 verbose #29402 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:17 verbose #29403 > > 00:44:17 verbose #29404 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:17 verbose #29405 > > let directory_exists (path : string) : bool = 00:44:17 verbose #29406 > > run_target function 00:44:17 verbose #29407 > > | Fsharp (Native) => fun () => 00:44:17 verbose #29408 > > path |> $'System.IO.Directory.Exists' 00:44:17 verbose #29409 > > | Rust (Native) => fun () => 00:44:17 verbose #29410 > > inl path = path |> sm'.to_std_string |> new_path_buf 00:44:17 verbose #29411 > > path_buf_exists path && path_buf_is_dir path 00:44:17 verbose #29412 > > | TypeScript (Native) => fun () => 00:44:17 verbose #29413 > > global "type IFsExistsSync = abstract existsSync: path: string -> 00:44:17 verbose #29414 > > bool" 00:44:17 verbose #29415 > > open typescript_operators 00:44:17 verbose #29416 > > inl fs : $'IFsExistsSync' = typescript.import_all "fs" 00:44:17 verbose #29417 > > !\\((fs, path), $'"$0.existsSync($1)"') 00:44:17 verbose #29418 > > | _ => fun () => null () 00:44:18 verbose #29419 > > 00:44:18 verbose #29420 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:18 verbose #29421 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:18 verbose #29422 > > │ ### directory_get_parent │ 00:44:18 verbose #29423 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:18 verbose #29424 > > 00:44:18 verbose #29425 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:18 verbose #29426 > > let directory_get_parent (path : string) : optionm'.option' string = 00:44:18 verbose #29427 > > run_target function 00:44:18 verbose #29428 > > | Fsharp (Native) => fun () => 00:44:18 verbose #29429 > > inl parent : directory_info = path |> 00:44:18 verbose #29430 > > $'System.IO.Directory.GetParent' 00:44:18 verbose #29431 > > if parent =. null () 00:44:18 verbose #29432 > > then None 00:44:18 verbose #29433 > > else parent |> directory_info_full_name |> Some 00:44:18 verbose #29434 > > | Rust (Native) => fun () => 00:44:18 verbose #29435 > > path 00:44:18 verbose #29436 > > |> get_directory_name 00:44:18 verbose #29437 > > |> Some 00:44:18 verbose #29438 > > | TypeScript _ => fun () => 00:44:18 verbose #29439 > > open typescript_operators 00:44:18 verbose #29440 > > global "type IPathDirname = abstract dirname: path: string -> 00:44:18 verbose #29441 > > string" 00:44:18 verbose #29442 > > inl fs : $'IPathDirname' = typescript.import_all "path" 00:44:18 verbose #29443 > > !\\(path, $'"!fs.dirname($0)"') |> Some 00:44:18 verbose #29444 > > | _ => fun () => null () 00:44:18 verbose #29445 > > |> optionm'.box 00:44:18 verbose #29446 > > 00:44:18 verbose #29447 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:18 verbose #29448 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:18 verbose #29449 > > │ ### create_temp_path' │ 00:44:18 verbose #29450 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:18 verbose #29451 > > 00:44:18 verbose #29452 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:18 verbose #29453 > > let create_temp_path' (guid : guid.guid) = 00:44:18 verbose #29454 > > run_target function 00:44:18 verbose #29455 > > | Rust (Contract) => fun () => null () 00:44:18 verbose #29456 > > | _ => fun () => 00:44:18 verbose #29457 > > get_temp_path () 00:44:18 verbose #29458 > > </> (join "!create_temp_path_") 00:44:18 verbose #29459 > > </> (env.get_entry_assembly_name ()) 00:44:18 verbose #29460 > > </> (guid |> sm'.obj_to_string) 00:44:19 verbose #29461 > > 00:44:19 verbose #29462 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:19 verbose #29463 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:19 verbose #29464 > > │ ### create_temp_path │ 00:44:19 verbose #29465 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:19 verbose #29466 > > 00:44:19 verbose #29467 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:19 verbose #29468 > > let create_temp_path () = 00:44:19 verbose #29469 > > run_target function 00:44:19 verbose #29470 > > | Rust (Contract) => fun () => null () 00:44:19 verbose #29471 > > | _ => fun () => 00:44:19 verbose #29472 > > date_time.now () 00:44:19 verbose #29473 > > |> date_time.new_guid_from_date_time 00:44:19 verbose #29474 > > |> create_temp_path' 00:44:19 verbose #29475 > > 00:44:19 verbose #29476 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:19 verbose #29477 > > //// test 00:44:19 verbose #29478 > > ///! fsharp 00:44:19 verbose #29479 > > ///! rust -d chrono 00:44:19 verbose #29480 > > 00:44:19 verbose #29481 > > create_temp_path () 00:44:19 verbose #29482 > > |> _assert_contains (directory_separator_char ()) 00:44:38 verbose #29483 > > 00:44:38 verbose #29484 > > ╭─[ 18.82s - return value ]────────────────────────────────────────────────────╮ 00:44:38 verbose #29485 > > │ .rs output (rust -d chrono): │ 00:44:38 verbose #29486 > > │ __assert_contains / actual: │ 00:44:38 verbose #29487 > > │ "C:\Users\i574n\AppData\Local\Temp\!create_temp_path_\spiral_builder_5907af2 │ 00:44:38 verbose #29488 > > │ cab94bfda2e5dbb1e645914d8a65ff8ac6b975cf881a267f2c1fb0c27\20240929-0302-1994 │ 00:44:38 verbose #29489 > > │ -2683-000000b412bf" / expected: '\\' │ 00:44:38 verbose #29490 > > │ │ 00:44:38 verbose #29491 > > │ │ 00:44:38 verbose #29492 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:38 verbose #29493 > > 00:44:38 verbose #29494 > > ╭─[ 18.82s - stdout ]──────────────────────────────────────────────────────────╮ 00:44:38 verbose #29495 > > │ .fsx output: │ 00:44:38 verbose #29496 > > │ __assert_contains / actual: │ 00:44:38 verbose #29497 > > │ "C:\Users\i574n\AppData\Local\Temp\!create_temp_path_\dotnet-repl\20240929-0 │ 00:44:38 verbose #29498 > > │ 302-2045-4524-40040012c656" / expected: '\\' │ 00:44:38 verbose #29499 > > │ │ 00:44:38 verbose #29500 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:38 verbose #29501 > > 00:44:38 verbose #29502 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:38 verbose #29503 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:38 verbose #29504 > > │ ### file_copy │ 00:44:38 verbose #29505 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:38 verbose #29506 > > 00:44:38 verbose #29507 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:38 verbose #29508 > > let file_copy (new_path : string) (old_path : string) : () = 00:44:38 verbose #29509 > > run_target function 00:44:38 verbose #29510 > > | Fsharp (Native) => fun () => 00:44:38 verbose #29511 > > $'System.IO.File.Copy (!old_path, !new_path, true)' 00:44:38 verbose #29512 > > | Rust (Native) => fun () => 00:44:38 verbose #29513 > > inl new_path = join new_path 00:44:38 verbose #29514 > > !\\(old_path, $'"std::fs::copy(&*$0, &*!new_path)"') 00:44:38 verbose #29515 > > |> fun x => x : _ u64 stream.io_error 00:44:38 verbose #29516 > > |> resultm.unwrap' 00:44:38 verbose #29517 > > |> ignore 00:44:38 verbose #29518 > > | _ => fun () => () 00:44:38 verbose #29519 > > 00:44:38 verbose #29520 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:38 verbose #29521 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:38 verbose #29522 > > │ ### file_exists │ 00:44:38 verbose #29523 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:38 verbose #29524 > > 00:44:38 verbose #29525 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:38 verbose #29526 > > let file_exists (path : string) : bool = 00:44:38 verbose #29527 > > run_target function 00:44:38 verbose #29528 > > | Fsharp (Native) => fun () => 00:44:38 verbose #29529 > > path |> $'System.IO.File.Exists' 00:44:38 verbose #29530 > > | Rust (Native) => fun () => 00:44:38 verbose #29531 > > inl path_buf = path |> sm'.to_std_string |> new_path_buf 00:44:38 verbose #29532 > > path_buf_exists path_buf && path_buf_is_file path_buf 00:44:38 verbose #29533 > > | TypeScript (Native) => fun () => 00:44:38 verbose #29534 > > open typescript_operators 00:44:38 verbose #29535 > > global "type IFsExistsSync = abstract existsSync: path: string -> 00:44:38 verbose #29536 > > bool" 00:44:38 verbose #29537 > > inl fs : $'IFsExistsSync' = typescript.import_all "fs" 00:44:38 verbose #29538 > > !\\((fs, path), $'"$0.existsSync($1)"') 00:44:38 verbose #29539 > > | _ => fun () => null () 00:44:39 verbose #29540 > > 00:44:39 verbose #29541 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:39 verbose #29542 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:39 verbose #29543 > > │ ### directory_delete │ 00:44:39 verbose #29544 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:39 verbose #29545 > > 00:44:39 verbose #29546 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:39 verbose #29547 > > let directory_delete recursive (path : string) : () = 00:44:39 verbose #29548 > > run_target function 00:44:39 verbose #29549 > > | Fsharp (Native) => fun () => 00:44:39 verbose #29550 > > $'System.IO.Directory.Delete (!path, !recursive)' 00:44:39 verbose #29551 > > | Rust (Native) => fun () => 00:44:39 verbose #29552 > > inl path = join path 00:44:39 verbose #29553 > > if path |> directory_exists then 00:44:39 verbose #29554 > > if recursive 00:44:39 verbose #29555 > > then !\\(path, $'"std::fs::remove_dir_all(&*$0).unwrap()"') 00:44:39 verbose #29556 > > else !\\(path, $'"std::fs::remove_dir(&*$0).unwrap()"') 00:44:39 verbose #29557 > > | _ => fun () => () 00:44:39 verbose #29558 > > 00:44:39 verbose #29559 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:39 verbose #29560 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:39 verbose #29561 > > │ ### write_all_text │ 00:44:39 verbose #29562 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:39 verbose #29563 > > 00:44:39 verbose #29564 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:39 verbose #29565 > > inl write_all_text (path : string) (text : string) : () = 00:44:39 verbose #29566 > > run_target function 00:44:39 verbose #29567 > > | Fsharp (Native) => fun () => 00:44:39 verbose #29568 > > inl text = join text 00:44:39 verbose #29569 > > $'System.IO.File.WriteAllText (!path, !text)' 00:44:39 verbose #29570 > > | Rust (Native) => fun () => 00:44:39 verbose #29571 > > !\\((path, text), $'"std::fs::write(&*$0, &*$1).unwrap()"') 00:44:39 verbose #29572 > > | _ => fun () => () 00:44:40 verbose #29573 > > 00:44:40 verbose #29574 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:40 verbose #29575 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:40 verbose #29576 > > │ ### read_all_bytes │ 00:44:40 verbose #29577 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:40 verbose #29578 > > 00:44:40 verbose #29579 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:40 verbose #29580 > > inl read_all_bytes (path : string) : am'.vec u8 = 00:44:40 verbose #29581 > > run_target function 00:44:40 verbose #29582 > > | Fsharp (Native) => fun () => 00:44:40 verbose #29583 > > $'!path |> System.IO.File.ReadAllBytes' 00:44:40 verbose #29584 > > |> am'.to_vec 00:44:40 verbose #29585 > > | Rust (Native) => fun () => 00:44:40 verbose #29586 > > path |> read |> resultm.unwrap' 00:44:40 verbose #29587 > > | _ => fun () => null () 00:44:40 verbose #29588 > > 00:44:40 verbose #29589 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:40 verbose #29590 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:40 verbose #29591 > > │ ### read_all_text │ 00:44:40 verbose #29592 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:40 verbose #29593 > > 00:44:40 verbose #29594 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:40 verbose #29595 > > inl read_all_text (path : string) : string = 00:44:40 verbose #29596 > > run_target function 00:44:40 verbose #29597 > > | Fsharp (Native) => fun () => 00:44:40 verbose #29598 > > $'!path |> System.IO.File.ReadAllText' 00:44:40 verbose #29599 > > | Rust (Native) => fun () => 00:44:40 verbose #29600 > > path 00:44:40 verbose #29601 > > |> read_all_bytes 00:44:40 verbose #29602 > > |> sm'.string_from_utf8 00:44:40 verbose #29603 > > |> resultm.unwrap' 00:44:40 verbose #29604 > > |> sm'.from_std_string 00:44:40 verbose #29605 > > | _ => fun () => null () 00:44:41 verbose #29606 > > 00:44:41 verbose #29607 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:41 verbose #29608 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:41 verbose #29609 > > │ ### directory_create_symbolic_link │ 00:44:41 verbose #29610 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:41 verbose #29611 > > 00:44:41 verbose #29612 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:41 verbose #29613 > > inl directory_create_symbolic_link (target : string) (path : string) : () = 00:44:41 verbose #29614 > > run_target function 00:44:41 verbose #29615 > > | Fsharp (Native) => fun () => 00:44:41 verbose #29616 > > ($'System.IO.Directory.CreateSymbolicLink (!path, !target)' : 00:44:41 verbose #29617 > > file_system_info) 00:44:41 verbose #29618 > > |> ignore 00:44:41 verbose #29619 > > | Rust (Native) => fun () => 00:44:41 verbose #29620 > > (!\\((target, path), $'"true; #[[cfg(windows)]] 00:44:41 verbose #29621 > > std::os::windows::fs::symlink_dir(&*$0, &*$1).unwrap()"') : bool) |> ignore 00:44:41 verbose #29622 > > (!\\((target, path), $'"true; #[[cfg(unix)]] 00:44:41 verbose #29623 > > std::os::unix::fs::symlink(&*$0, &*$1).unwrap()"') : bool) |> ignore 00:44:41 verbose #29624 > > | _ => fun () => () 00:44:41 verbose #29625 > > 00:44:41 verbose #29626 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:41 verbose #29627 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:41 verbose #29628 > > │ ### file_create_symbolic_link │ 00:44:41 verbose #29629 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:41 verbose #29630 > > 00:44:41 verbose #29631 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:41 verbose #29632 > > inl file_create_symbolic_link (target : string) (path : string) : () = 00:44:41 verbose #29633 > > run_target function 00:44:41 verbose #29634 > > | Fsharp (Native) => fun () => 00:44:41 verbose #29635 > > ($'System.IO.File.CreateSymbolicLink (!path, !target)' : 00:44:41 verbose #29636 > > file_system_info) 00:44:41 verbose #29637 > > |> ignore 00:44:41 verbose #29638 > > | Rust (Native) => fun () => 00:44:41 verbose #29639 > > (!\\((target, path), $'"true; #[[cfg(windows)]] 00:44:41 verbose #29640 > > std::os::windows::fs::symlink_file(&*$0, &*$1).unwrap()"') : bool) |> ignore 00:44:41 verbose #29641 > > (!\\((target, path), $'"true; #[[cfg(unix)]] 00:44:41 verbose #29642 > > std::os::unix::fs::symlink(&*$0, &*$1).unwrap()"') : bool) |> ignore 00:44:41 verbose #29643 > > | _ => fun () => () 00:44:42 verbose #29644 > > 00:44:42 verbose #29645 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:42 verbose #29646 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:42 verbose #29647 > > │ ### file_type │ 00:44:42 verbose #29648 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:42 verbose #29649 > > 00:44:42 verbose #29650 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:42 verbose #29651 > > union file_type = 00:44:42 verbose #29652 > > | File 00:44:42 verbose #29653 > > | Directory 00:44:42 verbose #29654 > > 00:44:42 verbose #29655 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:44:42 verbose #29656 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:44:42 verbose #29657 > > │ ### find_parent │ 00:44:42 verbose #29658 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:42 verbose #29659 > > 00:44:42 verbose #29660 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:42 verbose #29661 > > inl find_parent file_type name root_dir = 00:44:42 verbose #29662 > > inl is_file = file_type = File 00:44:42 verbose #29663 > > let rec loop dir = 00:44:42 verbose #29664 > > if dir </> name |> (if is_file then file_exists else directory_exists) 00:44:42 verbose #29665 > > then dir |> Ok 00:44:42 verbose #29666 > > else 00:44:42 verbose #29667 > > inl result = dir |> (join directory_get_parent) 00:44:42 verbose #29668 > > match result |> optionm'.unbox with 00:44:42 verbose #29669 > > | Some parent => parent |> loop 00:44:42 verbose #29670 > > | None => ($'$"""No parent for {if !is_file then "file" else "dir"} 00:44:42 verbose #29671 > > \'{!name}\' at \'{!root_dir}\' (until \'{!dir}\')"""' : string) |> Error 00:44:42 verbose #29672 > > loop root_dir 00:44:43 verbose #29673 > > 00:44:43 verbose #29674 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:43 verbose #29675 > > //// test 00:44:43 verbose #29676 > > 00:44:43 verbose #29677 > > a ;[[ Directory, ".paket"; File, "paket.dependencies" ]] 00:44:43 verbose #29678 > > |> am.map fun file_type, file => 00:44:43 verbose #29679 > > get_source_directory () 00:44:43 verbose #29680 > > |> find_parent file_type file 00:44:43 verbose #29681 > > |> resultm.get 00:44:43 verbose #29682 > > |> directory_info 00:44:43 verbose #29683 > > |> directory_info_name 00:44:43 verbose #29684 > > |> am'.distinct 00:44:43 verbose #29685 > > |> fun (a x : _ int _) => x 00:44:43 verbose #29686 > > |> _assert_eq' ;[[ "polyglot" ]] 00:44:43 verbose #29687 > > 00:44:43 verbose #29688 > > ╭─[ 678.10ms - stdout ]────────────────────────────────────────────────────────╮ 00:44:43 verbose #29689 > > │ __assert_eq' / actual: [|"polyglot"|] / expected: [|"polyglot"|] │ 00:44:43 verbose #29690 > > │ │ 00:44:43 verbose #29691 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:44:43 verbose #29692 > > 00:44:43 verbose #29693 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:44:43 verbose #29694 > > //// test 00:44:43 verbose #29695 > > ///! rust 00:44:43 verbose #29696 > > 00:44:43 verbose #29697 > > a ;[[ Directory, ".paket"; File, "paket.dependencies" ]] 00:44:43 verbose #29698 > > |> am.map fun file_type, file => 00:44:43 verbose #29699 > > fun () => 00:44:43 verbose #29700 > > join 00:44:43 verbose #29701 > > get_source_directory () 00:44:43 verbose #29702 > > |> find_parent file_type file 00:44:43 verbose #29703 > > |> resultm.get 00:44:43 verbose #29704 > > |> sm'.to_std_string 00:44:43 verbose #29705 > > |> new_path_buf 00:44:43 verbose #29706 > > |> path_buf_file_name 00:44:43 verbose #29707 > > |> optionm'.try' 00:44:43 verbose #29708 > > |> sm'.from_os_str_ref 00:44:43 verbose #29709 > > |> Some 00:44:43 verbose #29710 > > |> optionm'.box 00:44:43 verbose #29711 > > |> fun x => x () |> optionm'.unbox 00:44:43 verbose #29712 > > |> optionm'.default_value "" 00:44:43 verbose #29713 > > |> am'.distinct 00:44:43 verbose #29714 > > |> fun result => 00:44:43 verbose #29715 > > result |> am'.length |> _assert_eq 1i32 00:44:43 verbose #29716 > > index result 0i32 |> _assert_eq "polyglot" 00:45:01 verbose #29717 > > 00:45:01 verbose #29718 > > ╭─[ 17.94s - return value ]────────────────────────────────────────────────────╮ 00:45:01 verbose #29719 > > │ __assert_eq / actual: 1 / expected: 1 │ 00:45:01 verbose #29720 > > │ __assert_eq / actual: "polyglot" / expected: "polyglot" │ 00:45:01 verbose #29721 > > │ │ 00:45:01 verbose #29722 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:45:01 verbose #29723 > > 00:45:01 verbose #29724 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:45:01 verbose #29725 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:45:01 verbose #29726 > > │ ### get_workspace_root │ 00:45:01 verbose #29727 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:45:01 verbose #29728 > > 00:45:01 verbose #29729 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:45:01 verbose #29730 > > inl get_workspace_root () = 00:45:01 verbose #29731 > > (None, [[ get_source_directory; get_current_directory ]]) 00:45:01 verbose #29732 > > ||> listm.fold fun acc path => 00:45:01 verbose #29733 > > match acc with 00:45:01 verbose #29734 > > | Some path => Some path 00:45:01 verbose #29735 > > | None => 00:45:01 verbose #29736 > > path () 00:45:01 verbose #29737 > > |> find_parent Directory ("polyglot" </> ".devcontainer") 00:45:01 verbose #29738 > > |> function 00:45:01 verbose #29739 > > | Ok path => Some path 00:45:01 verbose #29740 > > | Error error => 00:45:01 verbose #29741 > > trace Warning 00:45:01 verbose #29742 > > fun () => "file_system.get_workspace_root" 00:45:01 verbose #29743 > > fun () => { error } 00:45:01 verbose #29744 > > None 00:45:01 verbose #29745 > > |> optionm.value 00:45:01 verbose #29746 > > |> fun root => root </> "polyglot" 00:45:02 verbose #29747 > > 00:45:02 verbose #29748 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:45:02 verbose #29749 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:45:02 verbose #29750 > > │ ### get_workspace_root_external │ 00:45:02 verbose #29751 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:45:02 verbose #29752 > > 00:45:02 verbose #29753 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:45:02 verbose #29754 > > inl get_workspace_root_external () = 00:45:02 verbose #29755 > > inl workspace_root = get_workspace_root () 00:45:02 verbose #29756 > > inl current_dir = get_current_directory () |> sm'.to_lower 00:45:02 verbose #29757 > > inl workspace_root = workspace_root |> sm'.to_lower 00:45:02 verbose #29758 > > if current_dir |> sm'.starts_with workspace_root 00:45:02 verbose #29759 > > then Error workspace_root 00:45:02 verbose #29760 > > else Ok workspace_root 00:45:02 verbose #29761 > > 00:45:02 verbose #29762 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:45:02 verbose #29763 > > //// test 00:45:02 verbose #29764 > > 00:45:02 verbose #29765 > > get_workspace_root_external () 00:45:02 verbose #29766 > > |> resultm.unwrap_err 00:45:02 verbose #29767 > > |> get_file_name 00:45:02 verbose #29768 > > |> _assert_eq "polyglot" 00:45:03 verbose #29769 > > 00:45:03 verbose #29770 > > ╭─[ 872.68ms - stdout ]────────────────────────────────────────────────────────╮ 00:45:03 verbose #29771 > > │ __assert_eq / actual: "polyglot" / expected: "polyglot" │ 00:45:03 verbose #29772 > > │ │ 00:45:03 verbose #29773 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:45:03 verbose #29774 > > 00:45:03 verbose #29775 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:45:03 verbose #29776 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:45:03 verbose #29777 > > │ ### file_delete │ 00:45:03 verbose #29778 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:45:03 verbose #29779 > > 00:45:03 verbose #29780 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:45:03 verbose #29781 > > inl file_delete (path : string) : () = 00:45:03 verbose #29782 > > run_target function 00:45:03 verbose #29783 > > | Fsharp (Native) => fun () => 00:45:03 verbose #29784 > > path |> $'System.IO.File.Delete' 00:45:03 verbose #29785 > > | Rust (Native) => fun () => 00:45:03 verbose #29786 > > !\\(path, $'"std::fs::remove_file(&*$0).unwrap()"') 00:45:03 verbose #29787 > > | _ => fun () => () 00:45:04 verbose #29788 > > 00:45:04 verbose #29789 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:45:04 verbose #29790 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:45:04 verbose #29791 > > │ ### read_link │ 00:45:04 verbose #29792 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:45:04 verbose #29793 > > 00:45:04 verbose #29794 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:45:04 verbose #29795 > > inl read_link (path : string) : resultm.result' path_buf stream.io_error = 00:45:04 verbose #29796 > > inl run loop n error path' = 00:45:04 verbose #29797 > > inl name = path' |> get_file_name 00:45:04 verbose #29798 > > inl parent = path' |> directory_get_parent |> optionm'.unbox 00:45:04 verbose #29799 > > match parent with 00:45:04 verbose #29800 > > | _ when n >= 11 => 00:45:04 verbose #29801 > > ($'$"file_system.read_link / path: {!path} / n: {!n} / path\': 00:45:04 verbose #29802 > > {!path'} / name: {!name}"' : string) 00:45:04 verbose #29803 > > |> stream.new_io_error 00:45:04 verbose #29804 > > |> resultm.err 00:45:04 verbose #29805 > > | Some parent when path' <>. "" => 00:45:04 verbose #29806 > > match loop (n + 1) parent |> resultm.map_error' sm'.format |> 00:45:04 verbose #29807 > > resultm.unbox with 00:45:04 verbose #29808 > > | Ok parent' => 00:45:04 verbose #29809 > > (parent' |> path_buf_display |> convert) </> name 00:45:04 verbose #29810 > > |> sm'.to_std_string 00:45:04 verbose #29811 > > |> new_path_buf 00:45:04 verbose #29812 > > |> resultm.ok'' 00:45:04 verbose #29813 > > | Error error' => 00:45:04 verbose #29814 > > ($'$"file_system.read_link / error\': {!error'} / error: 00:45:04 verbose #29815 > > {!error} / name: {!name}"' : string) 00:45:04 verbose #29816 > > |> stream.new_io_error 00:45:04 verbose #29817 > > |> resultm.err 00:45:04 verbose #29818 > > | _ => 00:45:04 verbose #29819 > > ($'$"file_system.read_link / run / The file or directory is not a 00:45:04 verbose #29820 > > reparse point. / path: {!path} / error: {!error} / path\': {!path'} / name: 00:45:04 verbose #29821 > > {!name}"' : string) 00:45:04 verbose #29822 > > |> stream.new_io_error 00:45:04 verbose #29823 > > |> resultm.err 00:45:04 verbose #29824 > > run_target function 00:45:04 verbose #29825 > > | Rust _ => fun () => 00:45:04 verbose #29826 > > if path |> directory_exists 00:45:04 verbose #29827 > > then !\\(path, $'"std::fs::read_link(&*$0)"') 00:45:04 verbose #29828 > > else 00:45:04 verbose #29829 > > inl rec loop n path' = 00:45:04 verbose #29830 > > inl result : _ _ stream.io_error = !\\(path', 00:45:04 verbose #29831 > > $'"std::fs::read_link(&*$0)"') 00:45:04 verbose #29832 > > inl result = result |> resultm.map_error' sm'.format |> 00:45:04 verbose #29833 > > resultm.unbox 00:45:04 verbose #29834 > > match result with 00:45:04 verbose #29835 > > | Ok x => x |> resultm.ok'' 00:45:04 verbose #29836 > > | Error error => path' |> run loop n error 00:45:04 verbose #29837 > > path |> loop 0u8 00:45:04 verbose #29838 > > | TypeScript _ => fun () => null () 00:45:04 verbose #29839 > > | Fsharp _ => fun () => 00:45:04 verbose #29840 > > inl rec loop n path' = 00:45:04 verbose #29841 > > inl result = 00:45:04 verbose #29842 > > path' 00:45:04 verbose #29843 > > |> directory_info 00:45:04 verbose #29844 > > |> directory_info_attributes 00:45:04 verbose #29845 > > |> file_attributes_has_flag (file_attributes_reparse_point 00:45:04 verbose #29846 > > ()) 00:45:04 verbose #29847 > > if result then 00:45:04 verbose #29848 > > path' 00:45:04 verbose #29849 > > |> file_info 00:45:04 verbose #29850 > > |> file_info_link_target 00:45:04 verbose #29851 > > |> convert 00:45:04 verbose #29852 > > |> resultm.ok'' 00:45:04 verbose #29853 > > else 00:45:04 verbose #29854 > > inl error = ($'$"file_system.read_link / Fsharp / The file 00:45:04 verbose #29855 > > or directory is not a reparse point. / path: {!path} / result: {!result} 00:45:04 verbose #29856 > > path\': {!path'} / n: {!n}"' : string) 00:45:04 verbose #29857 > > inl error = error |> stream.new_io_error 00:45:04 verbose #29858 > > path' |> run loop n error 00:45:04 verbose #29859 > > path |> loop 0u8 00:45:04 verbose #29860 > > | _ => fun () => $'Unchecked.defaultof<_>' 00:45:04 verbose #29861 > > 00:45:04 verbose #29862 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:45:04 verbose #29863 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:45:04 verbose #29864 > > │ ### normalize_path │ 00:45:04 verbose #29865 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:45:04 verbose #29866 > > 00:45:04 verbose #29867 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:45:04 verbose #29868 > > let normalize_path (path : string) : string = 00:45:04 verbose #29869 > > if path = "" 00:45:04 verbose #29870 > > then "" 00:45:04 verbose #29871 > > else 00:45:04 verbose #29872 > > inl path = 00:45:04 verbose #29873 > > match path |> read_link |> resultm.ok' |> optionm'.unbox with 00:45:04 verbose #29874 > > | Some path_buf => 00:45:04 verbose #29875 > > inl result = 00:45:04 verbose #29876 > > path_buf 00:45:04 verbose #29877 > > |> path_buf_display 00:45:04 verbose #29878 > > |> convert 00:45:04 verbose #29879 > > if result = "" 00:45:04 verbose #29880 > > then path 00:45:04 verbose #29881 > > else result 00:45:04 verbose #29882 > > | None => path 00:45:04 verbose #29883 > > if path = "" 00:45:04 verbose #29884 > > then "" 00:45:04 verbose #29885 > > else 00:45:04 verbose #29886 > > inl path = path |> sm'.replace_regex @"^\\\\\?\\" "" 00:45:04 verbose #29887 > > $'$"{!path.[[0]] |> string |> _.ToLower()}{!path.[[1..]]}"' |> 00:45:04 verbose #29888 > > sm'.replace "\\" "/" 00:45:05 verbose #29889 > > 00:45:05 verbose #29890 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:45:05 verbose #29891 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:45:05 verbose #29892 > > │ ### get_full_path │ 00:45:05 verbose #29893 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:45:05 verbose #29894 > > 00:45:05 verbose #29895 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:45:05 verbose #29896 > > let get_full_path (path : string) : string = 00:45:05 verbose #29897 > > run_target_args (fun () => path) function 00:45:05 verbose #29898 > > | Fsharp (Native) => fun path => 00:45:05 verbose #29899 > > path |> $'System.IO.Path.GetFullPath' 00:45:05 verbose #29900 > > | Rust (Native) => fun path => 00:45:05 verbose #29901 > > inl path_buf = path |> sm'.to_std_string |> new_path_buf 00:45:05 verbose #29902 > > if path_buf |> path_buf_exists |> not then 00:45:05 verbose #29903 > > inl current_dir = get_current_directory () 00:45:05 verbose #29904 > > current_dir </> path 00:45:05 verbose #29905 > > |> normalize_path 00:45:05 verbose #29906 > > |> sm'.split "/" 00:45:05 verbose #29907 > > |> fun x => 00:45:05 verbose #29908 > > ((a x : _ i32 _), (0i32, (a ;[[]] : _ i32 _))) 00:45:05 verbose #29909 > > ||> am.foldBack fun x level, acc => 00:45:05 verbose #29910 > > match x, level with 00:45:05 verbose #29911 > > | "..", _ => level + 1, acc 00:45:05 verbose #29912 > > | ".", _ => level, acc 00:45:05 verbose #29913 > > | _, 0 when x |> sm'.ends_with ":" => 0, a ;[[ 00:45:05 verbose #29914 > > $'$"{!current_dir.[[0]]}:"' ]] ++ acc 00:45:05 verbose #29915 > > | _, 0 => 0, a ;[[ x ]] ++ acc 00:45:05 verbose #29916 > > | _ => level - 1, acc 00:45:05 verbose #29917 > > |> snd 00:45:05 verbose #29918 > > |> seq.of_array' 00:45:05 verbose #29919 > > |> sm'.concat (directory_separator_char () |> sm'.obj_to_string) 00:45:05 verbose #29920 > > else 00:45:05 verbose #29921 > > inl path = !\\(path, $'"std::fs::canonicalize(&*$0)"') : 00:45:05 verbose #29922 > > resultm.result' path_buf stream.io_error 00:45:05 verbose #29923 > > path 00:45:05 verbose #29924 > > |> resultm.unwrap' 00:45:05 verbose #29925 > > |> path_buf_display 00:45:05 verbose #29926 > > |> sm'.format' 00:45:05 verbose #29927 > > |> sm'.from_std_string 00:45:05 verbose #29928 > > | _ => fun _ => null () 00:45:05 verbose #29929 > > 00:45:05 verbose #29930 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:45:05 verbose #29931 > > //// test 00:45:05 verbose #29932 > > 00:45:05 verbose #29933 > > "." 00:45:05 verbose #29934 > > |> get_full_path 00:45:05 verbose #29935 > > |> directory_info 00:45:05 verbose #29936 > > |> directory_info_name 00:45:05 verbose #29937 > > |> _assert_eq "spiral" 00:45:08 verbose #29938 > > 00:45:08 verbose #29939 > > ╭─[ 2.67s - stdout ]───────────────────────────────────────────────────────────╮ 00:45:08 verbose #29940 > > │ __assert_eq / actual: "spiral" / expected: "spiral" │ 00:45:08 verbose #29941 > > │ │ 00:45:08 verbose #29942 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:45:08 verbose #29943 > > 00:45:08 verbose #29944 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:45:08 verbose #29945 > > //// test 00:45:08 verbose #29946 > > 00:45:08 verbose #29947 > > "dir/.././._file" 00:45:08 verbose #29948 > > |> get_full_path 00:45:08 verbose #29949 > > |> _assert_eq (get_current_directory () </> "._file") 00:45:10 verbose #29950 > > 00:45:10 verbose #29951 > > ╭─[ 2.42s - stdout ]───────────────────────────────────────────────────────────╮ 00:45:10 verbose #29952 > > │ __assert_eq / actual: "C:\home\git\polyglot\lib\spiral\._file" / expected: │ 00:45:10 verbose #29953 > > │ "C:\home\git\polyglot\lib\spiral\._file" │ 00:45:10 verbose #29954 > > │ │ 00:45:10 verbose #29955 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:45:10 verbose #29956 > > 00:45:10 verbose #29957 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:45:10 verbose #29958 > > //// test 00:45:10 verbose #29959 > > ///! rust -d regex 00:45:10 verbose #29960 > > 00:45:10 verbose #29961 > > "." 00:45:10 verbose #29962 > > |> get_full_path 00:45:10 verbose #29963 > > |> sm'.to_std_string 00:45:10 verbose #29964 > > |> new_path_buf 00:45:10 verbose #29965 > > |> path_buf_file_name 00:45:10 verbose #29966 > > |> optionm'.unwrap 00:45:10 verbose #29967 > > |> sm'.from_os_str_ref 00:45:10 verbose #29968 > > |> _assert_eq "spiral" 00:45:31 verbose #29969 > > 00:45:31 verbose #29970 > > ╭─[ 21.40s - return value ]────────────────────────────────────────────────────╮ 00:45:31 verbose #29971 > > │ __assert_eq / actual: "spiral" / expected: "spiral" │ 00:45:31 verbose #29972 > > │ │ 00:45:31 verbose #29973 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:45:31 verbose #29974 > > 00:45:31 verbose #29975 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:45:31 verbose #29976 > > //// test 00:45:31 verbose #29977 > > ///! rust -d regex 00:45:31 verbose #29978 > > 00:45:31 verbose #29979 > > "dir/.././._file" 00:45:31 verbose #29980 > > |> get_full_path 00:45:31 verbose #29981 > > |> _assert_eq (get_current_directory () </> "._file") 00:45:53 verbose #29982 > > 00:45:53 verbose #29983 > > ╭─[ 21.26s - return value ]────────────────────────────────────────────────────╮ 00:45:53 verbose #29984 > > │ __assert_eq / actual: "C:\home\git\polyglot\lib\spiral\._file" / expected: │ 00:45:53 verbose #29985 > > │ "C:\home\git\polyglot\lib\spiral\._file" │ 00:45:53 verbose #29986 > > │ │ 00:45:53 verbose #29987 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:45:53 verbose #29988 > > 00:45:53 verbose #29989 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:45:53 verbose #29990 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:45:53 verbose #29991 > > │ ### standardize_path │ 00:45:53 verbose #29992 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:45:53 verbose #29993 > > 00:45:53 verbose #29994 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:45:53 verbose #29995 > > let standardize_path path = 00:45:53 verbose #29996 > > path |> get_full_path |> normalize_path 00:45:53 verbose #29997 > > 00:45:53 verbose #29998 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:45:53 verbose #29999 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:45:53 verbose #30000 > > │ ### absolute_path │ 00:45:53 verbose #30001 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:45:53 verbose #30002 > > 00:45:53 verbose #30003 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:45:53 verbose #30004 > > let absolute_path path = 00:45:53 verbose #30005 > > inl current_dir = get_current_directory () 00:45:53 verbose #30006 > > current_dir </> path |> standardize_path 00:45:54 verbose #30007 > > 00:45:54 verbose #30008 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:45:54 verbose #30009 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:45:54 verbose #30010 > > │ ### new_file_uri │ 00:45:54 verbose #30011 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:45:54 verbose #30012 > > 00:45:54 verbose #30013 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:45:54 verbose #30014 > > inl new_file_uri (path : string) : string = 00:45:54 verbose #30015 > > inl path = path |> sm'.trim_start [[ '/' ]] 00:45:54 verbose #30016 > > $'$"file:///{!path}"' 00:45:54 verbose #30017 > > 00:45:54 verbose #30018 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:45:54 verbose #30019 > > //// test 00:45:54 verbose #30020 > > 00:45:54 verbose #30021 > > @"\\?\C:\test" 00:45:54 verbose #30022 > > |> normalize_path 00:45:54 verbose #30023 > > |> new_file_uri 00:45:54 verbose #30024 > > |> _assert_eq "file:///c:/test" 00:45:56 verbose #30025 > > 00:45:56 verbose #30026 > > ╭─[ 2.35s - stdout ]───────────────────────────────────────────────────────────╮ 00:45:56 verbose #30027 > > │ __assert_eq / actual: "file:///c:/test" / expected: "file:///c:/test" │ 00:45:56 verbose #30028 > > │ │ 00:45:56 verbose #30029 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:45:56 verbose #30030 > > 00:45:56 verbose #30031 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:45:56 verbose #30032 > > //// test 00:45:56 verbose #30033 > > ///! rust -d regex 00:45:56 verbose #30034 > > 00:45:56 verbose #30035 > > @"\\?\C:\test" 00:45:56 verbose #30036 > > |> normalize_path 00:45:56 verbose #30037 > > |> new_file_uri 00:45:56 verbose #30038 > > |> _assert_eq "file:///c:/test" 00:46:18 verbose #30039 > > 00:46:18 verbose #30040 > > ╭─[ 21.27s - return value ]────────────────────────────────────────────────────╮ 00:46:18 verbose #30041 > > │ __assert_eq / actual: "file:///c:/test" / expected: "file:///c:/test" │ 00:46:18 verbose #30042 > > │ │ 00:46:18 verbose #30043 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:46:18 verbose #30044 > > 00:46:18 verbose #30045 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:46:18 verbose #30046 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:46:18 verbose #30047 > > │ ## fsharp │ 00:46:18 verbose #30048 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:46:18 verbose #30049 > > 00:46:18 verbose #30050 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:46:18 verbose #30051 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:46:18 verbose #30052 > > │ ### file_exists_content_async │ 00:46:18 verbose #30053 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:46:18 verbose #30054 > > 00:46:18 verbose #30055 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:46:18 verbose #30056 > > inl file_exists_content_async path content : async.async bool = 00:46:18 verbose #30057 > > run_target function 00:46:18 verbose #30058 > > | Fsharp (Native) => fun () => 00:46:18 verbose #30059 > > fun () => 00:46:18 verbose #30060 > > fix_condition 00:46:18 verbose #30061 > > fun () => path |> file_exists |> not 00:46:18 verbose #30062 > > fun () => false |> return 00:46:18 verbose #30063 > > fun () => 00:46:18 verbose #30064 > > inl existing_content = path |> read_all_text_async |> 00:46:18 verbose #30065 > > async.let' 00:46:18 verbose #30066 > > content = existing_content |> return 00:46:18 verbose #30067 > > |> async.new_async_unit 00:46:18 verbose #30068 > > | _ => fun () => null () 00:46:18 verbose #30069 > > 00:46:18 verbose #30070 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:46:18 verbose #30071 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:46:18 verbose #30072 > > │ ### write_all_text_exists_async │ 00:46:18 verbose #30073 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:46:18 verbose #30074 > > 00:46:18 verbose #30075 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:46:18 verbose #30076 > > inl write_all_text_exists_async path contents = 00:46:18 verbose #30077 > > fun () => 00:46:18 verbose #30078 > > inl exists' = contents |> file_exists_content_async path |> async.let' 00:46:18 verbose #30079 > > if not exists' 00:46:18 verbose #30080 > > then contents |> write_all_text_async path |> async.do 00:46:18 verbose #30081 > > |> async.new_async 00:46:19 verbose #30082 > > 00:46:19 verbose #30083 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:46:19 verbose #30084 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:46:19 verbose #30085 > > │ ### delete_directory_async │ 00:46:19 verbose #30086 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:46:19 verbose #30087 > > 00:46:19 verbose #30088 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:46:19 verbose #30089 > > inl delete_directory_async path : _ i64 = 00:46:19 verbose #30090 > > run_target function 00:46:19 verbose #30091 > > | Fsharp (Native) => fun () => 00:46:19 verbose #30092 > > let rec loop (retry : i64) = 00:46:19 verbose #30093 > > fun () => 00:46:19 verbose #30094 > > try_unit 00:46:19 verbose #30095 > > fun () => 00:46:19 verbose #30096 > > path |> directory_delete true 00:46:19 verbose #30097 > > retry |> return 00:46:19 verbose #30098 > > fun ex => 00:46:19 verbose #30099 > > if retry % 100i64 = 0 then 00:46:19 verbose #30100 > > inl ex = ex |> sm'.format_exception 00:46:19 verbose #30101 > > trace Debug 00:46:19 verbose #30102 > > fun () => 00:46:19 verbose #30103 > > "file_system.delete_directory_async" 00:46:19 verbose #30104 > > fun () => { ex path = path |> get_file_name 00:46:19 verbose #30105 > > } 00:46:19 verbose #30106 > > async.sleep 10i32 |> async.do 00:46:19 verbose #30107 > > loop (retry + 1) |> async.return_await 00:46:19 verbose #30108 > > |> async.new_async 00:46:19 verbose #30109 > > loop 0 00:46:19 verbose #30110 > > | _ => fun () => null () 00:46:19 verbose #30111 > > 00:46:19 verbose #30112 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:46:19 verbose #30113 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:46:19 verbose #30114 > > │ ### trace_file │ 00:46:19 verbose #30115 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:46:19 verbose #30116 > > 00:46:19 verbose #30117 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:46:19 verbose #30118 > > let rec trace_file text = 00:46:19 verbose #30119 > > run_target function 00:46:19 verbose #30120 > > | Fsharp (Native) => fun () => 00:46:19 verbose #30121 > > try_unit 00:46:19 verbose #30122 > > fun () => 00:46:19 verbose #30123 > > inl assembly_name = env.get_entry_assembly_name () 00:46:19 verbose #30124 > > inl guid = date_time.now () |> date_time.new_guid_from_date_time 00:46:19 verbose #30125 > > inl file_name = $'$"{!assembly_name}_{!guid}.txt"' 00:46:19 verbose #30126 > > 00:46:19 verbose #30127 > > inl workspace_root = get_workspace_root () 00:46:19 verbose #30128 > > inl trace_dir = workspace_root </> "target/trace" 00:46:19 verbose #30129 > > trace_dir |> create_directory |> ignore 00:46:19 verbose #30130 > > inl path = trace_dir </> file_name 00:46:19 verbose #30131 > > text |> write_all_text_async path |> async.run_synchronously 00:46:19 verbose #30132 > > fun ex => 00:46:19 verbose #30133 > > trace_file $'$"file_system.trace_file / ex: %A{!ex}"' 00:46:19 verbose #30134 > > | _ => fun () => () 00:46:20 verbose #30135 > > 00:46:20 verbose #30136 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:46:20 verbose #30137 > > //// test 00:46:20 verbose #30138 > > 00:46:20 verbose #30139 > > inl get_count dir : i64 = 00:46:20 verbose #30140 > > inl files = dir |> directory_get_files 00:46:20 verbose #30141 > > a files |> am'.length 00:46:20 verbose #30142 > > 00:46:20 verbose #30143 > > inl trace_dir = get_workspace_root () </> "target/trace" 00:46:20 verbose #30144 > > trace_dir |> create_directory |> ignore 00:46:20 verbose #30145 > > 00:46:20 verbose #30146 > > inl count = get_count trace_dir 00:46:20 verbose #30147 > > 00:46:20 verbose #30148 > > trace_file "test" 00:46:20 verbose #30149 > > 00:46:20 verbose #30150 > > get_count trace_dir 00:46:20 verbose #30151 > > |> _assert_eq (count + 1) 00:46:21 verbose #30152 > > 00:46:21 verbose #30153 > > ╭─[ 1.18s - stdout ]───────────────────────────────────────────────────────────╮ 00:46:21 verbose #30154 > > │ __assert_eq / actual: 38L / expected: 38L │ 00:46:21 verbose #30155 > > │ │ 00:46:21 verbose #30156 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:46:21 verbose #30157 > > 00:46:21 verbose #30158 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:46:21 verbose #30159 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:46:21 verbose #30160 > > │ ### init_trace_file │ 00:46:21 verbose #30161 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:46:21 verbose #30162 > > 00:46:21 verbose #30163 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:46:21 verbose #30164 > > inl init_trace_file enabled = 00:46:21 verbose #30165 > > inl state_trace_file = get_trace_state_or_init None .trace_file 00:46:21 verbose #30166 > > state_trace_file <- if enabled then trace_file else ignore 00:46:21 verbose #30167 > > 00:46:21 verbose #30168 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:46:21 verbose #30169 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:46:21 verbose #30170 > > │ ## file_system │ 00:46:21 verbose #30171 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:46:21 verbose #30172 > > 00:46:21 verbose #30173 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:46:21 verbose #30174 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:46:21 verbose #30175 > > │ ### create_dir │ 00:46:21 verbose #30176 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:46:21 verbose #30177 > > 00:46:21 verbose #30178 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:46:21 verbose #30179 > > let create_dir dir = 00:46:21 verbose #30180 > > run_target function 00:46:21 verbose #30181 > > | Rust (Contract | Wasm) => fun () => null () 00:46:21 verbose #30182 > > | Rust (Native) => fun () => 00:46:21 verbose #30183 > > inl dir = join dir 00:46:21 verbose #30184 > > match dir |> create_dir_all |> resultm.map_error' sm'.format' |> 00:46:21 verbose #30185 > > resultm.unbox with 00:46:21 verbose #30186 > > | Ok () => 00:46:21 verbose #30187 > > trace Verbose 00:46:21 verbose #30188 > > fun () => "file_system.create_dir" 00:46:21 verbose #30189 > > fun () => { dir } 00:46:21 verbose #30190 > > | Error error => 00:46:21 verbose #30191 > > trace Critical 00:46:21 verbose #30192 > > fun () => "file_system.create_dir" 00:46:21 verbose #30193 > > fun () => { dir error } 00:46:21 verbose #30194 > > inl disposable : _ () = new_disposable fun () => 00:46:21 verbose #30195 > > dir 00:46:21 verbose #30196 > > |> directory_delete true 00:46:21 verbose #30197 > > disposable 00:46:21 verbose #30198 > > | _ => fun () => 00:46:21 verbose #30199 > > inl directory_info = dir |> create_directory 00:46:21 verbose #30200 > > inl exists' = directory_info |> directory_info_exists 00:46:21 verbose #30201 > > if not exists' then 00:46:21 verbose #30202 > > inl creation_time = directory_info |> 00:46:21 verbose #30203 > > directory_info_creation_time 00:46:21 verbose #30204 > > inl result = ($'{| Exists = !exists'; CreationTime = 00:46:21 verbose #30205 > > !creation_time |}' : infer) |> sm'.format_debug 00:46:21 verbose #30206 > > trace Debug 00:46:21 verbose #30207 > > fun () => "file_system.create_dir" 00:46:21 verbose #30208 > > fun () => { dir result } 00:46:21 verbose #30209 > > inl disposable : _ () = new_disposable fun () => 00:46:21 verbose #30210 > > dir 00:46:21 verbose #30211 > > |> delete_directory_async 00:46:21 verbose #30212 > > |> async.ignore 00:46:21 verbose #30213 > > |> async.run_synchronously 00:46:21 verbose #30214 > > disposable 00:46:22 verbose #30215 > > 00:46:22 verbose #30216 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:46:22 verbose #30217 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:46:22 verbose #30218 > > │ ### create_temp_dir │ 00:46:22 verbose #30219 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:46:22 verbose #30220 > > 00:46:22 verbose #30221 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:46:22 verbose #30222 > > inl create_temp_dir () = 00:46:22 verbose #30223 > > inl dir = create_temp_path () 00:46:22 verbose #30224 > > dir, dir |> create_dir 00:46:22 verbose #30225 > > 00:46:22 verbose #30226 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:46:22 verbose #30227 > > //// test 00:46:22 verbose #30228 > > 00:46:22 verbose #30229 > > inl path, disposable = create_temp_dir () 00:46:22 verbose #30230 > > disposable |> use |> ignore 00:46:22 verbose #30231 > > path 00:46:22 verbose #30232 > > |> directory_exists 00:46:22 verbose #30233 > > |> _assert_eq true 00:46:24 verbose #30234 > > 00:46:24 verbose #30235 > > ╭─[ 1.54s - stdout ]───────────────────────────────────────────────────────────╮ 00:46:24 verbose #30236 > > │ __assert_eq / actual: true / expected: true │ 00:46:24 verbose #30237 > > │ │ 00:46:24 verbose #30238 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:46:24 verbose #30239 > > 00:46:24 verbose #30240 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:46:24 verbose #30241 > > //// test 00:46:24 verbose #30242 > > ///! rust -d chrono 00:46:24 verbose #30243 > > 00:46:24 verbose #30244 > > inl path, disposable = create_temp_dir () 00:46:24 verbose #30245 > > path 00:46:24 verbose #30246 > > |> directory_exists 00:46:24 verbose #30247 > > |> _assert_eq true 00:46:24 verbose #30248 > > disposable |> use |> ignore 00:46:24 verbose #30249 > > path 00:46:24 verbose #30250 > > |> directory_exists 00:46:24 verbose #30251 > > |> _assert_eq false 00:46:43 verbose #30252 > > 00:46:43 verbose #30253 > > ╭─[ 18.88s - return value ]────────────────────────────────────────────────────╮ 00:46:43 verbose #30254 > > │ 00:00:00 verbose #1 file_system.create_dir / { dir = │ 00:46:43 verbose #30255 > > │ C:\Users\i574n\AppData\Local\Temp\!create_temp_path_\spiral_builder_970e6601 │ 00:46:43 verbose #30256 > > │ 6e95d746c82c6aa1c31cc5739dfb01fb69401fc55fa152f84349e98e\20240929-0304-2510- │ 00:46:43 verbose #30257 > > │ 7870-000000803d84 } │ 00:46:43 verbose #30258 > > │ __assert_eq / actual: true / expected: true │ 00:46:43 verbose #30259 > > │ __assert_eq / actual: false / expected: false │ 00:46:43 verbose #30260 > > │ │ 00:46:43 verbose #30261 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:46:43 verbose #30262 > > 00:46:43 verbose #30263 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:46:43 verbose #30264 > > //// test 00:46:43 verbose #30265 > > 00:46:43 verbose #30266 > > inl lock_directory path = 00:46:43 verbose #30267 > > fun () => 00:46:43 verbose #30268 > > trace Debug (fun () => "_1") id 00:46:43 verbose #30269 > > "0" |> write_all_text_async (path </> "test.txt") |> async.do 00:46:43 verbose #30270 > > file_stream 00:46:43 verbose #30271 > > (path </> "test.txt") 00:46:43 verbose #30272 > > ModeOpen 00:46:43 verbose #30273 > > AccessReadWrite 00:46:43 verbose #30274 > > ShareNone 00:46:43 verbose #30275 > > |> use 00:46:43 verbose #30276 > > |> ignore 00:46:43 verbose #30277 > > trace Debug (fun () => "_2") id 00:46:43 verbose #30278 > > async.sleep 2000 |> async.do 00:46:43 verbose #30279 > > trace Debug (fun () => "_3") id 00:46:43 verbose #30280 > > () |> return 00:46:43 verbose #30281 > > |> async.new_async 00:46:43 verbose #30282 > > 00:46:43 verbose #30283 > > inl temp_dir, disposable = create_temp_dir () 00:46:43 verbose #30284 > > disposable |> use |> ignore 00:46:43 verbose #30285 > > inl path = temp_dir </> "test" 00:46:43 verbose #30286 > > 00:46:43 verbose #30287 > > fun () => 00:46:43 verbose #30288 > > trace Debug (fun () => "1") id 00:46:43 verbose #30289 > > path |> create_directory |> ignore 00:46:43 verbose #30290 > > trace Debug (fun () => "2") id 00:46:43 verbose #30291 > > inl child = path |> lock_directory |> async.start_child |> async.let' 00:46:43 verbose #30292 > > trace Debug (fun () => "3") id 00:46:43 verbose #30293 > > async.sleep 60 |> async.do 00:46:43 verbose #30294 > > trace Debug (fun () => "4") id 00:46:43 verbose #30295 > > inl retries = path |> delete_directory_async |> async.let' 00:46:43 verbose #30296 > > trace Debug (fun () => "5") id 00:46:43 verbose #30297 > > child |> async.do 00:46:43 verbose #30298 > > trace Debug (fun () => "6") id 00:46:43 verbose #30299 > > retries |> return 00:46:43 verbose #30300 > > |> async.new_async_unit 00:46:43 verbose #30301 > > |> async.run_with_timeout 3000 00:46:43 verbose #30302 > > |> fun x => x : _ i64 00:46:43 verbose #30303 > > |> function 00:46:43 verbose #30304 > > | Some (retries : i64) => 00:46:43 verbose #30305 > > retries 00:46:43 verbose #30306 > > |> _assert_between 00:46:43 verbose #30307 > > (if platform.is_windows () then 50 else 0) 00:46:43 verbose #30308 > > (if platform.is_windows () then 180 else 0) 00:46:43 verbose #30309 > > 00:46:43 verbose #30310 > > true 00:46:43 verbose #30311 > > | _ => false 00:46:43 verbose #30312 > > |> _assert_eq true 00:46:47 verbose #30313 > > 00:46:47 verbose #30314 > > ╭─[ 4.37s - stdout ]───────────────────────────────────────────────────────────╮ 00:46:47 verbose #30315 > > │ 00:00:00 debug #1 1 │ 00:46:47 verbose #30316 > > │ 00:00:00 debug #2 2 │ 00:46:47 verbose #30317 > > │ 00:00:00 debug #3 3 │ 00:46:47 verbose #30318 > > │ 00:00:00 debug #4 _1 │ 00:46:47 verbose #30319 > > │ 00:00:00 debug #5 _2 │ 00:46:47 verbose #30320 > > │ 00:00:00 debug #6 4 │ 00:46:47 verbose #30321 > > │ 00:00:00 debug #7 file_system.delete_directory_async / { ex = │ 00:46:47 verbose #30322 > > │ System.IO.IOException: The process cannot access the file 'test.txt' because │ 00:46:47 verbose #30323 > > │ it is being used by another process.; path = test } │ 00:46:47 verbose #30324 > > │ 00:00:01 debug #8 file_system.delete_directory_async / { ex = │ 00:46:47 verbose #30325 > > │ System.IO.IOException: The process cannot access the file 'test.txt' because │ 00:46:47 verbose #30326 > > │ it is being used by another process.; path = test } │ 00:46:47 verbose #30327 > > │ 00:00:02 debug #9 _3 │ 00:46:47 verbose #30328 > > │ 00:00:02 debug #10 5 │ 00:46:47 verbose #30329 > > │ 00:00:02 debug #11 6 │ 00:46:47 verbose #30330 > > │ __assert_between / actual: 123L / expected: struct (50L, 180L) │ 00:46:47 verbose #30331 > > │ __assert_eq / actual: true / expected: true │ 00:46:47 verbose #30332 > > │ │ 00:46:47 verbose #30333 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:46:47 verbose #30334 > > 00:46:47 verbose #30335 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:46:47 verbose #30336 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:46:47 verbose #30337 > > │ ### create_temp_dir' │ 00:46:47 verbose #30338 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:46:47 verbose #30339 > > 00:46:47 verbose #30340 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:46:47 verbose #30341 > > inl create_temp_dir' (hash : string) = 00:46:47 verbose #30342 > > inl dir = hash |> guid.hash_guid |> create_temp_path' 00:46:47 verbose #30343 > > dir, dir |> create_dir 00:46:48 verbose #30344 > > 00:46:48 verbose #30345 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:46:48 verbose #30346 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:46:48 verbose #30347 > > │ ### link_directory │ 00:46:48 verbose #30348 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:46:48 verbose #30349 > > 00:46:48 verbose #30350 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:46:48 verbose #30351 > > let link_directory target_path path = 00:46:48 verbose #30352 > > if target_path |> directory_exists |> not 00:46:48 verbose #30353 > > then target_path |> create_dir |> ignore 00:46:48 verbose #30354 > > 00:46:48 verbose #30355 > > inl lib_dir_path = path |> get_directory_name 00:46:48 verbose #30356 > > if lib_dir_path |> directory_exists |> not 00:46:48 verbose #30357 > > then lib_dir_path |> create_dir |> ignore 00:46:48 verbose #30358 > > 00:46:48 verbose #30359 > > if (path |> directory_exists) 00:46:48 verbose #30360 > > && (path |> read_link |> resultm.is_err) then 00:46:48 verbose #30361 > > path |> directory_delete true 00:46:48 verbose #30362 > > 00:46:48 verbose #30363 > > if path |> directory_exists |> not then 00:46:48 verbose #30364 > > path |> directory_create_symbolic_link target_path 00:46:48 verbose #30365 > > 00:46:48 verbose #30366 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:46:48 verbose #30367 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:46:48 verbose #30368 > > │ ### link_file │ 00:46:48 verbose #30369 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:46:48 verbose #30370 > > 00:46:48 verbose #30371 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:46:48 verbose #30372 > > let link_file target_path path = 00:46:48 verbose #30373 > > if (path |> file_exists) 00:46:48 verbose #30374 > > && (path |> read_link |> resultm.is_err) then 00:46:48 verbose #30375 > > path |> file_delete 00:46:48 verbose #30376 > > 00:46:48 verbose #30377 > > if path |> file_exists |> not then 00:46:48 verbose #30378 > > path |> file_create_symbolic_link target_path 00:46:48 verbose #30379 > > 00:46:48 verbose #30380 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:46:48 verbose #30381 > > //// test 00:46:48 verbose #30382 > > ///! fsharp 00:46:48 verbose #30383 > > ///! rust -d sha2 regex 00:46:48 verbose #30384 > > 00:46:48 verbose #30385 > > inl file_name = "LICENSE" 00:46:48 verbose #30386 > > inl text = file_name 00:46:48 verbose #30387 > > 00:46:48 verbose #30388 > > inl test_hash = 00:46:48 verbose #30389 > > (file_name, text) 00:46:48 verbose #30390 > > |> sm'.format_debug 00:46:48 verbose #30391 > > |> crypto.hash_text 00:46:48 verbose #30392 > > 00:46:48 verbose #30393 > > inl workspace_root = get_workspace_root () 00:46:48 verbose #30394 > > inl test_dir = workspace_root </> "target/test/file_system" </> test_hash 00:46:48 verbose #30395 > > 00:46:48 verbose #30396 > > inl disposable = test_dir |> create_dir 00:46:48 verbose #30397 > > 00:46:48 verbose #30398 > > inl dir_path = test_dir </> "dir1" 00:46:48 verbose #30399 > > 00:46:48 verbose #30400 > > if dir_path |> directory_exists 00:46:48 verbose #30401 > > then dir_path |> directory_delete true 00:46:48 verbose #30402 > > 00:46:48 verbose #30403 > > dir_path |> create_dir |> ignore 00:46:48 verbose #30404 > > 00:46:48 verbose #30405 > > inl path = dir_path </> file_name 00:46:48 verbose #30406 > > text |> write_all_text path 00:46:48 verbose #30407 > > 00:46:48 verbose #30408 > > inl dir_link_path = test_dir </> "link1" 00:46:48 verbose #30409 > > 00:46:48 verbose #30410 > > dir_link_path |> link_directory dir_path 00:46:48 verbose #30411 > > 00:46:48 verbose #30412 > > inl link_path = dir_link_path </> file_name 00:46:48 verbose #30413 > > 00:46:48 verbose #30414 > > link_path 00:46:48 verbose #30415 > > |> read_all_text 00:46:48 verbose #30416 > > |> _assert_eq text 00:46:48 verbose #30417 > > 00:46:48 verbose #30418 > > dir_link_path 00:46:48 verbose #30419 > > |> read_link 00:46:48 verbose #30420 > > |> resultm.unwrap' 00:46:48 verbose #30421 > > |> path_buf_display 00:46:48 verbose #30422 > > |> convert 00:46:48 verbose #30423 > > |> _assert sm'.ends_with "dir1" 00:46:48 verbose #30424 > > 00:46:48 verbose #30425 > > link_path 00:46:48 verbose #30426 > > |> read_link 00:46:48 verbose #30427 > > |> resultm.unwrap' 00:46:48 verbose #30428 > > |> path_buf_display 00:46:48 verbose #30429 > > |> convert 00:46:48 verbose #30430 > > |> _assert sm'.ends_with "LICENSE" 00:46:48 verbose #30431 > > 00:46:48 verbose #30432 > > inl link_name = "LICENSE_" 00:46:48 verbose #30433 > > 00:46:48 verbose #30434 > > inl link_path = dir_path </> link_name 00:46:48 verbose #30435 > > 00:46:48 verbose #30436 > > link_path |> link_file path 00:46:48 verbose #30437 > > 00:46:48 verbose #30438 > > inl link_path' = dir_link_path </> link_name 00:46:48 verbose #30439 > > 00:46:48 verbose #30440 > > link_path' 00:46:48 verbose #30441 > > |> read_all_text 00:46:48 verbose #30442 > > |> _assert_eq text 00:46:48 verbose #30443 > > 00:46:48 verbose #30444 > > link_path 00:46:48 verbose #30445 > > |> read_link 00:46:48 verbose #30446 > > |> resultm.unwrap' 00:46:48 verbose #30447 > > |> path_buf_display 00:46:48 verbose #30448 > > |> convert 00:46:48 verbose #30449 > > |> _assert sm'.ends_with "LICENSE" 00:46:48 verbose #30450 > > 00:46:48 verbose #30451 > > link_path' 00:46:48 verbose #30452 > > |> read_link 00:46:48 verbose #30453 > > |> resultm.unwrap' 00:46:48 verbose #30454 > > |> path_buf_display 00:46:48 verbose #30455 > > |> convert 00:46:48 verbose #30456 > > |> _assert sm'.ends_with "LICENSE" 00:46:48 verbose #30457 > > 00:46:48 verbose #30458 > > disposable |> use |> ignore 00:47:31 verbose #30459 > > 00:47:31 verbose #30460 > > ╭─[ 42.71s - return value ]────────────────────────────────────────────────────╮ 00:47:31 verbose #30461 > > │ │ 00:47:31 verbose #30462 > > │ .rs output (rust -d sha2 regex): │ 00:47:31 verbose #30463 > > │ 00:00:00 verbose #1 file_system.create_dir / { dir = │ 00:47:31 verbose #30464 > > │ c:\home\git\polyglot\target/test/file_system\17e16cea7984b0e6f403259e33e4959 │ 00:47:31 verbose #30465 > > │ 2eda85aedd790ed910e9f3e619d9cd257 } │ 00:47:31 verbose #30466 > > │ 00:00:00 verbose #2 file_system.create_dir / { dir = │ 00:47:31 verbose #30467 > > │ c:\home\git\polyglot\target/test/file_system\17e16cea7984b0e6f403259e33e4959 │ 00:47:31 verbose #30468 > > │ 2eda85aedd790ed910e9f3e619d9cd257\dir1 } │ 00:47:31 verbose #30469 > > │ __assert_eq / actual: "LICENSE" / expected: "LICENSE" │ 00:47:31 verbose #30470 > > │ __assert / actual: "dir1" / expected: │ 00:47:31 verbose #30471 > > │ "c:\home\git\polyglot\target\test\file_system\17e16cea7984b0e6f403259e33e495 │ 00:47:31 verbose #30472 > > │ 92eda85aedd790ed910e9f3e619d9cd257\dir1" │ 00:47:31 verbose #30473 > > │ __assert / actual: "LICENSE" / expected: │ 00:47:31 verbose #30474 > > │ "c:\home\git\polyglot\target\test\file_system\17e16cea7984b0e6f403259e33e495 │ 00:47:31 verbose #30475 > > │ 92eda85aedd790ed910e9f3e619d9cd257\dir1\LICENSE" │ 00:47:31 verbose #30476 > > │ __assert_eq / actual: "LICENSE" / expected: "LICENSE" │ 00:47:31 verbose #30477 > > │ __assert / actual: "LICENSE" / expected: │ 00:47:31 verbose #30478 > > │ "c:\home\git\polyglot\target\test\file_system\17e16cea7984b0e6f403259e33e495 │ 00:47:31 verbose #30479 > > │ 92eda85aedd790ed910e9f3e619d9cd257\dir1\LICENSE" │ 00:47:31 verbose #30480 > > │ __assert / actual: "LICENSE" / expected: │ 00:47:31 verbose #30481 > > │ "c:\home\git\polyglot\target\test\file_system\17e16cea7984b0e6f403259e33e495 │ 00:47:31 verbose #30482 > > │ 92eda85aedd790ed910e9f3e619d9cd257\dir1\LICENSE" │ 00:47:31 verbose #30483 > > │ │ 00:47:31 verbose #30484 > > │ │ 00:47:31 verbose #30485 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:47:31 verbose #30486 > > 00:47:31 verbose #30487 > > ╭─[ 42.71s - stdout ]──────────────────────────────────────────────────────────╮ 00:47:31 verbose #30488 > > │ .fsx output: │ 00:47:31 verbose #30489 > > │ __assert_eq / actual: "LICENSE" / expected: "LICENSE" │ 00:47:31 verbose #30490 > > │ __assert / actual: "dir1" / expected: │ 00:47:31 verbose #30491 > > │ "C:\home\git\polyglot\target\test\file_system\8f260c25ec3f6eaaf0d0d1b67ed9c4 │ 00:47:31 verbose #30492 > > │ 7873a182ca04606835404e641a952871da\dir1" │ 00:47:31 verbose #30493 > > │ __assert / actual: "LICENSE" / expected: │ 00:47:31 verbose #30494 > > │ "C:\home\git\polyglot\target\test\file_system\8f260c25ec3f6eaaf0d0d1b67ed9c4 │ 00:47:31 verbose #30495 > > │ 7873a182ca04606835404e641a952871da\dir1\LICENSE" │ 00:47:31 verbose #30496 > > │ __assert_eq / actual: "LICENSE" / expected: "LICENSE" │ 00:47:31 verbose #30497 > > │ __assert / actual: "LICENSE" / expected: │ 00:47:31 verbose #30498 > > │ "C:\home\git\polyglot\target\test\file_system\8f260c25ec3f6eaaf0d0d1b67ed9c4 │ 00:47:31 verbose #30499 > > │ 7873a182ca04606835404e641a952871da\dir1\LICENSE" │ 00:47:31 verbose #30500 > > │ __assert / actual: "LICENSE" / expected: │ 00:47:31 verbose #30501 > > │ "C:\home\git\polyglot\target\test\file_system\8f260c25ec3f6eaaf0d0d1b67ed9c4 │ 00:47:31 verbose #30502 > > │ 7873a182ca04606835404e641a952871da\dir1\LICENSE" │ 00:47:31 verbose #30503 > > │ │ 00:47:31 verbose #30504 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:47:31 verbose #30505 > > 00:47:31 verbose #30506 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:47:31 verbose #30507 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:47:31 verbose #30508 > > │ ## rust │ 00:47:31 verbose #30509 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:47:31 verbose #30510 > > 00:47:31 verbose #30511 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:47:31 verbose #30512 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:47:31 verbose #30513 > > │ ### file_exists_content │ 00:47:31 verbose #30514 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:47:31 verbose #30515 > > 00:47:31 verbose #30516 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:47:31 verbose #30517 > > let file_exists_content path content : bool = 00:47:31 verbose #30518 > > run_target function 00:47:31 verbose #30519 > > | Rust (Native) => fun () => 00:47:31 verbose #30520 > > if path |> file_exists |> not 00:47:31 verbose #30521 > > then false 00:47:31 verbose #30522 > > else 00:47:31 verbose #30523 > > inl existing_content = path |> read_all_text 00:47:31 verbose #30524 > > content = existing_content 00:47:31 verbose #30525 > > | _ => fun () => null () 00:47:32 verbose #30526 > > 00:47:32 verbose #30527 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:47:32 verbose #30528 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:47:32 verbose #30529 > > │ ### write_all_text_exists │ 00:47:32 verbose #30530 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:47:32 verbose #30531 > > 00:47:32 verbose #30532 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:47:32 verbose #30533 > > let write_all_text_exists path contents = 00:47:32 verbose #30534 > > inl exists' = contents |> file_exists_content path 00:47:32 verbose #30535 > > if not exists' then 00:47:32 verbose #30536 > > inl dir = path |> get_directory_name 00:47:32 verbose #30537 > > if dir |> directory_exists |> not 00:47:32 verbose #30538 > > then dir |> create_dir |> ignore 00:47:32 verbose #30539 > > contents |> write_all_text path 00:47:32 verbose #30540 > > 00:47:32 verbose #30541 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:47:32 verbose #30542 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:47:32 verbose #30543 > > │ ## fsharp │ 00:47:32 verbose #30544 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:47:32 verbose #30545 > > 00:47:32 verbose #30546 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:47:32 verbose #30547 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:47:32 verbose #30548 > > │ ### wait_for_file_access │ 00:47:32 verbose #30549 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:47:32 verbose #30550 > > 00:47:32 verbose #30551 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:47:32 verbose #30552 > > inl wait_for_file_access access path = 00:47:32 verbose #30553 > > run_target function 00:47:32 verbose #30554 > > | Fsharp (Native) => fun () => 00:47:32 verbose #30555 > > inl file_access, file_share = 00:47:32 verbose #30556 > > access 00:47:32 verbose #30557 > > |> optionm'.default_value (AccessReadWrite, ShareRead) 00:47:32 verbose #30558 > > let rec loop (retry : i64) : _ i64 = 00:47:32 verbose #30559 > > fun () => 00:47:32 verbose #30560 > > try_unit 00:47:32 verbose #30561 > > fun () => 00:47:32 verbose #30562 > > file_stream 00:47:32 verbose #30563 > > path 00:47:32 verbose #30564 > > ModeOpen 00:47:32 verbose #30565 > > file_access 00:47:32 verbose #30566 > > file_share 00:47:32 verbose #30567 > > |> use 00:47:32 verbose #30568 > > |> ignore 00:47:32 verbose #30569 > > retry |> return 00:47:32 verbose #30570 > > fun ex => 00:47:32 verbose #30571 > > if retry > 0 && retry % 100i64 = 0 then 00:47:32 verbose #30572 > > inl ex = ex |> sm'.format_exception 00:47:32 verbose #30573 > > trace Debug 00:47:32 verbose #30574 > > fun () => "file_system.wait_for_file_access" 00:47:32 verbose #30575 > > fun () => { path = path |> get_file_name; 00:47:32 verbose #30576 > > retry ex } 00:47:32 verbose #30577 > > async.sleep 10i32 |> async.do 00:47:32 verbose #30578 > > loop (retry + 1) |> async.return_await 00:47:32 verbose #30579 > > |> async.new_async 00:47:32 verbose #30580 > > loop 0 00:47:32 verbose #30581 > > | _ => fun () => null () 00:47:32 verbose #30582 > > 00:47:32 verbose #30583 > > inl wait_for_file_access_read path = 00:47:32 verbose #30584 > > path 00:47:32 verbose #30585 > > |> wait_for_file_access (Some ( 00:47:32 verbose #30586 > > AccessRead, 00:47:32 verbose #30587 > > ShareRead 00:47:32 verbose #30588 > > )) 00:47:33 verbose #30589 > > 00:47:33 verbose #30590 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:47:33 verbose #30591 > > //// test 00:47:33 verbose #30592 > > 00:47:33 verbose #30593 > > inl lock_file path = 00:47:33 verbose #30594 > > fun () => 00:47:33 verbose #30595 > > trace Debug (fun () => "_1") id 00:47:33 verbose #30596 > > inl stream : file_stream' = 00:47:33 verbose #30597 > > file_stream 00:47:33 verbose #30598 > > path 00:47:33 verbose #30599 > > ModeOpen 00:47:33 verbose #30600 > > AccessReadWrite 00:47:33 verbose #30601 > > ShareNone 00:47:33 verbose #30602 > > |> use 00:47:33 verbose #30603 > > trace Debug (fun () => "_2") id 00:47:33 verbose #30604 > > async.sleep 2000 |> async.do 00:47:33 verbose #30605 > > trace Debug (fun () => "_3") id 00:47:33 verbose #30606 > > ($'!stream.Seek (0L, System.IO.SeekOrigin.Begin)' : i64) |> ignore 00:47:33 verbose #30607 > > trace Debug (fun () => "_4") id 00:47:33 verbose #30608 > > $'!stream.WriteByte' 49u8 00:47:33 verbose #30609 > > trace Debug (fun () => "_5") id 00:47:33 verbose #30610 > > stream |> $'_.Flush()' 00:47:33 verbose #30611 > > trace Debug (fun () => "_6") id 00:47:33 verbose #30612 > > |> async.new_async 00:47:33 verbose #30613 > > 00:47:33 verbose #30614 > > inl file_name = "test.txt" 00:47:33 verbose #30615 > > inl text = "0" 00:47:33 verbose #30616 > > 00:47:33 verbose #30617 > > inl temp_dir, disposable = 00:47:33 verbose #30618 > > (file_name, text) 00:47:33 verbose #30619 > > |> sm'.format_debug 00:47:33 verbose #30620 > > |> crypto.hash_text 00:47:33 verbose #30621 > > |> create_temp_dir' 00:47:33 verbose #30622 > > disposable |> use |> ignore 00:47:33 verbose #30623 > > inl path = temp_dir </> file_name 00:47:33 verbose #30624 > > 00:47:33 verbose #30625 > > fun () => 00:47:33 verbose #30626 > > trace Debug (fun () => "1") id 00:47:33 verbose #30627 > > text |> write_all_text_async path |> async.do 00:47:33 verbose #30628 > > trace Debug (fun () => "2") id 00:47:33 verbose #30629 > > inl child = path |> lock_file |> async.start_child |> async.let' 00:47:33 verbose #30630 > > trace Debug (fun () => "3") id 00:47:33 verbose #30631 > > async.sleep 1 |> async.do 00:47:33 verbose #30632 > > trace Debug (fun () => "4") id 00:47:33 verbose #30633 > > inl retries = path |> wait_for_file_access None |> async.let' 00:47:33 verbose #30634 > > trace Debug (fun () => "5") id 00:47:33 verbose #30635 > > inl text = path |> read_all_text_async |> async.let' 00:47:33 verbose #30636 > > trace Debug (fun () => "6") id 00:47:33 verbose #30637 > > child |> async.do 00:47:33 verbose #30638 > > trace Debug (fun () => "7") id 00:47:33 verbose #30639 > > (retries, text) |> return 00:47:33 verbose #30640 > > |> async.new_async_unit 00:47:33 verbose #30641 > > |> async.run_with_timeout 3000 00:47:33 verbose #30642 > > |> function 00:47:33 verbose #30643 > > | Some ((retries : i64), text) => 00:47:33 verbose #30644 > > retries 00:47:33 verbose #30645 > > |> _assert_between 00:47:33 verbose #30646 > > (if platform.is_windows () then 50 else 100) 00:47:33 verbose #30647 > > (if platform.is_windows () then 180 else 200) 00:47:33 verbose #30648 > > 00:47:33 verbose #30649 > > text |> _assert_eq (join "1") 00:47:33 verbose #30650 > > 00:47:33 verbose #30651 > > true 00:47:33 verbose #30652 > > | _ => false 00:47:33 verbose #30653 > > |> _assert_eq true 00:47:37 verbose #30654 > > 00:47:37 verbose #30655 > > ╭─[ 4.42s - stdout ]───────────────────────────────────────────────────────────╮ 00:47:37 verbose #30656 > > │ 00:00:00 debug #1 1 │ 00:47:37 verbose #30657 > > │ 00:00:00 debug #2 2 │ 00:47:37 verbose #30658 > > │ 00:00:00 debug #3 3 │ 00:47:37 verbose #30659 > > │ 00:00:00 debug #3 _1 │ 00:47:37 verbose #30660 > > │ 00:00:00 debug #5 _2 │ 00:47:37 verbose #30661 > > │ 00:00:00 debug #6 4 │ 00:47:37 verbose #30662 > > │ 00:00:01 debug #7 file_system.wait_for_file_access / { path = │ 00:47:37 verbose #30663 > > │ test.txt; retry = 100; ex = System.IO.IOException: The process cannot access │ 00:47:37 verbose #30664 > > │ the file │ 00:47:37 verbose #30665 > > │ 'C:\Users\i574n\AppData\Local\Temp\!create_temp_path_\dotnet-repl\613830ed-0 │ 00:47:37 verbose #30666 > > │ 16e-d959-8d21-02dc1c63c252\test.txt' because it is being used by another │ 00:47:37 verbose #30667 > > │ process. } │ 00:47:37 verbose #30668 > > │ 00:00:02 debug #8 _3 │ 00:47:37 verbose #30669 > > │ 00:00:02 debug #9 _4 │ 00:47:37 verbose #30670 > > │ 00:00:02 debug #10 _5 │ 00:47:37 verbose #30671 > > │ 00:00:02 debug #11 _6 │ 00:47:37 verbose #30672 > > │ 00:00:02 debug #12 5 │ 00:47:37 verbose #30673 > > │ 00:00:02 debug #13 6 │ 00:47:37 verbose #30674 > > │ 00:00:02 debug #14 7 │ 00:47:37 verbose #30675 > > │ __assert_between / actual: 130L / expected: struct (50L, 180L) │ 00:47:37 verbose #30676 > > │ __assert_eq / actual: "1" / expected: "1" │ 00:47:37 verbose #30677 > > │ __assert_eq / actual: true / expected: true │ 00:47:37 verbose #30678 > > │ │ 00:47:37 verbose #30679 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:47:37 verbose #30680 > > 00:47:37 verbose #30681 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:47:37 verbose #30682 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:47:37 verbose #30683 > > │ ### read_all_text_retry_async │ 00:47:37 verbose #30684 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:47:37 verbose #30685 > > 00:47:37 verbose #30686 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:47:37 verbose #30687 > > inl read_all_text_retry_async full_path : async.async (optionm'.option' string) 00:47:37 verbose #30688 > > = 00:47:37 verbose #30689 > > run_target function 00:47:37 verbose #30690 > > | Fsharp (Native) => fun () => 00:47:37 verbose #30691 > > let rec loop (retry : i64) = 00:47:37 verbose #30692 > > fun () => 00:47:37 verbose #30693 > > try_unit 00:47:37 verbose #30694 > > fun () => 00:47:37 verbose #30695 > > if retry > 0 00:47:37 verbose #30696 > > then 00:47:37 verbose #30697 > > full_path 00:47:37 verbose #30698 > > |> wait_for_file_access_read 00:47:37 verbose #30699 > > |> async.run_with_timeout_async 1000 00:47:37 verbose #30700 > > |> async.ignore 00:47:37 verbose #30701 > > |> async.do 00:47:37 verbose #30702 > > full_path |> read_all_text_async |> async.map (Some 00:47:37 verbose #30703 > > >> optionm'.box) |> async.return_await 00:47:37 verbose #30704 > > fun ex => 00:47:37 verbose #30705 > > fix_condition 00:47:37 verbose #30706 > > fun () => retry <> 0 00:47:37 verbose #30707 > > fun () => 00:47:37 verbose #30708 > > inl ex = ex |> sm'.format_exception 00:47:37 verbose #30709 > > trace Debug 00:47:37 verbose #30710 > > fun () => $'"read_all_text_retry_async"' 00:47:37 verbose #30711 > > fun () => { retry ex } 00:47:37 verbose #30712 > > (None : _ string) |> optionm'.box |> return 00:47:37 verbose #30713 > > fun () => 00:47:37 verbose #30714 > > loop (retry + 1) |> async.return_await 00:47:37 verbose #30715 > > |> async.new_async 00:47:37 verbose #30716 > > loop 0 00:47:37 verbose #30717 > > | _ => fun () => null () 00:47:38 verbose #30718 > > 00:47:38 verbose #30719 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:47:38 verbose #30720 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:47:38 verbose #30721 > > │ ### move_file_async │ 00:47:38 verbose #30722 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:47:38 verbose #30723 > > 00:47:38 verbose #30724 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:47:38 verbose #30725 > > inl move_file_async new_path old_path : _ i64 = 00:47:38 verbose #30726 > > run_target function 00:47:38 verbose #30727 > > | Fsharp (Native) => fun () => 00:47:38 verbose #30728 > > let rec loop (retry : i64) = 00:47:38 verbose #30729 > > fun () => 00:47:38 verbose #30730 > > try_unit 00:47:38 verbose #30731 > > fun () => 00:47:38 verbose #30732 > > old_path |> file_move new_path 00:47:38 verbose #30733 > > return retry 00:47:38 verbose #30734 > > fun ex => 00:47:38 verbose #30735 > > if retry % 100 = 0 then 00:47:38 verbose #30736 > > 00:47:38 verbose #30737 > > trace Warning 00:47:38 verbose #30738 > > fun () => "move_file_async" 00:47:38 verbose #30739 > > fun () => { 00:47:38 verbose #30740 > > old_path = old_path |> get_file_name 00:47:38 verbose #30741 > > new_path = new_path |> get_file_name 00:47:38 verbose #30742 > > ex 00:47:38 verbose #30743 > > } 00:47:38 verbose #30744 > > async.sleep 10 |> async.do 00:47:38 verbose #30745 > > loop (retry + 1) |> async.return_await 00:47:38 verbose #30746 > > |> async.new_async_unit 00:47:38 verbose #30747 > > loop 0 00:47:38 verbose #30748 > > | _ => fun () => null () 00:47:38 verbose #30749 > > 00:47:38 verbose #30750 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:47:38 verbose #30751 > > //// test 00:47:38 verbose #30752 > > 00:47:38 verbose #30753 > > inl lock_file path = 00:47:38 verbose #30754 > > fun () => 00:47:38 verbose #30755 > > trace Debug (fun () => "_1") id 00:47:38 verbose #30756 > > file_stream 00:47:38 verbose #30757 > > path 00:47:38 verbose #30758 > > ModeOpen 00:47:38 verbose #30759 > > AccessReadWrite 00:47:38 verbose #30760 > > ShareNone 00:47:38 verbose #30761 > > |> use 00:47:38 verbose #30762 > > |> ignore 00:47:38 verbose #30763 > > trace Debug (fun () => "_2") id 00:47:38 verbose #30764 > > async.sleep 2000 |> async.do 00:47:38 verbose #30765 > > trace Debug (fun () => "_3") id 00:47:38 verbose #30766 > > |> async.new_async 00:47:38 verbose #30767 > > 00:47:38 verbose #30768 > > fun () => 00:47:38 verbose #30769 > > inl file_name = "test.txt" 00:47:38 verbose #30770 > > inl text = "0" 00:47:38 verbose #30771 > > 00:47:38 verbose #30772 > > inl temp_dir, disposable = 00:47:38 verbose #30773 > > (file_name, text) 00:47:38 verbose #30774 > > |> sm'.format_debug 00:47:38 verbose #30775 > > |> crypto.hash_text 00:47:38 verbose #30776 > > |> create_temp_dir' 00:47:38 verbose #30777 > > disposable |> use |> ignore 00:47:38 verbose #30778 > > let path = temp_dir </> file_name 00:47:38 verbose #30779 > > let new_path = temp_dir </> "test2.txt" 00:47:38 verbose #30780 > > 00:47:38 verbose #30781 > > trace Debug (fun () => "1") id 00:47:38 verbose #30782 > > text |> write_all_text_async path |> async.do 00:47:38 verbose #30783 > > trace Debug (fun () => "2") id 00:47:38 verbose #30784 > > inl child = lock_file path |> async.start_child |> async.let' 00:47:38 verbose #30785 > > trace Debug (fun () => "3") id 00:47:38 verbose #30786 > > async.sleep 1 |> async.do 00:47:38 verbose #30787 > > trace Debug (fun () => "4") id 00:47:38 verbose #30788 > > inl retries1 = path |> move_file_async new_path |> async.let' 00:47:38 verbose #30789 > > trace Debug (fun () => "5") id 00:47:38 verbose #30790 > > inl retries2 = new_path |> wait_for_file_access None |> async.let' 00:47:38 verbose #30791 > > trace Debug (fun () => "6") id 00:47:38 verbose #30792 > > inl text = new_path |> read_all_text_async |> async.let' 00:47:38 verbose #30793 > > trace Debug (fun () => "7") id 00:47:38 verbose #30794 > > child |> async.do 00:47:38 verbose #30795 > > trace Debug (fun () => "8") id 00:47:38 verbose #30796 > > (retries1, retries2, text) |> return 00:47:38 verbose #30797 > > |> async.new_async_unit 00:47:38 verbose #30798 > > |> async.run_with_timeout 3000 00:47:38 verbose #30799 > > |> function 00:47:38 verbose #30800 > > | Some (retries1, retries2, text) => 00:47:38 verbose #30801 > > retries1 00:47:38 verbose #30802 > > |> _assert_between 00:47:38 verbose #30803 > > (if platform.is_windows () then 50i64 else 0) 00:47:38 verbose #30804 > > (if platform.is_windows () then 200 else 0) 00:47:38 verbose #30805 > > 00:47:38 verbose #30806 > > retries2 00:47:38 verbose #30807 > > |> _assert_between 00:47:38 verbose #30808 > > (if platform.is_windows () then 0i64 else 100) 00:47:38 verbose #30809 > > (if platform.is_windows () then 0 else 200) 00:47:38 verbose #30810 > > 00:47:38 verbose #30811 > > text |> _assert_eq (join "0") 00:47:38 verbose #30812 > > 00:47:38 verbose #30813 > > true 00:47:38 verbose #30814 > > | _ => false 00:47:38 verbose #30815 > > |> _assert_eq true 00:47:43 verbose #30816 > > 00:47:43 verbose #30817 > > ╭─[ 4.72s - stdout ]───────────────────────────────────────────────────────────╮ 00:47:43 verbose #30818 > > │ 00:00:00 debug #1 1 │ 00:47:43 verbose #30819 > > │ 00:00:00 debug #2 2 │ 00:47:43 verbose #30820 > > │ 00:00:00 debug #3 3 │ 00:47:43 verbose #30821 > > │ 00:00:00 debug #3 _1 │ 00:47:43 verbose #30822 > > │ 00:00:00 debug #5 _2 │ 00:47:43 verbose #30823 > > │ 00:00:00 debug #6 4 │ 00:47:43 verbose #30824 > > │ 00:00:00 warning #7 move_file_async / { old_path = test.txt; new_path = │ 00:47:43 verbose #30825 > > │ test2.txt; ex = System.IO.IOException: The process cannot access the file │ 00:47:43 verbose #30826 > > │ because it is being used by another process. │ 00:47:43 verbose #30827 > > │ at System.IO.FileSystem.MoveFile(String sourceFullPath, String │ 00:47:43 verbose #30828 > > │ destFullPath, Boolean overwrite) │ 00:47:43 verbose #30829 > > │ at FSI_0125.method56@4522-1.Invoke(Unit unitVar) │ 00:47:43 verbose #30830 > > │ at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[ │ 00:47:43 verbose #30831 > > │ T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in │ 00:47:43 verbose #30832 > > │ D:\a\_work\1\s\src\FSharp.Core\async.fs:line 510 │ 00:47:43 verbose #30833 > > │ at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) │ 00:47:43 verbose #30834 > > │ in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 112 } │ 00:47:43 verbose #30835 > > │ 00:00:01 warning #8 move_file_async / { old_path = test.txt; new_path = │ 00:47:43 verbose #30836 > > │ test2.txt; ex = System.IO.IOException: The process cannot access the file │ 00:47:43 verbose #30837 > > │ because it is being used by another process. │ 00:47:43 verbose #30838 > > │ at System.IO.FileSystem.MoveFile(String sourceFullPath, String │ 00:47:43 verbose #30839 > > │ destFullPath, Boolean overwrite) │ 00:47:43 verbose #30840 > > │ at FSI_0125.method56@4522-1.Invoke(Unit unitVar) │ 00:47:43 verbose #30841 > > │ at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[ │ 00:47:43 verbose #30842 > > │ T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in │ 00:47:43 verbose #30843 > > │ D:\a\_work\1\s\src\FSharp.Core\async.fs:line 510 │ 00:47:43 verbose #30844 > > │ at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) │ 00:47:43 verbose #30845 > > │ in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 112 } │ 00:47:43 verbose #30846 > > │ 00:00:02 debug #9 _3 │ 00:47:43 verbose #30847 > > │ 00:00:02 debug #10 5 │ 00:47:43 verbose #30848 > > │ 00:00:02 debug #11 6 │ 00:47:43 verbose #30849 > > │ 00:00:02 debug #12 7 │ 00:47:43 verbose #30850 > > │ 00:00:02 debug #13 8 │ 00:47:43 verbose #30851 > > │ __assert_between / actual: 128L / expected: struct (50L, 200L) │ 00:47:43 verbose #30852 > > │ __assert_between / actual: 0L / expected: struct (0L, 0L) │ 00:47:43 verbose #30853 > > │ __assert_eq / actual: "0" / expected: "0" │ 00:47:43 verbose #30854 > > │ __assert_eq / actual: true / expected: true │ 00:47:43 verbose #30855 > > │ │ 00:47:43 verbose #30856 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:47:43 verbose #30857 > > 00:47:43 verbose #30858 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:47:43 verbose #30859 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:47:43 verbose #30860 > > │ ### delete_file_async │ 00:47:43 verbose #30861 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:47:43 verbose #30862 > > 00:47:43 verbose #30863 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:47:43 verbose #30864 > > inl delete_file_async path : _ i64 = 00:47:43 verbose #30865 > > run_target function 00:47:43 verbose #30866 > > | Fsharp (Native) => fun () => 00:47:43 verbose #30867 > > let rec loop (retry : i64) = 00:47:43 verbose #30868 > > fun () => 00:47:43 verbose #30869 > > try_unit 00:47:43 verbose #30870 > > fun () => 00:47:43 verbose #30871 > > path |> file_delete 00:47:43 verbose #30872 > > return retry 00:47:43 verbose #30873 > > fun ex => 00:47:43 verbose #30874 > > if retry % 100 = 0 then 00:47:43 verbose #30875 > > trace Warning 00:47:43 verbose #30876 > > fun () => "delete_file_async" 00:47:43 verbose #30877 > > fun () => { path = path |> get_file_name; ex 00:47:43 verbose #30878 > > = ex |> sm'.format_exception } 00:47:43 verbose #30879 > > async.sleep 10 |> async.do 00:47:43 verbose #30880 > > loop (retry + 1) |> async.return_await 00:47:43 verbose #30881 > > |> async.new_async 00:47:43 verbose #30882 > > loop 0 00:47:43 verbose #30883 > > | _ => fun () => null () 00:47:43 verbose #30884 > > 00:47:43 verbose #30885 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:47:43 verbose #30886 > > //// test 00:47:43 verbose #30887 > > 00:47:43 verbose #30888 > > inl lock_file path = 00:47:43 verbose #30889 > > fun () => 00:47:43 verbose #30890 > > trace Debug (fun () => "_1") id 00:47:43 verbose #30891 > > file_stream 00:47:43 verbose #30892 > > path 00:47:43 verbose #30893 > > ModeOpen 00:47:43 verbose #30894 > > AccessReadWrite 00:47:43 verbose #30895 > > ShareNone 00:47:43 verbose #30896 > > |> use 00:47:43 verbose #30897 > > |> ignore 00:47:43 verbose #30898 > > trace Debug (fun () => "_2") id 00:47:43 verbose #30899 > > async.sleep 2000 |> async.do 00:47:43 verbose #30900 > > trace Debug (fun () => "_3") id 00:47:43 verbose #30901 > > |> async.new_async 00:47:43 verbose #30902 > > 00:47:43 verbose #30903 > > fun () => 00:47:43 verbose #30904 > > inl file_name = "test.txt" 00:47:43 verbose #30905 > > inl text = "0" 00:47:43 verbose #30906 > > 00:47:43 verbose #30907 > > inl temp_dir, disposable = 00:47:43 verbose #30908 > > (file_name, text) 00:47:43 verbose #30909 > > |> sm'.format_debug 00:47:43 verbose #30910 > > |> crypto.hash_text 00:47:43 verbose #30911 > > |> create_temp_dir' 00:47:43 verbose #30912 > > disposable |> use |> ignore 00:47:43 verbose #30913 > > inl path = temp_dir </> file_name 00:47:43 verbose #30914 > > 00:47:43 verbose #30915 > > trace Debug (fun () => "1") id 00:47:43 verbose #30916 > > text |> write_all_text_async path |> async.do 00:47:43 verbose #30917 > > trace Debug (fun () => "2") id 00:47:43 verbose #30918 > > inl child = lock_file path |> async.start_child |> async.let' 00:47:43 verbose #30919 > > trace Debug (fun () => "3") id 00:47:43 verbose #30920 > > async.sleep 1 |> async.do 00:47:43 verbose #30921 > > trace Debug (fun () => "4") id 00:47:43 verbose #30922 > > inl retries = delete_file_async path |> async.let' 00:47:43 verbose #30923 > > trace Debug (fun () => "5") id 00:47:43 verbose #30924 > > child |> async.do 00:47:43 verbose #30925 > > trace Debug (fun () => "6") id 00:47:43 verbose #30926 > > return retries 00:47:43 verbose #30927 > > |> async.new_async_unit 00:47:43 verbose #30928 > > |> async.run_with_timeout 3000 00:47:43 verbose #30929 > > |> function 00:47:43 verbose #30930 > > | Some (retries : i64) => 00:47:43 verbose #30931 > > retries 00:47:43 verbose #30932 > > |> _assert_between 00:47:43 verbose #30933 > > (if platform.is_windows () then 50 else 0) 00:47:43 verbose #30934 > > (if platform.is_windows () then 180 else 0) 00:47:43 verbose #30935 > > 00:47:43 verbose #30936 > > true 00:47:43 verbose #30937 > > | _ => false 00:47:43 verbose #30938 > > |> _assert_eq true 00:47:48 verbose #30939 > > 00:47:48 verbose #30940 > > ╭─[ 4.35s - stdout ]───────────────────────────────────────────────────────────╮ 00:47:48 verbose #30941 > > │ 00:00:00 debug #1 1 │ 00:47:48 verbose #30942 > > │ 00:00:00 debug #2 2 │ 00:47:48 verbose #30943 > > │ 00:00:00 debug #3 3 │ 00:47:48 verbose #30944 > > │ 00:00:00 debug #3 _1 │ 00:47:48 verbose #30945 > > │ 00:00:00 debug #5 _2 │ 00:47:48 verbose #30946 > > │ 00:00:00 debug #6 4 │ 00:47:48 verbose #30947 > > │ 00:00:00 warning #7 delete_file_async / { path = test.txt; ex = │ 00:47:48 verbose #30948 > > │ System.IO.IOException: The process cannot access the file │ 00:47:48 verbose #30949 > > │ 'C:\Users\i574n\AppData\Local\Temp\!create_temp_path_\dotnet-repl\613830ed-0 │ 00:47:48 verbose #30950 > > │ 16e-d959-8d21-02dc1c63c252\test.txt' because it is being used by another │ 00:47:48 verbose #30951 > > │ process. } │ 00:47:48 verbose #30952 > > │ 00:00:01 warning #8 delete_file_async / { path = test.txt; ex = │ 00:47:48 verbose #30953 > > │ System.IO.IOException: The process cannot access the file │ 00:47:48 verbose #30954 > > │ 'C:\Users\i574n\AppData\Local\Temp\!create_temp_path_\dotnet-repl\613830ed-0 │ 00:47:48 verbose #30955 > > │ 16e-d959-8d21-02dc1c63c252\test.txt' because it is being used by another │ 00:47:48 verbose #30956 > > │ process. } │ 00:47:48 verbose #30957 > > │ 00:00:02 debug #9 _3 │ 00:47:48 verbose #30958 > > │ 00:00:02 debug #10 5 │ 00:47:48 verbose #30959 > > │ 00:00:02 debug #11 6 │ 00:47:48 verbose #30960 > > │ __assert_between / actual: 128L / expected: struct (50L, 180L) │ 00:47:48 verbose #30961 > > │ __assert_eq / actual: true / expected: true │ 00:47:48 verbose #30962 > > │ │ 00:47:48 verbose #30963 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:47:48 verbose #30964 > > 00:47:48 verbose #30965 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:47:48 verbose #30966 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:47:48 verbose #30967 > > │ ## main │ 00:47:48 verbose #30968 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:47:48 verbose #30969 > > 00:47:48 verbose #30970 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:47:48 verbose #30971 > > inl main () = 00:47:48 verbose #30972 > > init_trace_state None 00:47:48 verbose #30973 > > $'let delete_directory_async x = !delete_directory_async x' : () 00:47:48 verbose #30974 > > $'let wait_for_file_access x = !wait_for_file_access x' : () 00:47:48 verbose #30975 > > $'let wait_for_file_access_read x = !wait_for_file_access_read x' : () 00:47:48 verbose #30976 > > $'let read_all_text_async x = !read_all_text_async x' : () 00:47:48 verbose #30977 > > $'let file_exists_content x = !file_exists_content x' : () 00:47:48 verbose #30978 > > $'let write_all_text_async x = !write_all_text_async x' : () 00:47:48 verbose #30979 > > $'let write_all_text_exists x = !write_all_text_exists_async x' : () 00:47:48 verbose #30980 > > $'let delete_file_async x = !delete_file_async x' : () 00:47:48 verbose #30981 > > $'let move_file_async x = !move_file_async x' : () 00:47:48 verbose #30982 > > $'let read_all_text_retry_async x = !read_all_text_retry_async x' : () 00:47:48 verbose #30983 > > $'let create_temp_path () = !create_temp_path ()' : () 00:47:48 verbose #30984 > > $'let create_temp_dir () = !create_temp_dir ()' : () 00:47:48 verbose #30985 > > $'let create_temp_dir\' x = !create_temp_dir' x' : () 00:47:48 verbose #30986 > > $'let get_source_directory () = !get_source_directory ()' : () 00:47:48 verbose #30987 > > $'let normalize_path x = !normalize_path x' : () 00:47:48 verbose #30988 > > $'let new_file_uri x = !new_file_uri x' : () 00:47:48 verbose #30989 > > $'let get_workspace_root () = !get_workspace_root ()' : () 00:47:48 verbose #30990 > > $'let init_trace_file x = !init_trace_file x' : () 00:47:48 verbose #30991 > > $'let link_directory x = !link_directory x' : () 00:47:48 verbose #30992 > > inl combine x = (</>) x 00:47:48 verbose #30993 > > $'let (</>) x = !combine x' : () 00:47:55 verbose #30994 > 00:04:14 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 115216 } 00:47:55 verbose #30995 > 00:04:14 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:47:55 verbose #30996 > "nbconvert", 00:47:55 verbose #30997 > "c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb", 00:47:55 verbose #30998 > "--to", 00:47:55 verbose #30999 > "html", 00:47:55 verbose #31000 > "--HTMLExporter.theme=dark", 00:47:55 verbose #31001 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:47:57 verbose #31002 > 00:04:16 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb to html 00:47:57 verbose #31003 > 00:04:17 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:47:57 verbose #31004 > 00:04:17 verbose #7 ! validate(nb) 00:48:00 verbose #31005 > 00:04:20 verbose #8 ! [NbConvertApp] Writing 625842 bytes to c:\home\git\polyglot\lib\spiral\file_system.dib.html 00:48:01 verbose #31006 > 00:04:20 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 653 } 00:48:01 verbose #31007 > 00:04:20 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 653 } 00:48:01 verbose #31008 > 00:04:20 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:48:01 verbose #31009 > "-c", 00:48:01 verbose #31010 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/file_system.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:48:01 verbose #31011 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/file_system.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:48:01 verbose #31012 > 00:04:21 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:48:01 verbose #31013 > 00:04:21 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:48:01 verbose #31014 > 00:04:21 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 115928 } 00:48:01 debug #31015 runtime.execute_with_options_async / { exit_code = 0; output_length = 123575 } 00:48:01 debug #37 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path file_system.dib --retries 3 00:48:01 debug #31016 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path networking.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:48:01 verbose #31017 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "networking.dib", "--retries", "3"])) } 00:48:01 verbose #31018 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:48:01 verbose #31019 > "repl", 00:48:01 verbose #31020 > "--exit-after-run", 00:48:01 verbose #31021 > "--run", 00:48:01 verbose #31022 > "c:/home/git/polyglot/lib/spiral/networking.dib", 00:48:01 verbose #31023 > "--output-path", 00:48:01 verbose #31024 > "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb", 00:48:01 verbose #31025 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/networking.dib" --output-path "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:48:03 verbose #31026 > > 00:48:03 verbose #31027 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:03 verbose #31028 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:03 verbose #31029 > > │ # networking │ 00:48:03 verbose #31030 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:07 verbose #31031 > > 00:48:07 verbose #31032 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:07 verbose #31033 > > open rust.rust_operators 00:48:08 verbose #31034 > > 00:48:08 verbose #31035 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:08 verbose #31036 > > //// test 00:48:08 verbose #31037 > > 00:48:08 verbose #31038 > > open testing 00:48:08 verbose #31039 > > 00:48:08 verbose #31040 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:08 verbose #31041 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:08 verbose #31042 > > │ ## rust │ 00:48:08 verbose #31043 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:08 verbose #31044 > > 00:48:08 verbose #31045 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:08 verbose #31046 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:08 verbose #31047 > > │ ### reqwest_response │ 00:48:08 verbose #31048 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:08 verbose #31049 > > 00:48:08 verbose #31050 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:08 verbose #31051 > > nominal reqwest_response = 00:48:08 verbose #31052 > > `( 00:48:08 verbose #31053 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:48:08 verbose #31054 > > Fable.Core.Emit(\"reqwest_wasm::Response\")>]]\n#endif\ntype reqwest_Response = 00:48:08 verbose #31055 > > class end" 00:48:08 verbose #31056 > > $'' : $'reqwest_Response' 00:48:08 verbose #31057 > > ) 00:48:09 verbose #31058 > > 00:48:09 verbose #31059 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:09 verbose #31060 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:09 verbose #31061 > > │ ### reqwest_error │ 00:48:09 verbose #31062 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:09 verbose #31063 > > 00:48:09 verbose #31064 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:09 verbose #31065 > > nominal reqwest_error = 00:48:09 verbose #31066 > > `( 00:48:09 verbose #31067 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:48:09 verbose #31068 > > Fable.Core.Emit(\"reqwest_wasm::Error\")>]]\n#endif\ntype reqwest_Error = class 00:48:09 verbose #31069 > > end" 00:48:09 verbose #31070 > > $'' : $'reqwest_Error' 00:48:09 verbose #31071 > > ) 00:48:09 verbose #31072 > > 00:48:09 verbose #31073 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:09 verbose #31074 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:09 verbose #31075 > > │ ### request_builder │ 00:48:09 verbose #31076 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:09 verbose #31077 > > 00:48:09 verbose #31078 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:09 verbose #31079 > > nominal request_builder = 00:48:09 verbose #31080 > > `( 00:48:09 verbose #31081 > > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; 00:48:09 verbose #31082 > > Fable.Core.Emit(\"reqwest_wasm::RequestBuilder\")>]]\n#endif\ntype 00:48:09 verbose #31083 > > reqwest_RequestBuilder = class end" 00:48:09 verbose #31084 > > $'' : $'reqwest_RequestBuilder' 00:48:09 verbose #31085 > > ) 00:48:10 verbose #31086 > > 00:48:10 verbose #31087 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:10 verbose #31088 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:10 verbose #31089 > > │ ### request_type │ 00:48:10 verbose #31090 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:10 verbose #31091 > > 00:48:10 verbose #31092 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:10 verbose #31093 > > union request_type = 00:48:10 verbose #31094 > > | Get 00:48:10 verbose #31095 > > | Post 00:48:10 verbose #31096 > > 00:48:10 verbose #31097 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:10 verbose #31098 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:10 verbose #31099 > > │ ### request │ 00:48:10 verbose #31100 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:10 verbose #31101 > > 00:48:10 verbose #31102 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:10 verbose #31103 > > type request = 00:48:10 verbose #31104 > > { 00:48:10 verbose #31105 > > url : string 00:48:10 verbose #31106 > > request_type : request_type 00:48:10 verbose #31107 > > body : string 00:48:10 verbose #31108 > > json : bool 00:48:10 verbose #31109 > > auto_refresh : bool 00:48:10 verbose #31110 > > } 00:48:11 verbose #31111 > > 00:48:11 verbose #31112 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:11 verbose #31113 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:11 verbose #31114 > > │ ### new_request_get │ 00:48:11 verbose #31115 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:11 verbose #31116 > > 00:48:11 verbose #31117 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:11 verbose #31118 > > inl new_request_get (url : string) : request_builder = 00:48:11 verbose #31119 > > inl url = join url 00:48:11 verbose #31120 > > inl url = url |> sm'.to_std_string 00:48:11 verbose #31121 > > inl url = join url 00:48:11 verbose #31122 > > !\($'"reqwest_wasm::Client::builder().build().map_err(|err| 00:48:11 verbose #31123 > > err.to_string())?.get(!url)"') 00:48:11 verbose #31124 > > 00:48:11 verbose #31125 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:11 verbose #31126 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:11 verbose #31127 > > │ ### new_request_post │ 00:48:11 verbose #31128 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:11 verbose #31129 > > 00:48:11 verbose #31130 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:11 verbose #31131 > > inl new_request_post (url : string) : request_builder = 00:48:11 verbose #31132 > > inl url = join url 00:48:11 verbose #31133 > > inl url = url |> sm'.to_std_string 00:48:11 verbose #31134 > > inl url = join url 00:48:11 verbose #31135 > > !\($'"reqwest_wasm::Client::builder().build().map_err(|err| 00:48:11 verbose #31136 > > err.to_string())?.post(!url)"') 00:48:11 verbose #31137 > > 00:48:11 verbose #31138 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:11 verbose #31139 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:11 verbose #31140 > > │ ### request_send │ 00:48:11 verbose #31141 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:11 verbose #31142 > > 00:48:11 verbose #31143 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:11 verbose #31144 > > inl request_send (request : request_builder) : async.future_pin (resultm.result' 00:48:11 verbose #31145 > > reqwest_response reqwest_error) = 00:48:11 verbose #31146 > > inl request = join request 00:48:11 verbose #31147 > > !\($'"Box::pin(reqwest_wasm::RequestBuilder::send(!request))"') 00:48:12 verbose #31148 > > 00:48:12 verbose #31149 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:12 verbose #31150 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:12 verbose #31151 > > │ ### request_body │ 00:48:12 verbose #31152 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:12 verbose #31153 > > 00:48:12 verbose #31154 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:12 verbose #31155 > > inl request_body (body : string) (request : request_builder) : request_builder = 00:48:12 verbose #31156 > > inl body = body |> sm'.to_std_string 00:48:12 verbose #31157 > > !\\(body, $'"reqwest_wasm::RequestBuilder::body(!request, $0)"') 00:48:12 verbose #31158 > > 00:48:12 verbose #31159 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:12 verbose #31160 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:12 verbose #31161 > > │ ### request_header │ 00:48:12 verbose #31162 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:12 verbose #31163 > > 00:48:12 verbose #31164 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:12 verbose #31165 > > inl request_header (key : string) (value : string) (request : request_builder) : 00:48:12 verbose #31166 > > request_builder = 00:48:12 verbose #31167 > > inl request = join request 00:48:12 verbose #31168 > > inl key = key |> sm'.to_std_string 00:48:12 verbose #31169 > > inl value = value |> sm'.to_std_string 00:48:12 verbose #31170 > > !\\((key, value), $'"reqwest_wasm::RequestBuilder::header(!request, $0, 00:48:12 verbose #31171 > > $1)"') 00:48:13 verbose #31172 > > 00:48:13 verbose #31173 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:13 verbose #31174 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:13 verbose #31175 > > │ ### request_json │ 00:48:13 verbose #31176 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:13 verbose #31177 > > 00:48:13 verbose #31178 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:13 verbose #31179 > > inl request_json forall t. (obj : t) (request : request_builder) : 00:48:13 verbose #31180 > > request_builder = 00:48:13 verbose #31181 > > !\($'"reqwest_wasm::RequestBuilder::json(!request, &!obj)"') 00:48:13 verbose #31182 > > 00:48:13 verbose #31183 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:13 verbose #31184 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:13 verbose #31185 > > │ ### response_text │ 00:48:13 verbose #31186 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:13 verbose #31187 > > 00:48:13 verbose #31188 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:13 verbose #31189 > > inl response_text (response : reqwest_response) : async.future_pin 00:48:13 verbose #31190 > > (resultm.result' sm'.std_string reqwest_error) = 00:48:13 verbose #31191 > > !\($'"Box::pin(reqwest_wasm::Response::text(!response))"') 00:48:13 verbose #31192 > > 00:48:13 verbose #31193 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:13 verbose #31194 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:13 verbose #31195 > > │ ## fsharp │ 00:48:13 verbose #31196 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:13 verbose #31197 > > 00:48:13 verbose #31198 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:13 verbose #31199 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:13 verbose #31200 > > │ ### tcp_client │ 00:48:13 verbose #31201 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:13 verbose #31202 > > 00:48:13 verbose #31203 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:13 verbose #31204 > > nominal tcp_client = $'System.Net.Sockets.TcpClient' 00:48:14 verbose #31205 > > 00:48:14 verbose #31206 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:14 verbose #31207 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:14 verbose #31208 > > │ ### new_tcp_client │ 00:48:14 verbose #31209 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:14 verbose #31210 > > 00:48:14 verbose #31211 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:14 verbose #31212 > > inl new_tcp_client () : tcp_client = 00:48:14 verbose #31213 > > $'new `tcp_client ()' 00:48:14 verbose #31214 > > 00:48:14 verbose #31215 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:14 verbose #31216 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:14 verbose #31217 > > │ ### ip_address │ 00:48:14 verbose #31218 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:14 verbose #31219 > > 00:48:14 verbose #31220 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:14 verbose #31221 > > nominal ip_address = $'System.Net.IPAddress' 00:48:15 verbose #31222 > > 00:48:15 verbose #31223 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:15 verbose #31224 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:15 verbose #31225 > > │ ### ip_address_parse │ 00:48:15 verbose #31226 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:15 verbose #31227 > > 00:48:15 verbose #31228 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:15 verbose #31229 > > inl ip_address_parse (s : string) : ip_address = 00:48:15 verbose #31230 > > s |> $'`ip_address.Parse' 00:48:15 verbose #31231 > > 00:48:15 verbose #31232 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:15 verbose #31233 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:15 verbose #31234 > > │ ### tcp_listener │ 00:48:15 verbose #31235 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:15 verbose #31236 > > 00:48:15 verbose #31237 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:15 verbose #31238 > > nominal tcp_listener = $'System.Net.Sockets.TcpListener' 00:48:16 verbose #31239 > > 00:48:16 verbose #31240 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:16 verbose #31241 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:16 verbose #31242 > > │ ### new_tcp_listener │ 00:48:16 verbose #31243 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:16 verbose #31244 > > 00:48:16 verbose #31245 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:16 verbose #31246 > > inl new_tcp_listener (ip_address : ip_address) (port : i32) : tcp_listener = 00:48:16 verbose #31247 > > $'new `tcp_listener (!ip_address, !port)' 00:48:16 verbose #31248 > > 00:48:16 verbose #31249 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:16 verbose #31250 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:16 verbose #31251 > > │ ### listener_start │ 00:48:16 verbose #31252 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:16 verbose #31253 > > 00:48:16 verbose #31254 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:16 verbose #31255 > > inl listener_start (listener : tcp_listener) : () = 00:48:16 verbose #31256 > > $'!listener.Start' () 00:48:17 verbose #31257 > > 00:48:17 verbose #31258 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:17 verbose #31259 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:17 verbose #31260 > > │ ### listener_stop │ 00:48:17 verbose #31261 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:17 verbose #31262 > > 00:48:17 verbose #31263 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:17 verbose #31264 > > inl listener_stop (listener : tcp_listener) : () = 00:48:17 verbose #31265 > > $'!listener.Stop' () 00:48:17 verbose #31266 > > 00:48:17 verbose #31267 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:17 verbose #31268 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:17 verbose #31269 > > │ ### client_connect_async │ 00:48:17 verbose #31270 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:17 verbose #31271 > > 00:48:17 verbose #31272 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:17 verbose #31273 > > inl client_connect_async 00:48:17 verbose #31274 > > (host : string) 00:48:17 verbose #31275 > > (port : i32) 00:48:17 verbose #31276 > > (ct : threading.cancellation_token) 00:48:17 verbose #31277 > > (client : tcp_client) 00:48:17 verbose #31278 > > : async.value_task 00:48:17 verbose #31279 > > = 00:48:17 verbose #31280 > > $'!client.ConnectAsync (!host, !port, !ct)' 00:48:17 verbose #31281 > > 00:48:17 verbose #31282 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:17 verbose #31283 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:17 verbose #31284 > > │ ### test_port_open │ 00:48:17 verbose #31285 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:17 verbose #31286 > > 00:48:17 verbose #31287 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:17 verbose #31288 > > inl test_port_open host port : _ bool = async.new_async fun () => 00:48:17 verbose #31289 > > inl ct = async.cancellation_token () |> async.let' 00:48:17 verbose #31290 > > inl client = new_tcp_client () |> use 00:48:17 verbose #31291 > > try_unit 00:48:17 verbose #31292 > > fun () => 00:48:17 verbose #31293 > > client |> client_connect_async host port ct |> 00:48:17 verbose #31294 > > async.await_value_task_unit |> async.do 00:48:17 verbose #31295 > > return true 00:48:17 verbose #31296 > > fun ex => 00:48:17 verbose #31297 > > inl ex = ex |> sm'.format_exception 00:48:17 verbose #31298 > > trace Verbose 00:48:17 verbose #31299 > > fun () => $'$"networking.test_port_open"' 00:48:17 verbose #31300 > > fun () => { port ex } 00:48:17 verbose #31301 > > return false 00:48:18 verbose #31302 > > 00:48:18 verbose #31303 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:18 verbose #31304 > > //// test 00:48:18 verbose #31305 > > 00:48:18 verbose #31306 > > test_port_open "127.0.0.1" 65536 00:48:18 verbose #31307 > > |> async.run_with_timeout 120 00:48:18 verbose #31308 > > |> _assert_eq (Some false) 00:48:21 verbose #31309 > > 00:48:21 verbose #31310 > > ╭─[ 2.83s - stdout ]───────────────────────────────────────────────────────────╮ 00:48:21 verbose #31311 > > │ 00:00:00 verbose #1 networking.test_port_open / { port = 65536; ex = │ 00:48:21 verbose #31312 > > │ System.ArgumentOutOfRangeException: Specified argument was out of the range │ 00:48:21 verbose #31313 > > │ of valid values. (Parameter 'port') } │ 00:48:21 verbose #31314 > > │ __assert_eq / actual: US4_0 false / expected: US4_0 false │ 00:48:21 verbose #31315 > > │ │ 00:48:21 verbose #31316 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:21 verbose #31317 > > 00:48:21 verbose #31318 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:21 verbose #31319 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:21 verbose #31320 > > │ ### test_port_open_timeout │ 00:48:21 verbose #31321 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:21 verbose #31322 > > 00:48:21 verbose #31323 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:21 verbose #31324 > > inl test_port_open_timeout timeout host port : _ bool = async.new_async_unit fun 00:48:21 verbose #31325 > > () => 00:48:21 verbose #31326 > > test_port_open host port 00:48:21 verbose #31327 > > |> async.run_with_timeout_async timeout 00:48:21 verbose #31328 > > |> async.let' 00:48:21 verbose #31329 > > |> function 00:48:21 verbose #31330 > > | None => false 00:48:21 verbose #31331 > > | Some result => result 00:48:21 verbose #31332 > > |> return 00:48:21 verbose #31333 > > 00:48:21 verbose #31334 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:21 verbose #31335 > > //// test 00:48:21 verbose #31336 > > 00:48:21 verbose #31337 > > test_port_open_timeout 120 "127.0.0.1" 65535 00:48:21 verbose #31338 > > |> async.run_synchronously 00:48:21 verbose #31339 > > |> _assert_eq false 00:48:23 verbose #31340 > > 00:48:23 verbose #31341 > > ╭─[ 1.35s - stdout ]───────────────────────────────────────────────────────────╮ 00:48:23 verbose #31342 > > │ 00:00:00 verbose #1 async.run_with_timeout_async / { timeout = 120 } │ 00:48:23 verbose #31343 > > │ __assert_eq / actual: false / expected: false │ 00:48:23 verbose #31344 > > │ │ 00:48:23 verbose #31345 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:23 verbose #31346 > > 00:48:23 verbose #31347 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:23 verbose #31348 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:23 verbose #31349 > > │ ### wait_for_port_access │ 00:48:23 verbose #31350 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:23 verbose #31351 > > 00:48:23 verbose #31352 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:23 verbose #31353 > > inl wait_for_port_access timeout status host port : _ i64 = 00:48:23 verbose #31354 > > let rec loop retry : _ i64 = async.new_async_unit fun () => 00:48:23 verbose #31355 > > inl isPortOpen = 00:48:23 verbose #31356 > > match timeout |> optionm'.unbox with 00:48:23 verbose #31357 > > | None => test_port_open host port 00:48:23 verbose #31358 > > | Some timeout => test_port_open_timeout timeout host port 00:48:23 verbose #31359 > > |> async.let' 00:48:23 verbose #31360 > > 00:48:23 verbose #31361 > > fix_condition 00:48:23 verbose #31362 > > fun () => isPortOpen = status 00:48:23 verbose #31363 > > fun () => retry |> return 00:48:23 verbose #31364 > > fun () => 00:48:23 verbose #31365 > > if retry % 100 = 0 then 00:48:23 verbose #31366 > > trace Verbose 00:48:23 verbose #31367 > > fun () => "networking.wait_for_port_access" 00:48:23 verbose #31368 > > fun () => { port retry timeout status } 00:48:23 verbose #31369 > > async.sleep 10 |> async.do 00:48:23 verbose #31370 > > loop (retry + 1) |> async.return_await 00:48:23 verbose #31371 > > loop 0i64 00:48:23 verbose #31372 > > 00:48:23 verbose #31373 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:23 verbose #31374 > > //// test 00:48:23 verbose #31375 > > 00:48:23 verbose #31376 > > inl lock_port host port = async.new_async fun () => 00:48:23 verbose #31377 > > trace Debug (fun () => "_1") id 00:48:23 verbose #31378 > > async.sleep 5000 |> async.do 00:48:23 verbose #31379 > > inl listener = new_tcp_listener (host |> ip_address_parse) port |> use 00:48:23 verbose #31380 > > trace Debug (fun () => "_2") id 00:48:23 verbose #31381 > > listener |> listener_start 00:48:23 verbose #31382 > > trace Debug (fun () => "_3") id 00:48:23 verbose #31383 > > async.sleep 2000 |> async.do 00:48:23 verbose #31384 > > trace Debug (fun () => "_4") id 00:48:23 verbose #31385 > > $'!listener.Stop' () 00:48:23 verbose #31386 > > trace Debug (fun () => "_5") id 00:48:23 verbose #31387 > > 00:48:23 verbose #31388 > > inl host = "127.0.0.1" 00:48:23 verbose #31389 > > inl port = 5555i32 00:48:23 verbose #31390 > > 00:48:23 verbose #31391 > > fun () => 00:48:23 verbose #31392 > > trace Debug (fun () => "1") id 00:48:23 verbose #31393 > > inl child = lock_port host port |> async.start_child |> async.let' 00:48:23 verbose #31394 > > trace Debug (fun () => "2") id 00:48:23 verbose #31395 > > async.sleep 1 |> async.do 00:48:23 verbose #31396 > > trace Debug (fun () => "3") id 00:48:23 verbose #31397 > > inl retries1 = wait_for_port_access (None |> optionm'.box) true host port |> 00:48:23 verbose #31398 > > async.let' 00:48:23 verbose #31399 > > trace Debug (fun () => "4") id 00:48:23 verbose #31400 > > inl retries2 = wait_for_port_access (None |> optionm'.box) false host port 00:48:23 verbose #31401 > > |> async.let' 00:48:23 verbose #31402 > > trace Debug (fun () => "5") id 00:48:23 verbose #31403 > > child |> async.do 00:48:23 verbose #31404 > > trace Debug (fun () => "6") id 00:48:23 verbose #31405 > > (retries1, retries2) |> return 00:48:23 verbose #31406 > > |> async.new_async_unit 00:48:23 verbose #31407 > > |> async.run_with_timeout 20000 00:48:23 verbose #31408 > > |> function 00:48:23 verbose #31409 > > | Some (retries1, retries2) => 00:48:23 verbose #31410 > > retries1 00:48:23 verbose #31411 > > |> _assert_between 00:48:23 verbose #31412 > > if platform.is_windows () then 2i64 else 2 00:48:23 verbose #31413 > > if platform.is_windows () then 5 else 1500 00:48:23 verbose #31414 > > 00:48:23 verbose #31415 > > retries2 00:48:23 verbose #31416 > > |> _assert_between 00:48:23 verbose #31417 > > if platform.is_windows () then 80i64 else 80 00:48:23 verbose #31418 > > if platform.is_windows () then 200 else 600 00:48:23 verbose #31419 > > 00:48:23 verbose #31420 > > true 00:48:23 verbose #31421 > > | _ => false 00:48:23 verbose #31422 > > |> _assert_eq true 00:48:35 verbose #31423 > > 00:48:35 verbose #31424 > > ╭─[ 11.78s - stdout ]──────────────────────────────────────────────────────────╮ 00:48:35 verbose #31425 > > │ 00:00:00 debug #1 1 │ 00:48:35 verbose #31426 > > │ 00:00:00 debug #2 _1 │ 00:48:35 verbose #31427 > > │ 00:00:00 debug #2 2 │ 00:48:35 verbose #31428 > > │ 00:00:00 debug #4 3 │ 00:48:35 verbose #31429 > > │ 00:00:02 verbose #5 networking.test_port_open / { port = 5555; ex = │ 00:48:35 verbose #31430 > > │ System.AggregateException: One or more errors occurred. (No connection could │ 00:48:35 verbose #31431 > > │ be made because the target machine actively refused it.) } │ 00:48:35 verbose #31432 > > │ 00:00:02 verbose #6 networking.wait_for_port_access / { port = 5555; │ 00:48:35 verbose #31433 > > │ retry = 0; timeout = None; status = true } │ 00:48:35 verbose #31434 > > │ 00:00:04 verbose #7 networking.test_port_open / { port = 5555; ex = │ 00:48:35 verbose #31435 > > │ System.AggregateException: One or more errors occurred. (No connection could │ 00:48:35 verbose #31436 > > │ be made because the target machine actively refused it.) } │ 00:48:35 verbose #31437 > > │ 00:00:05 debug #8 _2 │ 00:48:35 verbose #31438 > > │ 00:00:05 debug #9 _3 │ 00:48:35 verbose #31439 > > │ 00:00:05 debug #10 4 │ 00:48:35 verbose #31440 > > │ 00:00:05 verbose #11 networking.wait_for_port_access / { port = 5555; │ 00:48:35 verbose #31441 > > │ retry = 0; timeout = None; status = false } │ 00:48:35 verbose #31442 > > │ 00:00:06 verbose #12 networking.wait_for_port_access / { port = 5555; │ 00:48:35 verbose #31443 > > │ retry = 100; timeout = None; status = false } │ 00:48:35 verbose #31444 > > │ 00:00:07 debug #13 _4 │ 00:48:35 verbose #31445 > > │ 00:00:07 debug #14 _5 │ 00:48:35 verbose #31446 > > │ 00:00:09 verbose #15 networking.test_port_open / { port = 5555; ex = │ 00:48:35 verbose #31447 > > │ System.AggregateException: One or more errors occurred. (No connection could │ 00:48:35 verbose #31448 > > │ be made because the target machine actively refused it.) } │ 00:48:35 verbose #31449 > > │ 00:00:09 debug #16 5 │ 00:48:35 verbose #31450 > > │ 00:00:09 debug #17 6 │ 00:48:35 verbose #31451 > > │ __assert_between / actual: 2L / expected: struct (2L, 5L) │ 00:48:35 verbose #31452 > > │ __assert_between / actual: 120L / expected: struct (80L, 200L) │ 00:48:35 verbose #31453 > > │ __assert_eq / actual: true / expected: true │ 00:48:35 verbose #31454 > > │ │ 00:48:35 verbose #31455 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:35 verbose #31456 > > 00:48:35 verbose #31457 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:35 verbose #31458 > > //// test 00:48:35 verbose #31459 > > 00:48:35 verbose #31460 > > inl lock_port host port = async.new_async_unit fun () => 00:48:35 verbose #31461 > > trace Debug (fun () => "_1") id 00:48:35 verbose #31462 > > async.sleep 500 |> async.do 00:48:35 verbose #31463 > > inl listener = new_tcp_listener (ip_address_parse host) port |> use 00:48:35 verbose #31464 > > trace Debug (fun () => "_2") id 00:48:35 verbose #31465 > > listener |> listener_start 00:48:35 verbose #31466 > > trace Debug (fun () => "_3") id 00:48:35 verbose #31467 > > async.sleep 200 |> async.do 00:48:35 verbose #31468 > > trace Debug (fun () => "_4") id 00:48:35 verbose #31469 > > listener |> listener_stop 00:48:35 verbose #31470 > > trace Debug (fun () => "_5") id 00:48:35 verbose #31471 > > 00:48:35 verbose #31472 > > inl host = "127.0.0.1" 00:48:35 verbose #31473 > > inl port = 5555 00:48:35 verbose #31474 > > 00:48:35 verbose #31475 > > fun () => 00:48:35 verbose #31476 > > trace Debug (fun () => "1") id 00:48:35 verbose #31477 > > inl child = lock_port host port |> async.start_child |> async.let' 00:48:35 verbose #31478 > > trace Debug (fun () => "2") id 00:48:35 verbose #31479 > > async.sleep 1 |> async.do 00:48:35 verbose #31480 > > trace Debug (fun () => "3") id 00:48:35 verbose #31481 > > inl retries1 = wait_for_port_access (Some 60 |> optionm'.box) true host port 00:48:35 verbose #31482 > > |> async.let' 00:48:35 verbose #31483 > > trace Debug (fun () => "4") id 00:48:35 verbose #31484 > > inl retries2 = wait_for_port_access (Some 60 |> optionm'.box) false host 00:48:35 verbose #31485 > > port |> async.let' 00:48:35 verbose #31486 > > trace Debug (fun () => "5") id 00:48:35 verbose #31487 > > child |> async.do 00:48:35 verbose #31488 > > trace Debug (fun () => "6") id 00:48:35 verbose #31489 > > (retries1, retries2) |> return 00:48:35 verbose #31490 > > |> async.new_async_unit 00:48:35 verbose #31491 > > |> async.run_with_timeout 2000 00:48:35 verbose #31492 > > |> function 00:48:35 verbose #31493 > > | Some (retries1, retries2) => 00:48:35 verbose #31494 > > retries1 00:48:35 verbose #31495 > > |> _assert_between 00:48:35 verbose #31496 > > if platform.is_windows () then 4i64 else 2 00:48:35 verbose #31497 > > if platform.is_windows () then 15 else 150 00:48:35 verbose #31498 > > 00:48:35 verbose #31499 > > retries2 00:48:35 verbose #31500 > > |> _assert_between 00:48:35 verbose #31501 > > if platform.is_windows () then 5i64 else 0 00:48:35 verbose #31502 > > if platform.is_windows () then 20 else 60 00:48:35 verbose #31503 > > 00:48:35 verbose #31504 > > true 00:48:35 verbose #31505 > > | _ => false 00:48:35 verbose #31506 > > |> _assert_eq true 00:48:38 verbose #31507 > > 00:48:38 verbose #31508 > > ╭─[ 2.99s - stdout ]───────────────────────────────────────────────────────────╮ 00:48:38 verbose #31509 > > │ 00:00:00 debug #1 1 │ 00:48:38 verbose #31510 > > │ 00:00:00 debug #2 2 │ 00:48:38 verbose #31511 > > │ 00:00:00 debug #2 _1 │ 00:48:38 verbose #31512 > > │ 00:00:00 debug #4 3 │ 00:48:38 verbose #31513 > > │ 00:00:00 verbose #5 async.run_with_timeout_async / { timeout = 60 } │ 00:48:38 verbose #31514 > > │ 00:00:00 verbose #6 networking.wait_for_port_access / { port = 5555; │ 00:48:38 verbose #31515 > > │ retry = 0; timeout = Some 60; status = true } │ 00:48:38 verbose #31516 > > │ 00:00:00 verbose #7 async.run_with_timeout_async / { timeout = 60 } │ 00:48:38 verbose #31517 > > │ 00:00:00 verbose #8 async.run_with_timeout_async / { timeout = 60 } │ 00:48:38 verbose #31518 > > │ 00:00:00 verbose #9 async.run_with_timeout_async / { timeout = 60 } │ 00:48:38 verbose #31519 > > │ 00:00:00 verbose #10 async.run_with_timeout_async / { timeout = 60 } │ 00:48:38 verbose #31520 > > │ 00:00:00 verbose #11 async.run_with_timeout_async / { timeout = 60 } │ 00:48:38 verbose #31521 > > │ 00:00:00 debug #12 _2 │ 00:48:38 verbose #31522 > > │ 00:00:00 debug #13 _3 │ 00:48:38 verbose #31523 > > │ 00:00:00 debug #14 4 │ 00:48:38 verbose #31524 > > │ 00:00:00 verbose #15 networking.wait_for_port_access / { port = 5555; │ 00:48:38 verbose #31525 > > │ retry = 0; timeout = Some 60; status = false } │ 00:48:38 verbose #31526 > > │ 00:00:00 debug #16 _4 │ 00:48:38 verbose #31527 > > │ 00:00:00 debug #17 _5 │ 00:48:38 verbose #31528 > > │ 00:00:00 verbose #18 async.run_with_timeout_async / { timeout = 60 } │ 00:48:38 verbose #31529 > > │ 00:00:00 debug #19 5 │ 00:48:38 verbose #31530 > > │ 00:00:00 debug #20 6 │ 00:48:38 verbose #31531 > > │ __assert_between / actual: 6L / expected: struct (4L, 15L) │ 00:48:38 verbose #31532 > > │ __assert_between / actual: 12L / expected: struct (5L, 20L) │ 00:48:38 verbose #31533 > > │ __assert_eq / actual: true / expected: true │ 00:48:38 verbose #31534 > > │ │ 00:48:38 verbose #31535 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:38 verbose #31536 > > 00:48:38 verbose #31537 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:38 verbose #31538 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:38 verbose #31539 > > │ ### get_available_port │ 00:48:38 verbose #31540 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:38 verbose #31541 > > 00:48:38 verbose #31542 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:38 verbose #31543 > > inl get_available_port timeout host initial_port : _ i32 = 00:48:38 verbose #31544 > > let rec loop port = async.new_async_unit fun () => 00:48:38 verbose #31545 > > inl is_port_open = 00:48:38 verbose #31546 > > match timeout |> optionm'.unbox with 00:48:38 verbose #31547 > > | None => test_port_open host port 00:48:38 verbose #31548 > > | Some timeout => test_port_open_timeout timeout host port 00:48:38 verbose #31549 > > |> async.let' 00:48:38 verbose #31550 > > fix_condition 00:48:38 verbose #31551 > > fun () => is_port_open |> not 00:48:38 verbose #31552 > > fun () => port |> return 00:48:38 verbose #31553 > > fun () => loop (port + 1) |> async.return_await 00:48:38 verbose #31554 > > loop initial_port 00:48:38 verbose #31555 > > 00:48:38 verbose #31556 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:38 verbose #31557 > > //// test 00:48:38 verbose #31558 > > 00:48:38 verbose #31559 > > inl lock_ports host port = async.new_async_unit fun () => 00:48:38 verbose #31560 > > trace Debug (fun () => "_1") id 00:48:38 verbose #31561 > > inl listener1 = new_tcp_listener (ip_address_parse host) port |> use 00:48:38 verbose #31562 > > inl listener2 = new_tcp_listener (ip_address_parse host) (port + 1) |> use 00:48:38 verbose #31563 > > trace Debug (fun () => "_2") id 00:48:38 verbose #31564 > > listener1 |> listener_start 00:48:38 verbose #31565 > > listener2 |> listener_start 00:48:38 verbose #31566 > > trace Debug (fun () => "_3") id 00:48:38 verbose #31567 > > async.sleep 4000 |> async.do 00:48:38 verbose #31568 > > trace Debug (fun () => "_4") id 00:48:38 verbose #31569 > > listener1 |> listener_stop 00:48:38 verbose #31570 > > listener2 |> listener_stop 00:48:38 verbose #31571 > > trace Debug (fun () => "_5") id 00:48:38 verbose #31572 > > 00:48:38 verbose #31573 > > inl host = "127.0.0.1" 00:48:38 verbose #31574 > > inl port = 5555 00:48:38 verbose #31575 > > 00:48:38 verbose #31576 > > fun () => 00:48:38 verbose #31577 > > trace Debug (fun () => "1") id 00:48:38 verbose #31578 > > inl child = lock_ports host port |> async.start_child |> async.let' 00:48:38 verbose #31579 > > trace Debug (fun () => "2") id 00:48:38 verbose #31580 > > async.sleep 240 |> async.do 00:48:38 verbose #31581 > > trace Debug (fun () => "3") id 00:48:38 verbose #31582 > > inl available_port = get_available_port (None |> optionm'.box) host port |> 00:48:38 verbose #31583 > > async.let' 00:48:38 verbose #31584 > > trace Debug (fun () => "4") id 00:48:38 verbose #31585 > > inl retries = wait_for_port_access (None |> optionm'.box) false host port |> 00:48:38 verbose #31586 > > async.let' 00:48:38 verbose #31587 > > trace Debug (fun () => "5") id 00:48:38 verbose #31588 > > child |> async.do 00:48:38 verbose #31589 > > trace Debug (fun () => "6") id 00:48:38 verbose #31590 > > (available_port, retries) |> return 00:48:38 verbose #31591 > > |> async.new_async_unit 00:48:38 verbose #31592 > > |> async.run_with_timeout 15000 00:48:38 verbose #31593 > > |> function 00:48:38 verbose #31594 > > | Some (available_port, retries) => 00:48:38 verbose #31595 > > available_port |> _assert_eq (port + 2) 00:48:38 verbose #31596 > > 00:48:38 verbose #31597 > > retries 00:48:38 verbose #31598 > > |> _assert_between 00:48:38 verbose #31599 > > if platform.is_windows () then 50i64 else 50 00:48:38 verbose #31600 > > if platform.is_windows () then 150 else 1200 00:48:38 verbose #31601 > > 00:48:38 verbose #31602 > > true 00:48:38 verbose #31603 > > | _ => false 00:48:38 verbose #31604 > > |> _assert_eq true 00:48:47 verbose #31605 > > 00:48:47 verbose #31606 > > ╭─[ 8.40s - stdout ]───────────────────────────────────────────────────────────╮ 00:48:47 verbose #31607 > > │ 00:00:00 debug #1 1 │ 00:48:47 verbose #31608 > > │ 00:00:00 debug #2 _1 │ 00:48:47 verbose #31609 > > │ 00:00:00 debug #2 2 │ 00:48:47 verbose #31610 > > │ 00:00:00 debug #4 _2 │ 00:48:47 verbose #31611 > > │ 00:00:00 debug #5 _3 │ 00:48:47 verbose #31612 > > │ 00:00:00 debug #6 3 │ 00:48:47 verbose #31613 > > │ 00:00:02 verbose #7 networking.test_port_open / { port = 5557; ex = │ 00:48:47 verbose #31614 > > │ System.AggregateException: One or more errors occurred. (No connection could │ 00:48:47 verbose #31615 > > │ be made because the target machine actively refused it.) } │ 00:48:47 verbose #31616 > > │ 00:00:02 debug #8 4 │ 00:48:47 verbose #31617 > > │ 00:00:02 verbose #9 networking.wait_for_port_access / { port = 5555; │ 00:48:47 verbose #31618 > > │ retry = 0; timeout = None; status = false } │ 00:48:47 verbose #31619 > > │ 00:00:03 verbose #10 networking.wait_for_port_access / { port = 5555; │ 00:48:47 verbose #31620 > > │ retry = 100; timeout = None; status = false } │ 00:48:47 verbose #31621 > > │ 00:00:04 debug #11 _4 │ 00:48:47 verbose #31622 > > │ 00:00:04 debug #12 _5 │ 00:48:47 verbose #31623 > > │ 00:00:06 verbose #13 networking.test_port_open / { port = 5555; ex = │ 00:48:47 verbose #31624 > > │ System.AggregateException: One or more errors occurred. (No connection could │ 00:48:47 verbose #31625 > > │ be made because the target machine actively refused it.) } │ 00:48:47 verbose #31626 > > │ 00:00:06 debug #14 5 │ 00:48:47 verbose #31627 > > │ 00:00:06 debug #15 6 │ 00:48:47 verbose #31628 > > │ __assert_eq / actual: 5557 / expected: 5557 │ 00:48:47 verbose #31629 > > │ __assert_between / actual: 110L / expected: struct (50L, 150L) │ 00:48:47 verbose #31630 > > │ __assert_eq / actual: true / expected: true │ 00:48:47 verbose #31631 > > │ │ 00:48:47 verbose #31632 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:47 verbose #31633 > > 00:48:47 verbose #31634 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:47 verbose #31635 > > //// test 00:48:47 verbose #31636 > > 00:48:47 verbose #31637 > > inl lock_ports host port = async.new_async_unit fun () => 00:48:47 verbose #31638 > > trace Debug (fun () => "_1") id 00:48:47 verbose #31639 > > inl listener1 = new_tcp_listener (ip_address_parse host) port |> use 00:48:47 verbose #31640 > > inl listener2 = new_tcp_listener (ip_address_parse host) (port + 1) |> use 00:48:47 verbose #31641 > > trace Debug (fun () => "_2") id 00:48:47 verbose #31642 > > listener1 |> listener_start 00:48:47 verbose #31643 > > listener2 |> listener_start 00:48:47 verbose #31644 > > trace Debug (fun () => "_3") id 00:48:47 verbose #31645 > > async.sleep 400 |> async.do 00:48:47 verbose #31646 > > trace Debug (fun () => "_4") id 00:48:47 verbose #31647 > > listener1 |> listener_stop 00:48:47 verbose #31648 > > listener2 |> listener_stop 00:48:47 verbose #31649 > > trace Debug (fun () => "_5") id 00:48:47 verbose #31650 > > 00:48:47 verbose #31651 > > inl host = "127.0.0.1" 00:48:47 verbose #31652 > > inl port = 5555 00:48:47 verbose #31653 > > 00:48:47 verbose #31654 > > fun () => 00:48:47 verbose #31655 > > trace Debug (fun () => "1") id 00:48:47 verbose #31656 > > inl child = lock_ports host port |> async.start_child |> async.let' 00:48:47 verbose #31657 > > trace Debug (fun () => "2") id 00:48:47 verbose #31658 > > async.sleep 240 |> async.do 00:48:47 verbose #31659 > > trace Debug (fun () => "3") id 00:48:47 verbose #31660 > > inl available_port = get_available_port (Some 60 |> optionm'.box) host port 00:48:47 verbose #31661 > > |> async.let' 00:48:47 verbose #31662 > > trace Debug (fun () => "4") id 00:48:47 verbose #31663 > > inl retries = wait_for_port_access (Some 60 |> optionm'.box) false host port 00:48:47 verbose #31664 > > |> async.let' 00:48:47 verbose #31665 > > trace Debug (fun () => "5") id 00:48:47 verbose #31666 > > child |> async.do 00:48:47 verbose #31667 > > trace Debug (fun () => "6") id 00:48:47 verbose #31668 > > (available_port, retries) |> return 00:48:47 verbose #31669 > > |> async.new_async_unit 00:48:47 verbose #31670 > > |> async.run_with_timeout 1500 00:48:47 verbose #31671 > > |> function 00:48:47 verbose #31672 > > | Some (available_port, retries) => 00:48:47 verbose #31673 > > available_port |> _assert_eq (port + 2) 00:48:47 verbose #31674 > > 00:48:47 verbose #31675 > > retries 00:48:47 verbose #31676 > > |> _assert_between 00:48:47 verbose #31677 > > (if platform.is_windows () then 2i64 else 1) 00:48:47 verbose #31678 > > (if platform.is_windows () then 10 else 120) 00:48:47 verbose #31679 > > 00:48:47 verbose #31680 > > true 00:48:47 verbose #31681 > > | _ => false 00:48:47 verbose #31682 > > |> _assert_eq true 00:48:49 verbose #31683 > > 00:48:49 verbose #31684 > > ╭─[ 2.62s - stdout ]───────────────────────────────────────────────────────────╮ 00:48:49 verbose #31685 > > │ 00:00:00 debug #1 1 │ 00:48:49 verbose #31686 > > │ 00:00:00 debug #2 _1 │ 00:48:49 verbose #31687 > > │ 00:00:00 debug #2 2 │ 00:48:49 verbose #31688 > > │ 00:00:00 debug #4 _2 │ 00:48:49 verbose #31689 > > │ 00:00:00 debug #5 _3 │ 00:48:49 verbose #31690 > > │ 00:00:00 debug #6 3 │ 00:48:49 verbose #31691 > > │ 00:00:00 verbose #7 async.run_with_timeout_async / { timeout = 60 } │ 00:48:49 verbose #31692 > > │ 00:00:00 debug #8 4 │ 00:48:49 verbose #31693 > > │ 00:00:00 verbose #9 networking.wait_for_port_access / { port = 5555; │ 00:48:49 verbose #31694 > > │ retry = 0; timeout = Some 60; status = false } │ 00:48:49 verbose #31695 > > │ 00:00:00 debug #10 _4 │ 00:48:49 verbose #31696 > > │ 00:00:00 debug #11 _5 │ 00:48:49 verbose #31697 > > │ 00:00:00 verbose #12 async.run_with_timeout_async / { timeout = 60 } │ 00:48:49 verbose #31698 > > │ 00:00:00 debug #13 5 │ 00:48:49 verbose #31699 > > │ 00:00:00 debug #14 6 │ 00:48:49 verbose #31700 > > │ __assert_eq / actual: 5557 / expected: 5557 │ 00:48:49 verbose #31701 > > │ __assert_between / actual: 4L / expected: struct (2L, 10L) │ 00:48:49 verbose #31702 > > │ __assert_eq / actual: true / expected: true │ 00:48:49 verbose #31703 > > │ │ 00:48:49 verbose #31704 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:49 verbose #31705 > > 00:48:49 verbose #31706 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:48:49 verbose #31707 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:48:49 verbose #31708 > > │ ## main │ 00:48:49 verbose #31709 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:48:49 verbose #31710 > > 00:48:49 verbose #31711 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:48:49 verbose #31712 > > inl main () = 00:48:49 verbose #31713 > > init_trace_state None 00:48:49 verbose #31714 > > $'let test_port_open x = !test_port_open x' : () 00:48:49 verbose #31715 > > $'let test_port_open_timeout x = !test_port_open_timeout x' : () 00:48:49 verbose #31716 > > $'let wait_for_port_access x = !wait_for_port_access x' : () 00:48:49 verbose #31717 > > $'let get_available_port x = !get_available_port x' : () 00:48:51 verbose #31718 > 00:00:50 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 34109 } 00:48:51 verbose #31719 > 00:00:50 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:48:51 verbose #31720 > "nbconvert", 00:48:51 verbose #31721 > "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb", 00:48:51 verbose #31722 > "--to", 00:48:51 verbose #31723 > "html", 00:48:51 verbose #31724 > "--HTMLExporter.theme=dark", 00:48:51 verbose #31725 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:48:53 verbose #31726 > 00:00:52 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/networking.dib.ipynb to html 00:48:53 verbose #31727 > 00:00:52 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:48:53 verbose #31728 > 00:00:52 verbose #7 ! validate(nb) 00:48:55 verbose #31729 > 00:00:53 verbose #8 ! [NbConvertApp] Writing 369887 bytes to c:\home\git\polyglot\lib\spiral\networking.dib.html 00:48:55 verbose #31730 > 00:00:54 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 651 } 00:48:55 verbose #31731 > 00:00:54 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 651 } 00:48:55 verbose #31732 > 00:00:54 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:48:55 verbose #31733 > "-c", 00:48:55 verbose #31734 > "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/networking.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:48:55 verbose #31735 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/networking.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:48:55 verbose #31736 > 00:00:54 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:48:55 verbose #31737 > 00:00:54 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:48:55 verbose #31738 > 00:00:54 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 34819 } 00:48:55 debug #31739 runtime.execute_with_options_async / { exit_code = 0; output_length = 38917 } 00:48:55 debug #38 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path networking.dib --retries 3 00:00:00 debug #1 writeDibCode / output: Spi / path: trace.dib 00:00:00 debug #1 writeDibCode / output: Spi / path: runtime.dib 00:00:00 debug #1 writeDibCode / output: Spi / path: threading.dib 00:00:00 debug #1 writeDibCode / output: Spi / path: networking.dib 00:00:00 debug #1 writeDibCode / output: Spi / path: common.dib 00:00:00 debug #1 writeDibCode / output: Spi / path: testing.dib 00:00:00 debug #1 writeDibCode / output: Spi / path: async.dib 00:00:00 debug #1 writeDibCode / output: Spi / path: crypto.dib 00:00:00 debug #2 parseDibCode / output: Spi / file: testing.dib 00:00:00 debug #2 parseDibCode / output: Spi / file: async.dib 00:00:00 debug #2 parseDibCode / output: Spi / file: trace.dib 00:00:00 debug #2 parseDibCode / output: Spi / file: networking.dib 00:00:00 debug #2 parseDibCode / output: Spi / file: runtime.dib 00:00:00 debug #2 parseDibCode / output: Spi / file: crypto.dib 00:00:00 debug #2 parseDibCode / output: Spi / file: common.dib 00:00:00 debug #2 parseDibCode / output: Spi / file: threading.dib 00:00:00 debug #10 writeDibCode / output: Spi / path: base.dib 00:00:00 debug #10 writeDibCode / output: Spi / path: env.dib 00:00:00 debug #10 writeDibCode / output: Spi / path: console.dib 00:00:00 debug #10 writeDibCode / output: Spi / path: parsing.dib 00:00:00 debug #10 writeDibCode / output: Spi / path: resultm.dib 00:00:00 debug #10 writeDibCode / output: Spi / path: iter.dib 00:00:00 debug #14 parseDibCode / output: Spi / file: env.dib 00:00:00 debug #14 parseDibCode / output: Spi / file: console.dib 00:00:00 debug #14 parseDibCode / output: Spi / file: parsing.dib 00:00:00 debug #14 parseDibCode / output: Spi / file: base.dib 00:00:00 debug #14 parseDibCode / output: Spi / file: iter.dib 00:00:00 debug #14 parseDibCode / output: Spi / file: resultm.dib 00:00:00 debug #10 writeDibCode / output: Spi / path: date_time.dib 00:00:00 debug #20 writeDibCode / output: Spi / path: file_system.dib 00:00:00 debug #20 writeDibCode / output: Spi / path: guid.dib 00:00:00 debug #20 parseDibCode / output: Spi / file: date_time.dib 00:00:00 debug #21 parseDibCode / output: Spi / file: file_system.dib 00:00:00 debug #22 parseDibCode / output: Spi / file: guid.dib 00:00:00 debug #25 writeDibCode / output: Spi / path: math.dib 00:00:00 debug #25 writeDibCode / output: Spi / path: mapm.dib 00:00:00 debug #25 writeDibCode / output: Spi / path: optionm'.dib 00:00:00 debug #27 parseDibCode / output: Spi / file: mapm.dib 00:00:00 debug #27 parseDibCode / output: Spi / file: math.dib 00:00:00 debug #28 parseDibCode / output: Spi / file: optionm'.dib 00:00:00 debug #31 writeDibCode / output: Spi / path: am'.dib 00:00:00 debug #32 parseDibCode / output: Spi / file: am'.dib 00:00:00 debug #33 writeDibCode / output: Spi / path: sm'.dib 00:00:00 debug #33 writeDibCode / output: Spir / path: sm'.dib 00:00:00 debug #35 parseDibCode / output: Spi / file: sm'.dib 00:00:00 debug #35 parseDibCode / output: Spir / file: sm'.dib 00:00:00 debug #37 writeDibCode / output: Spi / path: listm'.dib 00:00:00 debug #38 parseDibCode / output: Spi / file: listm'.dib 00:00:00 debug #39 writeDibCode / output: Spi / path: reflection.dib 00:00:00 debug #40 parseDibCode / output: Spi / file: reflection.dib 00:00:00 debug #41 writeDibCode / output: Spi / path: python.dib 00:00:00 debug #42 parseDibCode / output: Spi / file: python.dib 00:00:00 debug #43 writeDibCode / output: Spi / path: typescript.dib 00:00:00 debug #44 parseDibCode / output: Spi / file: typescript.dib 00:00:00 debug #45 writeDibCode / output: Spi / path: benchmark.dib 00:00:00 debug #46 parseDibCode / output: Spi / file: benchmark.dib 00:00:00 debug #46 writeDibCode / output: Spi / path: stream.dib 00:00:00 debug #48 writeDibCode / output: Spi / path: seq.dib 00:00:00 debug #48 writeDibCode / output: Spi / path: util.dib 00:00:00 debug #49 parseDibCode / output: Spi / file: seq.dib 00:00:00 debug #50 parseDibCode / output: Spi / file: util.dib 00:00:00 debug #51 writeDibCode / output: Spi / path: platform.dib 00:00:00 debug #52 writeDibCode / output: Spi / path: rust/rust.dib 00:00:00 debug #53 parseDibCode / output: Spi / file: platform.dib 00:00:00 debug #54 parseDibCode / output: Spi / file: rust/rust.dib 00:00:00 debug #56 writeDibCode / output: Spi / path: rust/testing.dib 00:00:00 debug #57 parseDibCode / output: Spi / file: rust/testing.dib 00:00:00 debug #48 parseDibCode / output: Spi / file: stream.dib 00:00:00 debug #58 writeDibCode / output: Spi / path: rust/near_workspaces.dib 00:00:00 debug #58 writeDibCode / output: Spi / path: rust/near.dib 00:00:00 debug #60 parseDibCode / output: Spi / file: rust/near_workspaces.dib 00:00:00 debug #61 parseDibCode / output: Spi / file: rust/near.dib 00:00:00 debug #63 writeDibCode / output: Spi / path: physics.dib 00:00:00 debug #64 parseDibCode / output: Spi / file: physics.dib 00:00:00 debug #64 writeDibCode / output: Spi / path: leptos/leptos.dib 00:00:00 debug #66 parseDibCode / output: Spi / file: leptos/leptos.dib 00:00:00 debug #66 writeDibCode / output: Spi / path: wasm.dib 00:00:00 debug #68 parseDibCode / output: Spi / file: wasm.dib 00:00:00 verbose #1 async.run_with_timeout_async / { timeout = 180 } 00:00:01 verbose #2 async.run_with_timeout_async / { timeout = 180 } 00:00:01 verbose #4 async.run_with_timeout_async / { timeout = 180 } 00:00:01 verbose #2 async.run_with_timeout_async / { timeout = 180 } 00:00:01 verbose #2 async.run_with_timeout_async / { timeout = 180 } 00:00:01 verbose #2 async.run_with_timeout_async / { timeout = 180 } 00:00:01 debug #1 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: runtime.spi 00:00:01 debug #1 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: threading.spi 00:00:01 debug #1 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: networking.spi 00:00:01 debug #1 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: async.spi 00:00:01 debug #1 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: trace.spi 00:00:01 debug #2 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: async.spi 00:00:01 debug #2 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: networking.spi 00:00:01 debug #2 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: threading.spi 00:00:01 debug #5 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: async.spi 00:00:01 debug #6 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: threading.spi 00:00:01 debug #5 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: networking.spi 00:00:01 debug #8 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: runtime.spi 00:00:01 debug #8 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: trace.spi 00:00:01 debug #10 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: runtime.spi 00:00:01 debug #11 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: trace.spi 00:00:02 verbose #12 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # threading\nopen rust\nopen rust_operators\n\n/// ## rust\n\n/// ### sl...new_disposable_token x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/threading.spi"}} / result: 00:00:02 verbose #12 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # runtime\nopen rust\nopen rust_operators\nopen sm\u0027_operators\n\n//...t_args x = !split_args x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/runtime.spi"}} / result: 00:00:02 verbose #12 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # async\nopen rust\nopen rust_operators\n\n/// ## rust\n\n/// ### future...token_with_default_async x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/async.spi"}} / result: 00:00:02 verbose #12 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # trace\n\n/// ## trace\n\n/// ### trace_level\nunion trace_level =\n ...0027let trace x = !trace x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/trace.spi"}} / result: 00:00:02 verbose #12 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # networking\nopen rust.rust_operators\n\n/// ## rust\n\n/// ### reqwest...!get_available_port x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/networking.spi"}} / result: 00:00:02 verbose #17 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/networking.spi"}} / result: 00:00:02 verbose #17 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/runtime.spi"}} / result: 00:00:02 verbose #17 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/threading.spi"}} / result: 00:00:02 verbose #17 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/async.spi"}} / result: 00:00:02 verbose #17 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/trace.spi"}} / result: 00:00:02 debug #22 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: networking.spi 00:00:02 debug #23 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: networking.spi 00:00:02 debug #24 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: runtime.spi 00:00:02 debug #25 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: runtime.spi 00:00:02 debug #26 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: async.spi 00:00:02 debug #27 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: async.spi 00:00:02 debug #28 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: threading.spi 00:00:02 debug #29 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: threading.spi 00:00:02 debug #30 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: trace.spi 00:00:02 debug #31 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: trace.spi 00:00:03 debug #32 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: trace.spi 00:00:03 debug #33 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: trace.spi 00:00:03 debug #34 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: threading.spi 00:00:03 debug #35 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: async.spi 00:00:03 debug #36 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: async.spi 00:00:03 debug #37 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: threading.spi 00:00:03 debug #38 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: runtime.spi 00:00:03 debug #38 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: networking.spi 00:00:03 debug #40 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: networking.spi 00:00:03 debug #41 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: runtime.spi 00:00:03 debug #42 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: runtime.spi 00:00:03 debug #43 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: runtime.spi 00:00:03 debug #44 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: networking.spi 00:00:03 debug #45 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: networking.spi 00:00:03 debug #46 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: threading.spi 00:00:03 debug #47 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: threading.spi 00:00:03 debug #48 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: async.spi 00:00:03 debug #49 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: async.spi 00:00:03 debug #50 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: trace.spi 00:00:03 debug #51 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: trace.spi 00:00:04 debug #52 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: trace.spi 00:00:04 debug #53 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: trace.spi 00:00:04 debug #54 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: async.spi 00:00:04 debug #55 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: async.spi 00:00:04 debug #56 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: threading.spi 00:00:04 debug #57 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: threading.spi 00:00:04 debug #58 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: networking.spi 00:00:04 debug #59 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: networking.spi 00:00:04 debug #60 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: runtime.spi 00:00:04 debug #61 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: runtime.spi 00:00:04 debug #62 Supervisor.buildFile / AsyncSeq.scan / outputContent: let rec closure0 () (v0 : System.Threading.CancellationToken) : Async<System.Threading.CancellationToken> = let v1 : unit = () #if FABLE_COMP...em.Threading.CancellationToken -> Async<System.Threading.CancellationToken>) = closure0() let merge_cancellation_token_with_default_async x = v0 x () / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: async.spi 00:00:04 debug #63 Supervisor.buildFile / takeWhileInclusive / outputContent: let rec closure0 () (v0 : System.Threading.CancellationToken) : Async<System.Threading.CancellationToken> = let v1 : unit = () #if FABLE_COMP...em.Threading.CancellationToken -> Async<System.Threading.CancellationToken>) = closure0() let merge_cancellation_token_with_default_async x = v0 x () / errors: [] / typeErrorCount: 0 / retry: 0 / path: async.spi 00:00:04 debug #64 Supervisor.buildFile / AsyncSeq.scan / outputContent: type Disposable (f : unit -> unit) = interface System.IDisposable with member _.Dispose () = f () type [<Struct>] US0 = | US0_0 of f0_0 : System.T...ading.CancellationToken option -> struct (System.Threading.CancellationToken * System.IDisposable)) = closure0() let new_disposable_token x = v0 x () / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: threading.spi 00:00:04 debug #65 Supervisor.buildFile / takeWhileInclusive / outputContent: type Disposable (f : unit -> unit) = interface System.IDisposable with member _.Dispose () = f () type [<Struct>] US0 = | US0_0 of f0_0 : System.T...ading.CancellationToken option -> struct (System.Threading.CancellationToken * System.IDisposable)) = closure0() let new_disposable_token x = v0 x () / errors: [] / typeErrorCount: 0 / retry: 0 / path: threading.spi 00:00:04 debug #66 Supervisor.buildFile / AsyncSeq.scan / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type std_string_String = class end #else type std_string_String = stri...e0() let v2 : unit = (fun () -> v1 (); v0) () let v16 : (US0 -> ((unit -> string) -> ((unit -> string) -> unit))) = closure3() let trace x = v16 x () / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: trace.spi 00:00:04 debug #67 Supervisor.buildFile / takeWhileInclusive / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type std_string_String = class end #else type std_string_String = stri...e0() let v2 : unit = (fun () -> v1 (); v0) () let v16 : (US0 -> ((unit -> string) -> ((unit -> string) -> unit))) = closure3() let trace x = v16 x () / errors: [] / typeErrorCount: 0 / retry: 0 / path: trace.spi 00:00:04 debug #68 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:04 debug #68 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:04 debug #68 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:04 debug #70 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: runtime.spi 00:00:04 debug #70 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: networking.spi 00:00:04 debug #71 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: runtime.spi 00:00:04 debug #72 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: networking.spi 00:00:04 verbose #6 async.run_with_timeout_async / { timeout = 180 } 00:00:04 verbose #6 async.run_with_timeout_async / { timeout = 180 } 00:00:04 debug #73 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: crypto.spi 00:00:04 debug #73 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: common.spi 00:00:04 debug #75 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: common.spi 00:00:04 debug #76 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: common.spi 00:00:04 debug #77 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: crypto.spi 00:00:04 debug #78 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: crypto.spi 00:00:04 verbose #8 async.run_with_timeout_async / { timeout = 180 } 00:00:04 verbose #79 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # common\n\n/// ## common\n\n/// ### (:\u003E)\nprototype (~:\u003E) r :...et memoize x = !memoize x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/common.spi"}} / result: 00:00:04 verbose #80 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # crypto\nopen rust\nopen rust_operators\n\n/// ## fsharp\n\n/// ### sha..._port x = !hash_to_port x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/crypto.spi"}} / result: 00:00:04 debug #81 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: date_time.spi 00:00:04 debug #82 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: date_time.spi 00:00:04 debug #83 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: date_time.spi 00:00:04 verbose #84 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/common.spi"}} / result: 00:00:04 verbose #85 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/crypto.spi"}} / result: 00:00:04 verbose #86 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # date_time\nopen rust.rust_operators\nopen sm\u0027_operators\n\n/// ##... x = !format_iso8601 x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/date_time.spi"}} / result: 00:00:04 verbose #87 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/date_time.spi"}} / result: 00:00:05 debug #88 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: networking.spi 00:00:05 debug #89 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: networking.spi 00:00:05 debug #90 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: runtime.spi 00:00:05 debug #91 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: runtime.spi 00:00:05 debug #92 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: crypto.spi 00:00:05 debug #93 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: crypto.spi 00:00:05 debug #94 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: common.spi 00:00:05 debug #95 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: common.spi 00:00:05 debug #96 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: date_time.spi 00:00:05 debug #97 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: date_time.spi 00:00:05 debug #98 Supervisor.buildFile / AsyncSeq.scan / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type std_string_String = class end #else type std_string_String = stri... let wait_for_port_access x = v18 x let v19 : (int32 option -> (string -> (int32 -> Async<int32>))) = closure24() let get_available_port x = v19 x () / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: networking.spi 00:00:05 debug #99 Supervisor.buildFile / takeWhileInclusive / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type std_string_String = class end #else type std_string_String = stri... let wait_for_port_access x = v18 x let v19 : (int32 option -> (string -> (int32 -> Async<int32>))) = closure24() let get_available_port x = v19 x () / errors: [] / typeErrorCount: 0 / retry: 0 / path: networking.spi 00:00:05 debug #100 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:05 debug #101 Supervisor.buildFile / AsyncSeq.scan / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type std_string_String = class end #else type std_string_String = stri...ng option)) = closure28() let execution_options x = v19 x let v20 : (string -> Result<(string []), string>) = closure29() let split_args x = v20 x () / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: runtime.spi 00:00:05 debug #102 Supervisor.buildFile / takeWhileInclusive / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type std_string_String = class end #else type std_string_String = stri...ng option)) = closure28() let execution_options x = v19 x let v20 : (string -> Result<(string []), string>) = closure29() let split_args x = v20 x () / errors: [] / typeErrorCount: 0 / retry: 0 / path: runtime.spi 00:00:05 debug #103 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: crypto.spi 00:00:05 debug #104 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: crypto.spi 00:00:05 debug #105 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: common.spi 00:00:05 debug #106 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: common.spi 00:00:05 debug #107 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:05 debug #108 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: date_time.spi 00:00:05 debug #109 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: date_time.spi 00:00:05 verbose #9 async.run_with_timeout_async / { timeout = 180 } 00:00:05 debug #110 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: platform.spi 00:00:05 debug #111 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: platform.spi 00:00:05 debug #112 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: platform.spi 00:00:05 verbose #113 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # platform\nopen rust.rust_operators\n\n/// ## fsharp\n\n/// ### os_plat...et_executable_suffix ()\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/platform.spi"}} / result: 00:00:05 verbose #114 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/platform.spi"}} / result: 00:00:06 verbose #10 async.run_with_timeout_async / { timeout = 180 } 00:00:06 debug #115 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: file_system.spi 00:00:06 debug #116 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: file_system.spi 00:00:06 debug #117 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: file_system.spi 00:00:06 verbose #118 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # file_system\nopen sm\u0027_operators\nopen rust\nopen rust_operators\n...003E) x = !combine x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/file_system.spi"}} / result: 00:00:06 verbose #119 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/file_system.spi"}} / result: 00:00:06 debug #120 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: crypto.spi 00:00:06 debug #121 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: crypto.spi 00:00:06 debug #122 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: common.spi 00:00:06 debug #123 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: common.spi 00:00:06 debug #124 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: date_time.spi 00:00:06 debug #125 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: date_time.spi 00:00:06 debug #126 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: platform.spi 00:00:06 debug #127 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: platform.spi 00:00:06 debug #128 Supervisor.buildFile / AsyncSeq.scan / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type std_string_String = class end #else type std_string_String = stri...nit -> unit) -> unit option)) = closure4() let retry_fn x = v17 x let v18 : ((unit -> unit) -> (unit -> unit)) = closure15() let memoize x = v18 x () / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: common.spi 00:00:06 debug #129 Supervisor.buildFile / takeWhileInclusive / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type std_string_String = class end #else type std_string_String = stri...nit -> unit) -> unit option)) = closure4() let retry_fn x = v17 x let v18 : ((unit -> unit) -> (unit -> unit)) = closure15() let memoize x = v18 x () / errors: [] / typeErrorCount: 0 / retry: 0 / path: common.spi 00:00:06 debug #130 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:06 debug #131 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:06 debug #132 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:06 debug #133 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:06 debug #134 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:06 critical #135 runWithTimeoutAsync** / ex: System.AggregateException: One or more errors occurred. (The process cannot access the file 'C:\home\git\polyglot\lib\spiral\common.fsx' because it is being used by another process.) ---> System.IO.IOException: The process cannot access the file 'C:\home\git\polyglot\lib\spiral\common.fsx' because it is being used by another process. at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode) at System.IO.File.OpenHandle(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.File.WriteToFileAsync(String path, FileMode mode, String contents, Encoding encoding, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.FSharp.Control.AsyncResult`1.Commit() in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 454 at <StartupCode$FSharp-Core>.$Async.AwaitAndBindChildResult@1972-6.Invoke(Boolean ok) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 1974 at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvokeNoHijackCheck[a,b](AsyncActivation`1 ctxt, b result1, FSharpFunc`2 userCode) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 528 at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 112 / timeout: 3600000 # Invoke-Block / $retry: 1/3 / $Location: / Get-Location: C:\home\git\polyglot\lib\spiral / $OnError: Stop / $exitcode: 1 / $EnvVars: { "PATH": "C:\\Users\\i574n\\scoop\\apps\\pwsh\\current;C:\\Program Files\\NVIDIA\\CUDNN\\v9.1\\bin;C:\\ProgramData\\scoop\\shims;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\dotnet\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Program Files\\Perforce;C:\\Program Files\\Wasmtime\\bin;C:\\Program Files\\Perforce\\;C:\\Users\\i574n\\scoop\\apps\\vscode-insiders\\current\\bin;C:\\Users\\i574n\\scoop\\apps\\python\\current\\Scripts;C:\\Users\\i574n\\scoop\\apps\\python\\current\\.;C:\\Users\\i574n\\scoop\\apps\\elixir\\current\\bin;C:\\Users\\i574n\\scoop\\apps\\rustup\\current\\.cargo\\bin;C:\\Users\\i574n\\scoop\\apps\\latex\\current\\texmfs\\install\\miktex\\bin\\x64;C:\\Users\\i574n\\scoop\\apps\\dotnet-sdk-preview\\current;C:\\Users\\i574n\\scoop\\apps\\dotnet-sdk\\current;C:\\Users\\i574n\\scoop\\apps\\gsudo\\current;C:\\Users\\i574n\\scoop\\apps\\python\\current;C:\\Users\\i574n\\scoop\\apps\\nircmd\\current;C:\\Users\\i574n\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\i574n/scoop/buckets/mold/home/windows/path;C:\\Users\\i574n/scoop/persist/rustup/.cargo/bin;C:\\Users\\i574n/scoop/apps/nvm/current/nodejs/nodejs;C:\\Users\\i574n/scoop/apps/cygwin/current/root/bin;C:\\Users\\i574n\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\i574n\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\i574n\\.bun\\bin;C:\\Users\\i574n\\.dotnet\\tools;C:\\Users\\i574n\\scoop\\shims;C:\\Users\\i574n\\.fly\\bin;C:\\Program Files\\Wasmtime\\bin;C:\\Users\\i574n/.cargo/bin;C:\\Users\\i574n/.bun/bin;C:\\Users\\i574n/.cargo/bin;C:\\Users\\i574n/.bun/bin;C:\\Users\\i574n/.cargo/bin;C:\\Users\\i574n/.bun/bin" } / $Error: '' / $ScriptBlock: '. ../../apps/spiral/dist/Supervisor$(_exe) --parallel --build-file async.spi async_.fsx --build-file runtime.spi runtime.fsx --build-file trace.spi trace.fsx --build-file threading.spi threading.fsx --build-file networking.spi networking.fsx --build-file crypto.spi crypto.fsx --build-file common.spi common.fsx --build-file date_time.spi date_time.fsx --build-file platform.spi platform.fsx --build-file file_system.spi file_system.fsx --build-file guid.spi guid.fsx --build-file "sm'.spi" sm.fsx' 00:00:01 verbose #1 async.run_with_timeout_async / { timeout = 180 } 00:00:02 verbose #2 async.run_with_timeout_async / { timeout = 180 } 00:00:02 verbose #2 async.run_with_timeout_async / { timeout = 180 } 00:00:02 verbose #4 async.run_with_timeout_async / { timeout = 180 } 00:00:02 verbose #5 async.run_with_timeout_async / { timeout = 180 } 00:00:02 verbose #6 async.run_with_timeout_async / { timeout = 180 } 00:00:02 debug #1 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: networking.spi 00:00:02 debug #1 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: threading.spi 00:00:02 debug #1 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: trace.spi 00:00:02 debug #1 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: runtime.spi 00:00:02 debug #1 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: async.spi 00:00:03 debug #2 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: async.spi 00:00:03 debug #2 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: runtime.spi 00:00:03 debug #2 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: threading.spi 00:00:03 debug #2 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: trace.spi 00:00:03 debug #2 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: networking.spi 00:00:03 debug #7 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: runtime.spi 00:00:03 debug #7 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: threading.spi 00:00:03 debug #7 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: async.spi 00:00:03 debug #9 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: networking.spi 00:00:03 debug #7 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: trace.spi 00:00:03 verbose #10 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # trace\n\n/// ## trace\n\n/// ### trace_level\nunion trace_level =\n ...0027let trace x = !trace x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/trace.spi"}} / result: 00:00:03 verbose #10 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # async\nopen rust\nopen rust_operators\n\n/// ## rust\n\n/// ### future...token_with_default_async x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/async.spi"}} / result: 00:00:03 verbose #10 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # runtime\nopen rust\nopen rust_operators\nopen sm\u0027_operators\n\n//...t_args x = !split_args x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/runtime.spi"}} / result: 00:00:03 verbose #10 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # threading\nopen rust\nopen rust_operators\n\n/// ## rust\n\n/// ### sl...new_disposable_token x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/threading.spi"}} / result: 00:00:03 verbose #14 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # networking\nopen rust.rust_operators\n\n/// ## rust\n\n/// ### reqwest...!get_available_port x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/networking.spi"}} / result: 00:00:03 verbose #15 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/runtime.spi"}} / result: 00:00:03 verbose #15 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/threading.spi"}} / result: 00:00:03 verbose #15 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/async.spi"}} / result: 00:00:03 verbose #15 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/trace.spi"}} / result: 00:00:03 verbose #15 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/networking.spi"}} / result: 00:00:03 debug #20 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: trace.spi 00:00:03 debug #21 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: trace.spi 00:00:03 debug #22 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: async.spi 00:00:03 debug #23 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: async.spi 00:00:03 debug #24 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: networking.spi 00:00:03 debug #25 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: networking.spi 00:00:03 debug #26 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: runtime.spi 00:00:03 debug #27 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: runtime.spi 00:00:03 debug #28 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: threading.spi 00:00:03 debug #29 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: threading.spi 00:00:04 debug #30 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: threading.spi 00:00:04 debug #31 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: threading.spi 00:00:04 debug #32 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: async.spi 00:00:04 debug #33 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: async.spi 00:00:04 debug #34 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: runtime.spi 00:00:04 debug #35 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: runtime.spi 00:00:04 debug #36 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: networking.spi 00:00:04 debug #37 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: networking.spi 00:00:04 debug #38 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: trace.spi 00:00:04 debug #39 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: trace.spi 00:00:04 debug #40 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: async.spi 00:00:04 debug #41 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: async.spi 00:00:04 debug #42 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: threading.spi 00:00:04 debug #43 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: threading.spi 00:00:04 debug #44 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: runtime.spi 00:00:04 debug #45 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: runtime.spi 00:00:04 debug #46 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: networking.spi 00:00:04 debug #47 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: networking.spi 00:00:04 debug #48 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: trace.spi 00:00:04 debug #49 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: trace.spi 00:00:05 debug #50 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: async.spi 00:00:05 debug #51 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: async.spi 00:00:05 debug #52 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: threading.spi 00:00:05 debug #53 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: threading.spi 00:00:05 debug #54 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: runtime.spi 00:00:05 debug #55 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: runtime.spi 00:00:05 debug #56 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: networking.spi 00:00:05 debug #57 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: networking.spi 00:00:05 debug #58 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: trace.spi 00:00:05 debug #59 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: trace.spi 00:00:05 debug #60 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: threading.spi 00:00:05 debug #61 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: threading.spi 00:00:05 debug #62 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: async.spi 00:00:05 debug #63 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: async.spi 00:00:05 debug #64 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: trace.spi 00:00:05 debug #64 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: networking.spi 00:00:05 debug #66 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: networking.spi 00:00:05 debug #67 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: trace.spi 00:00:05 debug #68 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: runtime.spi 00:00:05 debug #69 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: runtime.spi 00:00:06 debug #70 Supervisor.buildFile / AsyncSeq.scan / outputContent: let rec closure0 () (v0 : System.Threading.CancellationToken) : Async<System.Threading.CancellationToken> = let v1 : unit = () #if FABLE_COMP...em.Threading.CancellationToken -> Async<System.Threading.CancellationToken>) = closure0() let merge_cancellation_token_with_default_async x = v0 x () / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: async.spi 00:00:06 debug #70 Supervisor.buildFile / AsyncSeq.scan / outputContent: type Disposable (f : unit -> unit) = interface System.IDisposable with member _.Dispose () = f () type [<Struct>] US0 = | US0_0 of f0_0 : System.T...ading.CancellationToken option -> struct (System.Threading.CancellationToken * System.IDisposable)) = closure0() let new_disposable_token x = v0 x () / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: threading.spi 00:00:06 debug #72 Supervisor.buildFile / takeWhileInclusive / outputContent: let rec closure0 () (v0 : System.Threading.CancellationToken) : Async<System.Threading.CancellationToken> = let v1 : unit = () #if FABLE_COMP...em.Threading.CancellationToken -> Async<System.Threading.CancellationToken>) = closure0() let merge_cancellation_token_with_default_async x = v0 x () / errors: [] / typeErrorCount: 0 / retry: 0 / path: async.spi 00:00:06 debug #72 Supervisor.buildFile / takeWhileInclusive / outputContent: type Disposable (f : unit -> unit) = interface System.IDisposable with member _.Dispose () = f () type [<Struct>] US0 = | US0_0 of f0_0 : System.T...ading.CancellationToken option -> struct (System.Threading.CancellationToken * System.IDisposable)) = closure0() let new_disposable_token x = v0 x () / errors: [] / typeErrorCount: 0 / retry: 0 / path: threading.spi 00:00:06 debug #74 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:06 debug #75 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:06 debug #76 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: runtime.spi 00:00:06 debug #77 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: runtime.spi 00:00:06 debug #78 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: networking.spi 00:00:06 debug #79 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: networking.spi 00:00:06 debug #80 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: trace.spi 00:00:06 debug #81 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: trace.spi 00:00:06 debug #82 Supervisor.buildFile / AsyncSeq.scan / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type std_string_String = class end #else type std_string_String = stri...e0() let v2 : unit = (fun () -> v1 (); v0) () let v16 : (US0 -> ((unit -> string) -> ((unit -> string) -> unit))) = closure3() let trace x = v16 x () / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: trace.spi 00:00:06 debug #83 Supervisor.buildFile / takeWhileInclusive / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type std_string_String = class end #else type std_string_String = stri...e0() let v2 : unit = (fun () -> v1 (); v0) () let v16 : (US0 -> ((unit -> string) -> ((unit -> string) -> unit))) = closure3() let trace x = v16 x () / errors: [] / typeErrorCount: 0 / retry: 0 / path: trace.spi 00:00:06 debug #84 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:06 verbose #7 async.run_with_timeout_async / { timeout = 180 } 00:00:06 verbose #8 async.run_with_timeout_async / { timeout = 180 } 00:00:06 verbose #9 async.run_with_timeout_async / { timeout = 180 } 00:00:06 debug #85 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: common.spi 00:00:06 debug #86 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: crypto.spi 00:00:06 debug #87 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: common.spi 00:00:06 debug #88 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: common.spi 00:00:06 debug #89 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: crypto.spi 00:00:06 debug #90 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: crypto.spi 00:00:06 debug #91 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: date_time.spi 00:00:06 debug #92 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: date_time.spi 00:00:06 debug #93 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: date_time.spi 00:00:07 debug #94 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: runtime.spi 00:00:07 debug #95 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: networking.spi 00:00:07 debug #96 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: runtime.spi 00:00:07 debug #97 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: networking.spi 00:00:07 verbose #98 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # crypto\nopen rust\nopen rust_operators\n\n/// ## fsharp\n\n/// ### sha..._port x = !hash_to_port x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/crypto.spi"}} / result: 00:00:07 verbose #98 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # common\n\n/// ## common\n\n/// ### (:\u003E)\nprototype (~:\u003E) r :...et memoize x = !memoize x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/common.spi"}} / result: 00:00:07 verbose #99 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # date_time\nopen rust.rust_operators\nopen sm\u0027_operators\n\n/// ##... x = !format_iso8601 x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/date_time.spi"}} / result: 00:00:07 verbose #100 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/common.spi"}} / result: 00:00:07 verbose #100 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/crypto.spi"}} / result: 00:00:07 verbose #102 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/date_time.spi"}} / result: 00:00:07 debug #103 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: crypto.spi 00:00:07 debug #104 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: crypto.spi 00:00:07 debug #105 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: common.spi 00:00:07 debug #106 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: common.spi 00:00:07 debug #107 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: date_time.spi 00:00:07 debug #108 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: date_time.spi 00:00:07 debug #109 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: networking.spi 00:00:07 debug #109 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: runtime.spi 00:00:07 debug #111 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: networking.spi 00:00:07 debug #112 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: runtime.spi 00:00:07 debug #113 Supervisor.buildFile / AsyncSeq.scan / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type std_string_String = class end #else type std_string_String = stri...ng option)) = closure28() let execution_options x = v19 x let v20 : (string -> Result<(string []), string>) = closure29() let split_args x = v20 x () / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: runtime.spi 00:00:07 debug #114 Supervisor.buildFile / takeWhileInclusive / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type std_string_String = class end #else type std_string_String = stri...ng option)) = closure28() let execution_options x = v19 x let v20 : (string -> Result<(string []), string>) = closure29() let split_args x = v20 x () / errors: [] / typeErrorCount: 0 / retry: 0 / path: runtime.spi 00:00:07 debug #115 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:07 debug #116 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: common.spi 00:00:07 debug #117 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: common.spi 00:00:08 verbose #10 async.run_with_timeout_async / { timeout = 180 } 00:00:07 debug #118 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: crypto.spi 00:00:07 debug #119 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: crypto.spi 00:00:07 debug #120 Supervisor.buildFile / AsyncSeq.scan / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type std_string_String = class end #else type std_string_String = stri... let wait_for_port_access x = v18 x let v19 : (int32 option -> (string -> (int32 -> Async<int32>))) = closure24() let get_available_port x = v19 x () / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: networking.spi 00:00:07 debug #121 Supervisor.buildFile / takeWhileInclusive / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type std_string_String = class end #else type std_string_String = stri... let wait_for_port_access x = v18 x let v19 : (int32 option -> (string -> (int32 -> Async<int32>))) = closure24() let get_available_port x = v19 x () / errors: [] / typeErrorCount: 0 / retry: 0 / path: networking.spi 00:00:07 debug #122 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: date_time.spi 00:00:07 debug #123 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: date_time.spi 00:00:08 debug #124 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: platform.spi 00:00:08 debug #125 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: platform.spi 00:00:08 debug #126 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: platform.spi 00:00:08 verbose #127 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # platform\nopen rust.rust_operators\n\n/// ## fsharp\n\n/// ### os_plat...et_executable_suffix ()\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/platform.spi"}} / result: 00:00:08 debug #128 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:08 verbose #129 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/platform.spi"}} / result: 00:00:08 verbose #11 async.run_with_timeout_async / { timeout = 180 } 00:00:08 debug #130 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: file_system.spi 00:00:08 debug #131 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: file_system.spi 00:00:08 debug #132 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: file_system.spi 00:00:08 debug #133 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: common.spi 00:00:08 debug #134 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: common.spi 00:00:08 debug #135 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: crypto.spi 00:00:08 debug #136 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: crypto.spi 00:00:08 verbose #137 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # file_system\nopen sm\u0027_operators\nopen rust\nopen rust_operators\n...003E) x = !combine x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/file_system.spi"}} / result: 00:00:08 debug #138 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: date_time.spi 00:00:08 debug #139 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: date_time.spi 00:00:08 verbose #140 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/file_system.spi"}} / result: 00:00:08 debug #141 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: platform.spi 00:00:08 debug #142 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: platform.spi 00:00:08 debug #143 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: file_system.spi 00:00:08 debug #144 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: file_system.spi 00:00:08 debug #145 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: crypto.spi 00:00:08 debug #146 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: crypto.spi 00:00:09 debug #147 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: platform.spi 00:00:09 debug #148 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: platform.spi 00:00:09 debug #149 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: common.spi 00:00:09 debug #150 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: common.spi 00:00:09 debug #151 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: date_time.spi 00:00:09 debug #152 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: date_time.spi 00:00:09 debug #153 Supervisor.buildFile / AsyncSeq.scan / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("chrono::DateTime<$0>")>] #endif type chrono_DateTime<'T> = class end #if FABLE_COMPILER [<Fabl...g -> (System.DateTime -> string)) = closure10() let format x = v6 x let v7 : (System.DateTime -> string) = closure12() let format_iso8601 x = v7 x () / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: date_time.spi 00:00:09 debug #154 Supervisor.buildFile / takeWhileInclusive / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("chrono::DateTime<$0>")>] #endif type chrono_DateTime<'T> = class end #if FABLE_COMPILER [<Fabl...g -> (System.DateTime -> string)) = closure10() let format x = v6 x let v7 : (System.DateTime -> string) = closure12() let format_iso8601 x = v7 x () / errors: [] / typeErrorCount: 0 / retry: 0 / path: date_time.spi 00:00:09 debug #155 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:09 debug #156 Supervisor.buildFile / AsyncSeq.scan / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type std_string_String = class end #else type std_string_String = stri...nit -> unit) -> unit option)) = closure4() let retry_fn x = v17 x let v18 : ((unit -> unit) -> (unit -> unit)) = closure15() let memoize x = v18 x () / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: common.spi 00:00:09 debug #157 Supervisor.buildFile / takeWhileInclusive / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type std_string_String = class end #else type std_string_String = stri...nit -> unit) -> unit option)) = closure4() let retry_fn x = v17 x let v18 : ((unit -> unit) -> (unit -> unit)) = closure15() let memoize x = v18 x () / errors: [] / typeErrorCount: 0 / retry: 0 / path: common.spi 00:00:09 verbose #12 async.run_with_timeout_async / { timeout = 180 } 00:00:09 debug #158 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:09 debug #159 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: guid.spi 00:00:09 debug #160 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: guid.spi 00:00:09 debug #161 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: guid.spi 00:00:09 debug #162 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: platform.spi 00:00:09 debug #163 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: platform.spi 00:00:09 debug #164 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: file_system.spi 00:00:09 debug #165 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: file_system.spi 00:00:09 debug #166 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: crypto.spi 00:00:09 debug #167 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: crypto.spi 00:00:09 verbose #168 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # guid\n\n/// ## guid\n\n/// ### guid\nnominal guid_python =\n \u0060...aw_guid x = !new_raw_guid x\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/guid.spi"}} / result: 00:00:09 verbose #169 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/guid.spi"}} / result: 00:00:09 verbose #13 async.run_with_timeout_async / { timeout = 180 } 00:00:09 debug #170 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: sm'.spi 00:00:09 debug #171 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: sm'.spi 00:00:09 debug #172 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: sm'.spi 00:00:09 verbose #173 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # sm\u0027\nopen rust\nopen rust_operators\nopen sm\u0027_real\n\n/// ##...tring std_string = from_std_string\n","uri":"file:///c:/home/git/polyglot/lib/spiral/sm\u0027.spi"}} / result: 00:00:09 debug #174 Supervisor.buildFile / AsyncSeq.scan / outputContent: type [<Struct>] US0 = | US0_0 | US0_1 | US0_2 and [<Struct>] US1 = | US1_0 of f0_0 : US0 | US1_1 of f1_0 : US0 | US1_2 of f2_0... v25 let v0 : (unit -> bool) = closure0() let is_windows () = v0 () let v1 : (unit -> string) = closure1() let get_executable_suffix () = v1 () () / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: platform.spi 00:00:09 debug #175 Supervisor.buildFile / takeWhileInclusive / outputContent: type [<Struct>] US0 = | US0_0 | US0_1 | US0_2 and [<Struct>] US1 = | US1_0 of f0_0 : US0 | US1_1 of f1_0 : US0 | US1_2 of f2_0... v25 let v0 : (unit -> bool) = closure0() let is_windows () = v0 () let v1 : (unit -> string) = closure1() let get_executable_suffix () = v1 () () / errors: [] / typeErrorCount: 0 / retry: 0 / path: platform.spi 00:00:10 verbose #176 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/sm\u0027.spi"}} / result: 00:00:10 debug #177 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:10 debug #178 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: file_system.spi 00:00:10 debug #179 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: file_system.spi 00:00:10 debug #180 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: crypto.spi 00:00:10 debug #181 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: crypto.spi 00:00:10 debug #182 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: guid.spi 00:00:10 debug #183 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: guid.spi 00:00:10 debug #184 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: sm'.spi 00:00:10 debug #185 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: sm'.spi 00:00:10 debug #186 Supervisor.buildFile / AsyncSeq.scan / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("Vec<$0>")>] #endif type Vec<'T> = class end #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core....1024us v124 let v0 : (string -> string) = closure0() let hash_text x = v0 x let v1 : (string -> uint16) = closure1() let hash_to_port x = v1 x () / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: crypto.spi 00:00:10 debug #187 Supervisor.buildFile / takeWhileInclusive / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("Vec<$0>")>] #endif type Vec<'T> = class end #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core....1024us v124 let v0 : (string -> string) = closure0() let hash_text x = v0 x let v1 : (string -> uint16) = closure1() let hash_to_port x = v1 x () / errors: [] / typeErrorCount: 0 / retry: 0 / path: crypto.spi 00:00:10 debug #188 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:10 debug #189 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: file_system.spi 00:00:10 debug #190 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: file_system.spi 00:00:10 debug #191 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: guid.spi 00:00:10 debug #192 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: guid.spi 00:00:10 debug #193 Supervisor.buildFile / AsyncSeq.scan / outputContent: let rec closure0 () (v0 : string) : System.Guid = let v1 : System.Guid = v0 |> System.Guid v1 and method0 (v0 : string) : System.Guid = l... = v0 x let v1 : (string -> System.Guid) = closure1() let hash_guid x = v1 x let v2 : (unit -> System.Guid) = closure2() let new_raw_guid x = v2 x () / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: guid.spi 00:00:10 debug #194 Supervisor.buildFile / takeWhileInclusive / outputContent: let rec closure0 () (v0 : string) : System.Guid = let v1 : System.Guid = v0 |> System.Guid v1 and method0 (v0 : string) : System.Guid = l... = v0 x let v1 : (string -> System.Guid) = closure1() let hash_guid x = v1 x let v2 : (unit -> System.Guid) = closure2() let new_raw_guid x = v2 x () / errors: [] / typeErrorCount: 0 / retry: 0 / path: guid.spi 00:00:10 debug #195 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:10 debug #196 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: sm'.spi 00:00:10 debug #197 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: sm'.spi 00:00:11 debug #198 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: file_system.spi 00:00:11 debug #199 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: file_system.spi 00:00:11 debug #200 Supervisor.buildFile / AsyncSeq.scan / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("regex::Regex")>] #endif type regex_Regex = class end #if FABLE_COMPILER [<Fable.Core.Erase; Fa... : (string -> ((string []) -> string)) = closure46() let join' x = v21 x let v22 : (string -> (char [])) = closure48() let to_char_array x = v22 x () / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: sm'.spi 00:00:11 debug #201 Supervisor.buildFile / takeWhileInclusive / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("regex::Regex")>] #endif type regex_Regex = class end #if FABLE_COMPILER [<Fable.Core.Erase; Fa... : (string -> ((string []) -> string)) = closure46() let join' x = v21 x let v22 : (string -> (char [])) = closure48() let to_char_array x = v22 x () / errors: [] / typeErrorCount: 0 / retry: 0 / path: sm'.spi 00:00:11 debug #202 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:11 debug #203 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: file_system.spi 00:00:11 debug #204 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: file_system.spi 00:00:12 debug #205 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: file_system.spi 00:00:12 debug #206 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: file_system.spi 00:00:12 debug #207 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: file_system.spi 00:00:12 debug #208 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: file_system.spi 00:00:12 debug #209 Supervisor.buildFile / AsyncSeq.scan / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type std_string_String = class end #else type std_string_String = stri...(string -> (string -> unit)) = closure56() let link_directory x = v34 x let v35 : (string -> (string -> string)) = closure58() let (</>) x = v35 x () / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: file_system.spi 00:00:12 debug #210 Supervisor.buildFile / takeWhileInclusive / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>] type std_string_String = class end #else type std_string_String = stri...(string -> (string -> unit)) = closure56() let link_directory x = v34 x let v35 : (string -> (string -> string)) = closure58() let (</>) x = v35 x () / errors: [] / typeErrorCount: 0 / retry: 0 / path: file_system.spi 00:00:12 debug #211 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
In [ ]:
{ pwsh ../apps/scheduler/build.ps1 } | Invoke-Block
00:00:00 verbose #1 async.run_with_timeout_async / { timeout = 180 } 00:00:00 debug #1 runtime.execute_with_options_async / { options = { command = ../../workspace/target/release/spiral_builder.exe dib --path Tasks.dib --retries 3; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:01 verbose #2 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "Tasks.dib", "--retries", "3"])) } 00:00:01 verbose #3 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:00:01 verbose #4 > "repl", 00:00:01 verbose #5 > "--exit-after-run", 00:00:01 verbose #6 > "--run", 00:00:01 verbose #7 > "c:/home/git/polyglot/apps/scheduler/Tasks.dib", 00:00:01 verbose #8 > "--output-path", 00:00:01 verbose #9 > "c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb", 00:00:01 verbose #10 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/scheduler/Tasks.dib" --output-path "c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:00:03 verbose #11 > > 00:00:03 verbose #12 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:03 verbose #13 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:03 verbose #14 > > │ ## Tasks (Polyglot) │ 00:00:03 verbose #15 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:07 verbose #16 > > 00:00:07 verbose #17 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:07 verbose #18 > > //// test 00:00:07 verbose #19 > > 00:00:07 verbose #20 > > open testing 00:00:08 verbose #21 > > 00:00:08 verbose #22 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:08 verbose #23 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:08 verbose #24 > > │ ## task_name │ 00:00:08 verbose #25 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:08 verbose #26 > > 00:00:08 verbose #27 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:08 verbose #28 > > nominal task_name = string 00:00:09 verbose #29 > > 00:00:09 verbose #30 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:09 verbose #31 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:09 verbose #32 > > │ ## manual_scheduling │ 00:00:09 verbose #33 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:09 verbose #34 > > 00:00:09 verbose #35 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:09 verbose #36 > > union manual_scheduling = 00:00:09 verbose #37 > > | WithSuggestion 00:00:09 verbose #38 > > | WithoutSuggestion 00:00:09 verbose #39 > > 00:00:09 verbose #40 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:09 verbose #41 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:09 verbose #42 > > │ ## recurrency_offset │ 00:00:09 verbose #43 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:09 verbose #44 > > 00:00:09 verbose #45 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:09 verbose #46 > > union recurrency_offset = 00:00:09 verbose #47 > > | Days : i32 00:00:09 verbose #48 > > | Weeks : i32 00:00:09 verbose #49 > > | Months : i32 00:00:09 verbose #50 > > 00:00:09 verbose #51 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:09 verbose #52 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:09 verbose #53 > > │ ## day_of_week │ 00:00:09 verbose #54 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:09 verbose #55 > > 00:00:09 verbose #56 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:09 verbose #57 > > union day_of_week = 00:00:09 verbose #58 > > | Sunday 00:00:09 verbose #59 > > | Monday 00:00:09 verbose #60 > > | Tuesday 00:00:09 verbose #61 > > | Wednesday 00:00:09 verbose #62 > > | Thursday 00:00:09 verbose #63 > > | Friday 00:00:09 verbose #64 > > | Saturday 00:00:10 verbose #65 > > 00:00:10 verbose #66 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:10 verbose #67 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:10 verbose #68 > > │ ## month │ 00:00:10 verbose #69 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:10 verbose #70 > > 00:00:10 verbose #71 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:10 verbose #72 > > union month = 00:00:10 verbose #73 > > | January 00:00:10 verbose #74 > > | February 00:00:10 verbose #75 > > | March 00:00:10 verbose #76 > > | April 00:00:10 verbose #77 > > | May 00:00:10 verbose #78 > > | June 00:00:10 verbose #79 > > | July 00:00:10 verbose #80 > > | August 00:00:10 verbose #81 > > | September 00:00:10 verbose #82 > > | October 00:00:10 verbose #83 > > | November 00:00:10 verbose #84 > > | December 00:00:10 verbose #85 > > 00:00:10 verbose #86 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:10 verbose #87 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:10 verbose #88 > > │ ## day │ 00:00:10 verbose #89 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:10 verbose #90 > > 00:00:10 verbose #91 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:10 verbose #92 > > nominal day = i32 00:00:11 verbose #93 > > 00:00:11 verbose #94 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:11 verbose #95 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:11 verbose #96 > > │ ## year │ 00:00:11 verbose #97 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:11 verbose #98 > > 00:00:11 verbose #99 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:11 verbose #100 > > nominal year = i32 00:00:11 verbose #101 > > 00:00:11 verbose #102 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:11 verbose #103 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:11 verbose #104 > > │ ## fixed_recurrency │ 00:00:11 verbose #105 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:11 verbose #106 > > 00:00:11 verbose #107 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:11 verbose #108 > > union fixed_recurrency = 00:00:11 verbose #109 > > | Weekly : day_of_week 00:00:11 verbose #110 > > | Monthly : day 00:00:11 verbose #111 > > | Yearly : day * month 00:00:11 verbose #112 > > 00:00:11 verbose #113 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:11 verbose #114 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:11 verbose #115 > > │ ## recurrency │ 00:00:11 verbose #116 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:11 verbose #117 > > 00:00:11 verbose #118 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:11 verbose #119 > > union recurrency = 00:00:11 verbose #120 > > | Offset : recurrency_offset 00:00:11 verbose #121 > > | Fixed : list fixed_recurrency 00:00:12 verbose #122 > > 00:00:12 verbose #123 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:12 verbose #124 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:12 verbose #125 > > │ ## scheduling │ 00:00:12 verbose #126 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:12 verbose #127 > > 00:00:12 verbose #128 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:12 verbose #129 > > union scheduling = 00:00:12 verbose #130 > > | Manual : manual_scheduling 00:00:12 verbose #131 > > | Recurrent : recurrency 00:00:12 verbose #132 > > 00:00:12 verbose #133 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:12 verbose #134 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:12 verbose #135 > > │ ## task │ 00:00:12 verbose #136 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:12 verbose #137 > > 00:00:12 verbose #138 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:12 verbose #139 > > type task = 00:00:12 verbose #140 > > { 00:00:12 verbose #141 > > name : task_name 00:00:12 verbose #142 > > scheduling : scheduling 00:00:12 verbose #143 > > } 00:00:13 verbose #144 > > 00:00:13 verbose #145 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:13 verbose #146 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:13 verbose #147 > > │ ## date │ 00:00:13 verbose #148 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:13 verbose #149 > > 00:00:13 verbose #150 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:13 verbose #151 > > type date = 00:00:13 verbose #152 > > { 00:00:13 verbose #153 > > year : year 00:00:13 verbose #154 > > month : month 00:00:13 verbose #155 > > day : day 00:00:13 verbose #156 > > } 00:00:13 verbose #157 > > 00:00:13 verbose #158 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:13 verbose #159 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:13 verbose #160 > > │ ## status │ 00:00:13 verbose #161 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:13 verbose #162 > > 00:00:13 verbose #163 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:13 verbose #164 > > union status = 00:00:13 verbose #165 > > | Postponed : option () 00:00:14 verbose #166 > > 00:00:14 verbose #167 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:14 verbose #168 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:14 verbose #169 > > │ ## event │ 00:00:14 verbose #170 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:14 verbose #171 > > 00:00:14 verbose #172 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:14 verbose #173 > > type event = 00:00:14 verbose #174 > > { 00:00:14 verbose #175 > > date : date 00:00:14 verbose #176 > > status : status 00:00:14 verbose #177 > > } 00:00:14 verbose #178 > > 00:00:14 verbose #179 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:14 verbose #180 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:14 verbose #181 > > │ ## task_template │ 00:00:14 verbose #182 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:14 verbose #183 > > 00:00:14 verbose #184 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:14 verbose #185 > > type task_template = 00:00:14 verbose #186 > > { 00:00:14 verbose #187 > > task : task 00:00:14 verbose #188 > > events : list event 00:00:14 verbose #189 > > } 00:00:15 verbose #190 > > 00:00:15 verbose #191 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:15 verbose #192 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:15 verbose #193 > > │ ## get_tasks (test) │ 00:00:15 verbose #194 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:15 verbose #195 > > 00:00:15 verbose #196 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:15 verbose #197 > > //// test 00:00:15 verbose #198 > > 00:00:15 verbose #199 > > inl get_tasks () : list task_template = 00:00:15 verbose #200 > > [[ 00:00:15 verbose #201 > > { 00:00:15 verbose #202 > > task = 00:00:15 verbose #203 > > { 00:00:15 verbose #204 > > name = task_name "01" 00:00:15 verbose #205 > > scheduling = Manual WithSuggestion 00:00:15 verbose #206 > > } 00:00:15 verbose #207 > > events = [[]] 00:00:15 verbose #208 > > } 00:00:15 verbose #209 > > { 00:00:15 verbose #210 > > task = 00:00:15 verbose #211 > > { 00:00:15 verbose #212 > > name = task_name "02" 00:00:15 verbose #213 > > scheduling = Manual WithSuggestion 00:00:15 verbose #214 > > } 00:00:15 verbose #215 > > events = [[]] 00:00:15 verbose #216 > > } 00:00:15 verbose #217 > > { 00:00:15 verbose #218 > > task = 00:00:15 verbose #219 > > { 00:00:15 verbose #220 > > name = task_name "03" 00:00:15 verbose #221 > > scheduling = Manual WithSuggestion 00:00:15 verbose #222 > > } 00:00:15 verbose #223 > > events = [[]] 00:00:15 verbose #224 > > } 00:00:15 verbose #225 > > ]] 00:00:15 verbose #226 > > 00:00:15 verbose #227 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:15 verbose #228 > > //// test 00:00:15 verbose #229 > > ///! fsharp 00:00:15 verbose #230 > > ///! cuda 00:00:15 verbose #231 > > ///! rust 00:00:15 verbose #232 > > ///! typescript 00:00:15 verbose #233 > > ///! python 00:00:15 verbose #234 > > 00:00:15 verbose #235 > > get_tasks () 00:00:15 verbose #236 > > |> sm'.format_debug 00:00:15 verbose #237 > > |> _assert sm'.contains "01" 00:00:40 verbose #238 > > 00:00:40 verbose #239 > > ╭─[ 24.63s - return value ]────────────────────────────────────────────────────╮ 00:00:40 verbose #240 > > │ .py output (Cuda): │ 00:00:40 verbose #241 > > │ __assert / actual: 01 / expected: UH2_1(v0='01', v1=US1_0(v0=US0_0()), │ 00:00:40 verbose #242 > > │ v2=UH1_0(), v3=UH2_1(v0='02', v1=US1_0(v0=US0_0()), v2=UH1_0(), │ 00:00:40 verbose #243 > > │ v3=UH2_1(v0='03', v1=US1_0(v0=US0_0()), v2=UH1_0(), v3=UH2_0()))) │ 00:00:40 verbose #244 > > │ │ 00:00:40 verbose #245 > > │ .rs output: │ 00:00:40 verbose #246 > > │ __assert / actual: "01" / expected: "UH2_1("01", US1_0(US0_0), UH1_0, │ 00:00:40 verbose #247 > > │ UH2_1("02", US1_0(US0_0), UH1_0, UH2_1("03", US1_0(US0_0), UH1_0, UH2_0)))" │ 00:00:40 verbose #248 > > │ │ 00:00:40 verbose #249 > > │ .ts output: │ 00:00:40 verbose #250 > > │ __assert / actual: 01 / expected: UH2_1 (01, US1_0 US0_0, UH1_0, UH2_1 (02, │ 00:00:40 verbose #251 > > │ US1_0 US0_0, UH1_0, UH2_1 (03, US1_0 US0_0, UH1_0, UH2_0))) │ 00:00:40 verbose #252 > > │ │ 00:00:40 verbose #253 > > │ .py output: │ 00:00:40 verbose #254 > > │ __assert / actual: 01 / expected: UH2_1 ("01", US1_0 US0_0, UH1_0, UH2_1 │ 00:00:40 verbose #255 > > │ ("02", US1_0 US0_0, UH1_0, UH2_1 ("03", US1_0 US0_0, UH1_0, UH2_0))) │ 00:00:40 verbose #256 > > │ │ 00:00:40 verbose #257 > > │ │ 00:00:40 verbose #258 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:40 verbose #259 > > 00:00:40 verbose #260 > > ╭─[ 24.63s - stdout ]──────────────────────────────────────────────────────────╮ 00:00:40 verbose #261 > > │ .fsx output: │ 00:00:40 verbose #262 > > │ __assert / actual: "01" / expected: "UH2_1 │ 00:00:40 verbose #263 > > │ ("01", US1_0 US0_0, UH1_0, │ 00:00:40 verbose #264 > > │ UH2_1 ("02", US1_0 US0_0, UH1_0, UH2_1 ("03", US1_0 US0_0, UH1_0, │ 00:00:40 verbose #265 > > │ UH2_0)))" │ 00:00:40 verbose #266 > > │ │ 00:00:40 verbose #267 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:40 verbose #268 > > 00:00:40 verbose #269 > > ── spiral ────────────────────────────────────────────────────────────────────── 00:00:40 verbose #270 > > //// test 00:00:40 verbose #271 > > ///! fsharp 00:00:40 verbose #272 > > ///! cuda 00:00:40 verbose #273 > > ///! rust 00:00:40 verbose #274 > > ///! typescript 00:00:40 verbose #275 > > ///! python 00:00:40 verbose #276 > > 00:00:40 verbose #277 > > get_tasks () 00:00:40 verbose #278 > > |> listm'.try_item 0i32 00:00:40 verbose #279 > > |> fun (Some task) => task.task.name 00:00:40 verbose #280 > > |> _assert_eq (task_name "01") 00:00:57 verbose #281 > > 00:00:57 verbose #282 > > ╭─[ 17.86s - return value ]────────────────────────────────────────────────────╮ 00:00:57 verbose #283 > > │ .py output (Cuda): │ 00:00:57 verbose #284 > > │ __assert_eq / actual: 01 / expected: 01 │ 00:00:57 verbose #285 > > │ │ 00:00:57 verbose #286 > > │ .rs output: │ 00:00:57 verbose #287 > > │ __assert_eq / actual: "01" / expected: "01" │ 00:00:57 verbose #288 > > │ │ 00:00:57 verbose #289 > > │ .ts output: │ 00:00:57 verbose #290 > > │ __assert_eq / actual: 01 / expected: 01 │ 00:00:57 verbose #291 > > │ │ 00:00:57 verbose #292 > > │ .py output: │ 00:00:57 verbose #293 > > │ __assert_eq / actual: 01 / expected: 01 │ 00:00:57 verbose #294 > > │ │ 00:00:57 verbose #295 > > │ │ 00:00:57 verbose #296 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:57 verbose #297 > > 00:00:57 verbose #298 > > ╭─[ 17.86s - stdout ]──────────────────────────────────────────────────────────╮ 00:00:57 verbose #299 > > │ .fsx output: │ 00:00:57 verbose #300 > > │ __assert_eq / actual: "01" / expected: "01" │ 00:00:57 verbose #301 > > │ │ 00:00:57 verbose #302 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:58 verbose #303 > 00:00:56 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 13098 } 00:00:58 verbose #304 > 00:00:56 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:00:58 verbose #305 > "nbconvert", 00:00:58 verbose #306 > "c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb", 00:00:58 verbose #307 > "--to", 00:00:58 verbose #308 > "html", 00:00:58 verbose #309 > "--HTMLExporter.theme=dark", 00:00:58 verbose #310 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:01:00 verbose #311 > 00:00:59 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb to html 00:01:00 verbose #312 > 00:00:59 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:01:00 verbose #313 > 00:00:59 verbose #7 ! validate(nb) 00:01:01 verbose #314 > 00:01:00 verbose #8 ! [NbConvertApp] Writing 300170 bytes to c:\home\git\polyglot\apps\scheduler\Tasks.dib.html 00:01:01 verbose #315 > 00:01:00 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 649 } 00:01:01 verbose #316 > 00:01:00 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 649 } 00:01:01 verbose #317 > 00:01:00 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:01:01 verbose #318 > "-c", 00:01:01 verbose #319 > "$counter = 1; $path = 'c:/home/git/polyglot/apps/scheduler/Tasks.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:01:01 verbose #320 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/scheduler/Tasks.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:01:02 verbose #321 > 00:01:01 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:01:02 verbose #322 > 00:01:01 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:01:02 verbose #323 > 00:01:01 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 13806 } 00:01:02 debug #324 runtime.execute_with_options_async / { exit_code = 0; output_length = 17091 } 00:01:02 debug #1 main / executeCommand / exitCode: 0 / command: ../../workspace/target/release/spiral_builder.exe dib --path Tasks.dib --retries 3 00:00:00 debug #1 writeDibCode / output: Spi / path: Tasks.dib 00:00:00 debug #2 parseDibCode / output: Spi / file: Tasks.dib
In [ ]:
{ pwsh ../apps/chat/build.ps1 } | Invoke-Block
00:00:00 debug #1 writeDibCode / output: Spi / path: chat_contract.dib 00:00:00 debug #2 parseDibCode / output: Spi / file: chat_contract.dib 00:00:00 verbose #1 async.run_with_timeout_async / { timeout = 180 } 00:00:01 verbose #2 async.run_with_timeout_async / { timeout = 180 } 00:00:01 debug #1 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: chat_contract.spi 00:00:01 debug #2 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: chat_contract.spi 00:00:01 debug #3 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: chat_contract.spi 00:00:01 verbose #4 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # chat_contract\nopen rust\nopen rust.rust_operators\n\n/// ## chat_cont...03E ignore\u0027 : ()\n","uri":"file:///c:/home/git/polyglot/apps/chat/contract/chat_contract.spi"}} / result: 00:00:01 verbose #5 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/apps/chat/contract/chat_contract.spi"}} / result: 00:00:01 debug #6 Supervisor.buildFile / AsyncSeq.scan / outputContent: / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: chat_contract.spi 00:00:01 debug #7 Supervisor.buildFile / takeWhileInclusive / outputContent: / errors: [] / typeErrorCount: 0 / retry: 0 / path: chat_contract.spi 00:00:01 debug #8 Supervisor.buildFile / AsyncSeq.scan / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("*/ $0 /*")>] #endif type TypeEmit<'T> = class end #if FABLE_COMPILER [<Fable.Core.Erase; Fable... i': 15uy / n: 14uy" let v1443 : bool = Fable.Core.RustInterop.emitRustExpr () v1442 () let v0 : (unit -> unit) = closure0() v0 |> ignore () / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / error: / path: chat_contract.spi 00:00:01 debug #9 Supervisor.buildFile / takeWhileInclusive / outputContent: #if FABLE_COMPILER [<Fable.Core.Erase; Fable.Core.Emit("*/ $0 /*")>] #endif type TypeEmit<'T> = class end #if FABLE_COMPILER [<Fable.Core.Erase; Fable... i': 15uy / n: 14uy" let v1443 : bool = Fable.Core.RustInterop.emitRustExpr () v1442 () let v0 : (unit -> unit) = closure0() v0 |> ignore () / errors: [] / typeErrorCount: 0 / retry: 0 / path: chat_contract.spi 00:00:01 debug #10 FileSystem.watchWithFilter / Disposing watch stream / filter: FileName, LastWrite 00:00:00 debug #1 persistCodeProject / packages: [Fable.Core] / modules: [lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / name: chat_contract / hash: / code.Length: 113122 00:00:00 debug #2 buildProject / fullPath: C:\home\git\polyglot\target\Builder\chat_contract\chat_contract.fsproj 00:00:00 debug #1 runtime.execute_with_options_async / { options = { command = dotnet publish "C:\home\git\polyglot\target/Builder\chat_contract\chat_contract.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\chat\contract\dist" --runtime win-x64; cancellation_token = None; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = Some "C:\home\git\polyglot\target\Builder\chat_contract" } } 00:00:00 verbose #2 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET 00:00:01 verbose #3 > Determining projects to restore... 00:00:02 verbose #4 > All projects are up-to-date for restore. 00:00:02 verbose #5 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\Builder\chat_contract\chat_contract.fsproj] 00:00:11 verbose #6 > C:\home\git\polyglot\target\Builder\chat_contract\chat_contract.fs(2589,15): warning FS0025: Incomplete pattern matches on this expression. For example, the value 'US4_0 (_)' may indicate a case not covered by the pattern(s). [C:\home\git\polyglot\target\Builder\chat_contract\chat_contract.fsproj] 00:00:16 verbose #7 > chat_contract -> C:\home\git\polyglot\target\Builder\chat_contract\bin\Release\net9.0\win-x64\chat_contract.dll 00:00:17 verbose #8 > chat_contract -> C:\home\git\polyglot\apps\chat\contract\dist\ 00:00:18 debug #9 runtime.execute_with_options_async / { exit_code = 0; output_length = 964 } targetDir: C:\home\git\polyglot\target\Builder\chat_contract Fable 4.21.0: F# to Rust compiler (status: alpha) Thanks to the contributor! @xtuc Stand with Ukraine! https://standwithukraine.com.ua/ Parsing target\Builder\chat_contract\chat_contract.fsproj... Retrieving project options from cache, in case of issues run `dotnet fable clean` or try `--noCache` option. Project and references (14 source files) parsed in 191ms Started Fable compilation... Fable compilation finished in 11455ms .\target\Builder\chat_contract\chat_contract.fs(2589,15): (2589,19) warning FSHARP: Incomplete pattern matches on this expression. For example, the value 'US4_0 (_)' may indicate a case not covered by the pattern(s). (code 25) .\lib\spiral\common.fsx(1458,0): (1458,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\sm.fsx(450,0): (450,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\crypto.fsx(1612,0): (1612,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\date_time.fsx(997,0): (997,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\async_.fsx(76,0): (76,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\threading.fsx(127,0): (127,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\networking.fsx(3719,0): (3719,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\platform.fsx(104,0): (104,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\runtime.fsx(4778,0): (4778,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\file_system.fsx(55820,0): (55820,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\lib\spiral\trace.fsx(1490,0): (1490,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! .\target\Builder\chat_contract\chat_contract.fs(2803,6): (2803,12) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk! Compiling winnow v0.6.20 Compiling syn v2.0.79 Compiling block-buffer v0.11.0-rc.2 Compiling digest v0.11.0-pre.9 Compiling sha2 v0.11.0-pre.4 Compiling toml_edit v0.22.22 Compiling proc-macro-crate v3.2.0 Compiling wasm-bindgen-backend v0.2.93 Compiling darling_core v0.20.10 Compiling serde_derive v1.0.210 Compiling syn_derive v0.1.8 Compiling strum_macros v0.26.4 Compiling wasm-bindgen-macro-support v0.2.93 Compiling borsh-derive v1.5.1 Compiling wasm-bindgen-macro v0.2.93 Compiling wasm-bindgen v0.2.93 Compiling darling_macro v0.20.10 Compiling borsh v1.5.1 Compiling darling v0.20.10 Compiling js-sys v0.3.70 Compiling serde v1.0.210 Compiling serde_json v1.0.128 Compiling near-gas v0.3.0 Compiling near-token v0.3.0 Compiling near-account-id v1.0.0 Compiling near-sdk-macros v5.5.0 Compiling getrandom v0.2.15 Compiling fable_library_rust v0.1.0 (C:\home\git\polyglot\lib\rust\fable\fable_modules\fable-library-rust) Compiling near-sdk v5.5.0 Compiling chat_contract v0.0.1 (C:\home\git\polyglot\apps\chat\contract) Finished `release` profile [optimized] target(s) in 44.31s Compiling libc v0.2.159 Compiling lock_api v0.4.12 Compiling slab v0.4.9 Compiling num-bigint v0.3.3 Compiling futures-util v0.3.30 Compiling curve25519-dalek v4.1.3 Compiling parking_lot v0.12.3 Compiling jobserver v0.1.32 Compiling getrandom v0.2.15 Compiling memoffset v0.7.1 Compiling tokio v1.40.0 Compiling prometheus v0.13.4 Compiling cc v1.1.22 Compiling portable-atomic v1.9.0 Compiling nix v0.26.4 Compiling num-traits v0.2.19 Compiling num-rational v0.3.2 Compiling openssl-src v300.3.2+3.3.2 Compiling ed25519-dalek v2.1.1 Compiling async-io v1.13.0 Compiling async-executor v1.13.1 Compiling zstd-sys v2.0.13+zstd.1.5.6 Compiling ring v0.17.8 Compiling bzip2-sys v0.1.11+1.0.8 Compiling openssl-sys v0.9.103 Compiling futures-executor v0.3.30 Compiling secp256k1-sys v0.8.1 Compiling axum-core v0.3.4 Compiling near-primitives-core v0.23.0 Compiling tokio-util v0.7.12 Compiling h2 v0.3.26 Compiling tokio-stream v0.1.16 Compiling tower v0.4.13 Compiling tokio-io-timeout v1.2.0 Compiling opentelemetry_sdk v0.22.1 Compiling secp256k1 v0.27.0 Compiling hyper v0.14.30 Compiling actix-rt v2.10.0 Compiling near-crypto v0.23.0 Compiling actix v0.13.5 Compiling tracing-opentelemetry v0.23.0 Compiling h2 v0.4.6 Compiling near-time v0.23.0 Compiling axum v0.6.20 Compiling hyper-timeout v0.4.1 Compiling futures v0.3.30 Compiling near-performance-metrics v0.23.0 Compiling hyper v1.4.1 Compiling near-fmt v0.23.0 Compiling near-parameters v0.23.0 Compiling zstd-safe v5.0.2+zstd.1.5.2 Compiling tonic v0.11.0 Compiling hyper-util v0.1.9 Compiling rustls-webpki v0.102.8 Compiling rustls v0.23.13 Compiling http-body-util v0.1.2 Compiling backtrace v0.3.71 Compiling bzip2 v0.4.4 Compiling zstd v0.11.2+zstd.1.5.2 Compiling filetime v0.2.25 Compiling dirs-sys-next v0.1.2 Compiling dirs-next v2.0.0 Compiling zip v0.6.6 Compiling zbus v3.15.2 Compiling opentelemetry-proto v0.5.0 Compiling ureq v2.10.1 Compiling zstd-safe v7.2.1 Compiling zstd v0.13.2 Compiling near-primitives v0.23.0 Compiling opentelemetry-otlp v0.15.0 Compiling tar v0.4.42 Compiling pbkdf2 v0.11.0 Compiling mio v1.0.2 Compiling fs2 v0.4.3 Compiling signal-hook-registry v1.4.2 Compiling binary-install v0.2.0 Compiling string_cache v0.8.7 Compiling chrono v0.4.38 Compiling secret-service v3.1.0 Compiling near-o11y v0.23.0 Compiling indicatif v0.17.8 Compiling crossterm v0.25.0 Compiling color-eyre v0.6.3 Compiling near-sandbox-utils v0.8.0 Compiling keyring v2.3.3 Compiling elementtree v0.7.0 Compiling inquire v0.7.5 Compiling tracing-indicatif v0.3.6 Compiling slipped10 v0.4.6 Compiling symbolic-debuginfo v8.8.0 Compiling near-workspaces v0.11.1 Compiling near-sandbox-utils v0.9.0 Compiling tokio-retry v0.3.0 Compiling near-sandbox-utils v0.11.0 Compiling near-async v0.23.0 Compiling near-chain-configs v0.23.0 Compiling near-jsonrpc-primitives v0.23.0 Compiling openssl v0.10.66 Compiling native-tls v0.2.12 Compiling crypto-hash v0.3.4 Compiling cargo-util v0.1.2 Compiling tokio-native-tls v0.3.1 Compiling hyper-tls v0.6.0 Compiling reqwest v0.12.7 Compiling near-jsonrpc-client v0.10.1 Compiling near-socialdb-client v0.3.2 Compiling near-cli-rs v0.11.1 Compiling cargo-near v0.6.4 Compiling chat_contract_tests v0.0.1 (/mnt/c/home/git/polyglot/apps/chat/contract/tests) Finished `release` profile [optimized] target(s) in 18m 02s Running `/mnt/c/home/git/polyglot/workspace/target/release/chat_contract_tests` new: ExecutionFinalResult { total_gas_burnt: NearGas { inner: 1832418804411, }, transaction: ExecutionOutcome { transaction_hash: BL1zDuisAMKY24uK6V4ffCxbNGGUbvHc64bcea4A1TTX, block_hash: 9kLe1p67oD4VVH7umpoD1HtiyYhziNTHu7uoXNt2kVxf, logs: [], receipt_ids: [ BXLk2srBdtiTHsHBJygdF4y7zRmo4hnpBJMWecf9fW4y, ], gas_burnt: NearGas { inner: 308066207802, }, tokens_burnt: NearToken { inner: 30806620780200000000, }, executor_id: AccountId( "dev-20240929072754-25400636132582", ), status: SuccessReceiptId(BXLk2srBdtiTHsHBJygdF4y7zRmo4hnpBJMWecf9fW4y), }, receipts: [ ExecutionOutcome { transaction_hash: BXLk2srBdtiTHsHBJygdF4y7zRmo4hnpBJMWecf9fW4y, block_hash: 9kLe1p67oD4VVH7umpoD1HtiyYhziNTHu7uoXNt2kVxf, logs: [], receipt_ids: [ 6LVqiEDXhiyXWFCYhFbA8MXL3YR1dxj7GTFmeZV4iNWU, ], gas_burnt: NearGas { inner: 1301170034109, }, tokens_burnt: NearToken { inner: 130117003410900000000, }, executor_id: AccountId( "dev-20240929072754-25400636132582", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: 6LVqiEDXhiyXWFCYhFbA8MXL3YR1dxj7GTFmeZV4iNWU, block_hash: DHvpGo6WSQoBfSyXGxL5hBz3jobUMD9wmawFw7D74snu, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240929072754-25400636132582", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.0012240557613465478 outcome (success: true): outcome_gas_burnt_usd: 0.000205788226811736 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.000869181582784812 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 claim_alias(contract, ''): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 1789628941144, }, transaction: ExecutionOutcome { transaction_hash: 8ueuQAJsLPBvknmc3LTQ7UHS1dqfRdfW9USUCoZvx4v, block_hash: 5gHFGTiJwXDHjt5mkqLgrzhTWBENom4Lqp3GBMLH2HUv, logs: [], receipt_ids: [ 33FGgCsEZ3xsTseA4r4k2BKVHxZk7AHdBLPmxEJ75PX5, ], gas_burnt: NearGas { inner: 308110926482, }, tokens_burnt: NearToken { inner: 30811092648200000000, }, executor_id: AccountId( "dev-20240929072754-25400636132582", ), status: SuccessReceiptId(33FGgCsEZ3xsTseA4r4k2BKVHxZk7AHdBLPmxEJ75PX5), }, receipts: [ ExecutionOutcome { transaction_hash: 33FGgCsEZ3xsTseA4r4k2BKVHxZk7AHdBLPmxEJ75PX5, block_hash: 5gHFGTiJwXDHjt5mkqLgrzhTWBENom4Lqp3GBMLH2HUv, logs: [], receipt_ids: [ HAXpCyedHthSdf72dCqsXSE9HJ2Xggc6GUexyHCqWWYm, ], gas_burnt: NearGas { inner: 1481518014662, }, tokens_burnt: NearToken { inner: 148151801466200000000, }, executor_id: AccountId( "dev-20240929072754-25400636132582", ), status: Failure(ActionError(ActionError { index: Some(0), kind: FunctionCallError(ExecutionError("Smart contract panicked: chat_contract.claim_alias / invalid alias")) })), }, ], status: Failure(ActionError(ActionError { index: Some(0), kind: FunctionCallError(ExecutionError("Smart contract panicked: chat_contract.claim_alias / invalid alias")) })), } total_gas_burnt_usd: 0.001195472132684192 outcome (success: true): outcome_gas_burnt_usd: 0.000205818098889976 outcome_tokens_burnt_usd: 0.0 outcome (success: false): outcome_gas_burnt_usd: 0.000989654033794216 outcome_tokens_burnt_usd: 0.0 dev_create_account(account1): Account { id: AccountId( "dev-20240929072756-29684843205199", ), } generate_cid_borsh(account1): ViewResultDetails { result: [59, 0, 0, 0, 98, 97, 102, 107, 114, 101, 105, 104, 100, 119, 100, 99, 101, 102, 103, 104, 52, 100, 113, 107, 106, 118, 54, 55, 117, 122, 99, 109, 119, 55, 111, 106, 101, 101, 54, 120, 101, 100, 122, 100, 101, 116, 111, 106, 117, 122, 106, 101, 118, 116, 101, 110, 120, 113, 117, 118, 121, 107, 117], logs: [] } claim_alias(account1, alias1): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 2809440038119, }, transaction: ExecutionOutcome { transaction_hash: C6Cnpidryy3ni45CLK1t5gkH3s1xRnvCcWhPAvrotgnS, block_hash: D6risASAyTbac4GNY7C2VQxxZvhu9WtkdnVTszbdBX12, logs: [], receipt_ids: [ DwLaHc8rhHgJDReKANBaifP73oKvjPEBNnA2N8hWmsXr, ], gas_burnt: NearGas { inner: 308124342086, }, tokens_burnt: NearToken { inner: 30812434208600000000, }, executor_id: AccountId( "dev-20240929072756-29684843205199", ), status: SuccessReceiptId(DwLaHc8rhHgJDReKANBaifP73oKvjPEBNnA2N8hWmsXr), }, receipts: [ ExecutionOutcome { transaction_hash: DwLaHc8rhHgJDReKANBaifP73oKvjPEBNnA2N8hWmsXr, block_hash: Cpd6Vz6up3iaWf2UNjem5SGFDK8Ev2ZFtqniZvrw1aj, logs: [ "07:27:57 \u{1b}[94m debug\u{1b}[39m #1 chat_contract.claim_alias / { alias = \"alias1\"; block_timestamp = 1727594877909984324; account_id = \"dev-20240929072756-29684843205199\" }\n07:27:57 \u{1b}[94m debug\u{1b}[39m #2 chat_contract.claim_alias / { account_alias = None }", ], receipt_ids: [ 4eMpyXWvLozKALSRBaTqaFquZYjdePX8psYDFn4ZCbwo, ], gas_burnt: NearGas { inner: 2278133133533, }, tokens_burnt: NearToken { inner: 227813313353300000000, }, executor_id: AccountId( "dev-20240929072754-25400636132582", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: 4eMpyXWvLozKALSRBaTqaFquZYjdePX8psYDFn4ZCbwo, block_hash: 3nxU9GZLaLHtjkFNWCPxjp1xH1QVJjz6BFcoz7V3GBFG, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240929072756-29684843205199", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.001876705945463492 outcome (success: true): outcome_gas_burnt_usd: 0.000205827060513448 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.001521792933200044 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 claim_alias(account1, alias1): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 2975283303517, }, transaction: ExecutionOutcome { transaction_hash: 7VJdyAV9gH5dUxufbYMauHMvzMTt4CHc6xL31C28XByr, block_hash: 4zE1W3ztbiD1ZbQPUh7sDzpgC6xV9gxVrGxPz4JmNhm1, logs: [], receipt_ids: [ GHD5UJYGxzdthmQFAmq7ZADxeeqYPxs993uQgL3RMPSZ, ], gas_burnt: NearGas { inner: 308124342086, }, tokens_burnt: NearToken { inner: 30812434208600000000, }, executor_id: AccountId( "dev-20240929072756-29684843205199", ), status: SuccessReceiptId(GHD5UJYGxzdthmQFAmq7ZADxeeqYPxs993uQgL3RMPSZ), }, receipts: [ ExecutionOutcome { transaction_hash: GHD5UJYGxzdthmQFAmq7ZADxeeqYPxs993uQgL3RMPSZ, block_hash: 6a7srjdSzJTYuL3P6TXfCrF6PQ9LJny59b181uCnQMiw, logs: [ "07:27:58 \u{1b}[94m debug\u{1b}[39m #1 chat_contract.claim_alias / { alias = \"alias1\"; block_timestamp = 1727594878945255648; account_id = \"dev-20240929072756-29684843205199\" }\n07:27:58 \u{1b}[94m debug\u{1b}[39m #2 chat_contract.claim_alias / { account_alias = Some(\"alias1\") }", ], receipt_ids: [ 4mF49qNpaYJ8iwq5PY8iKcxq2yk9fKNF6d7wyoRqrXS9, ], gas_burnt: NearGas { inner: 2443976398931, }, tokens_burnt: NearToken { inner: 244397639893100000000, }, executor_id: AccountId( "dev-20240929072754-25400636132582", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: 4mF49qNpaYJ8iwq5PY8iKcxq2yk9fKNF6d7wyoRqrXS9, block_hash: 3oJu9kC9787RvvEZugNSW3rfFMHpxEwqiTtG83n7omW7, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240929072756-29684843205199", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.001987489246749356 outcome (success: true): outcome_gas_burnt_usd: 0.000205827060513448 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.001632576234485908 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 get_account_info(account1): Some( ( "alias1", 1727594878945255648, 0, ), ) get_alias_map(account1, alias1): Some( { AccountId( "dev-20240929072756-29684843205199", ): ( 1727594878945255648, 0, ), }, ) dev_create_account(account2): Account { id: AccountId( "dev-20240929072759-27703108101354", ), } claim_alias(alias2): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 2915396386063, }, transaction: ExecutionOutcome { transaction_hash: GXfoux5W1FMBKDcWaurtQx1wSh39VuanmZeGzVQra6Xa, block_hash: 6fL2tK4Qcx9po7Msmiz1438545jqn3xRshS9Dyr3jpAZ, logs: [], receipt_ids: [ 5eq4QqXkKifwwhbQaExPHuqNiChqq7LSxDRCGNBD6ozv, ], gas_burnt: NearGas { inner: 308124342086, }, tokens_burnt: NearToken { inner: 30812434208600000000, }, executor_id: AccountId( "dev-20240929072759-27703108101354", ), status: SuccessReceiptId(5eq4QqXkKifwwhbQaExPHuqNiChqq7LSxDRCGNBD6ozv), }, receipts: [ ExecutionOutcome { transaction_hash: 5eq4QqXkKifwwhbQaExPHuqNiChqq7LSxDRCGNBD6ozv, block_hash: CEiC2attf6FgMixH5WWLbo2giECvtdFX8FtXcCiMXUgc, logs: [ "07:28:01 \u{1b}[94m debug\u{1b}[39m #1 chat_contract.claim_alias / { alias = \"alias2\"; block_timestamp = 1727594881001686196; account_id = \"dev-20240929072759-27703108101354\" }\n07:28:01 \u{1b}[94m debug\u{1b}[39m #2 chat_contract.claim_alias / { account_alias = None }", ], receipt_ids: [ 6c4w15p5tYUoiAJgje35Uz14hMR1apYUZ1555MtFNAv6, ], gas_burnt: NearGas { inner: 2384089481477, }, tokens_burnt: NearToken { inner: 238408948147700000000, }, executor_id: AccountId( "dev-20240929072754-25400636132582", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: 6c4w15p5tYUoiAJgje35Uz14hMR1apYUZ1555MtFNAv6, block_hash: BKnajRNiZN3hpk6WrcQEdRfhzwgGFK2Z4LQ6rW5Yd8Yz, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240929072759-27703108101354", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.0019474847858900839 outcome (success: true): outcome_gas_burnt_usd: 0.000205827060513448 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.001592571773626636 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 get_account_info(account2): Some( ( "alias2", 1727594881001686196, 0, ), ) get_alias_map_borsh(alias2): Some( { AccountId( "dev-20240929072759-27703108101354", ): ( 1727594881001686196, 0, ), }, ) claim_alias(account2, alias1): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 3239813231296, }, transaction: ExecutionOutcome { transaction_hash: AYiNh8bwDhqr2SYmMFBv2yPgFmnXYLyk55zuMJDXHzB9, block_hash: AMLBvUtwiRDh86QKcaS515AM8b2edTCNP8uYKeiPserB, logs: [], receipt_ids: [ xUQgPyEToWVwR3jecenpphkr4VkXe7Q3prLEpjrLkFX, ], gas_burnt: NearGas { inner: 308124342086, }, tokens_burnt: NearToken { inner: 30812434208600000000, }, executor_id: AccountId( "dev-20240929072759-27703108101354", ), status: SuccessReceiptId(xUQgPyEToWVwR3jecenpphkr4VkXe7Q3prLEpjrLkFX), }, receipts: [ ExecutionOutcome { transaction_hash: xUQgPyEToWVwR3jecenpphkr4VkXe7Q3prLEpjrLkFX, block_hash: HbitVn3aFoPVbQ3eHivpi7VUyadWe9oxP21wCwKcbUTx, logs: [ "07:28:02 \u{1b}[94m debug\u{1b}[39m #1 chat_contract.claim_alias / { alias = \"alias1\"; block_timestamp = 1727594882018242620; account_id = \"dev-20240929072759-27703108101354\" }\n07:28:02 \u{1b}[94m debug\u{1b}[39m #2 chat_contract.claim_alias / { account_alias = Some(\"alias2\") }", ], receipt_ids: [ HgkKs14bouMzN6q862maMWZ9scbefMzN3utodJgXFjjR, ], gas_burnt: NearGas { inner: 2708506326710, }, tokens_burnt: NearToken { inner: 270850632671000000000, }, executor_id: AccountId( "dev-20240929072754-25400636132582", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: HgkKs14bouMzN6q862maMWZ9scbefMzN3utodJgXFjjR, block_hash: 8GokCHKZ4AMb2sJBb5T9T6ybB5DXVbygUs91Ab18AWux, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240929072759-27703108101354", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.002164195238505728 outcome (success: true): outcome_gas_burnt_usd: 0.000205827060513448 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.0018092822262422798 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 get_account_info(account2): Some( ( "alias1", 1727594882018242620, 1, ), ) get_alias_map(account2, alias1): Some( { AccountId( "dev-20240929072756-29684843205199", ): ( 1727594878945255648, 0, ), AccountId( "dev-20240929072759-27703108101354", ): ( 1727594882018242620, 1, ), }, ) get_alias_map(account2, alias2): Some( {}, ) claim_alias(account1, alias2): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 3012387716104, }, transaction: ExecutionOutcome { transaction_hash: GWHdB4pTR1r1yGFa8syWJWpyagFcrrUHQGHrzdbzHeSp, block_hash: F4mWWXWxfrMgdYhGCycWhL3aMDeyEkHoZvgMZhWr94Dy, logs: [], receipt_ids: [ 4qWxb9PV8j5a44cHbkbv8xMfg9sFxPwqKrHwruVYPvjJ, ], gas_burnt: NearGas { inner: 308124342086, }, tokens_burnt: NearToken { inner: 30812434208600000000, }, executor_id: AccountId( "dev-20240929072756-29684843205199", ), status: SuccessReceiptId(4qWxb9PV8j5a44cHbkbv8xMfg9sFxPwqKrHwruVYPvjJ), }, receipts: [ ExecutionOutcome { transaction_hash: 4qWxb9PV8j5a44cHbkbv8xMfg9sFxPwqKrHwruVYPvjJ, block_hash: AyNbMw55U6BQxCrKHpNdWw8cEq5Ae73xoZe86cXZYRWb, logs: [ "07:28:03 \u{1b}[94m debug\u{1b}[39m #1 chat_contract.claim_alias / { alias = \"alias2\"; block_timestamp = 1727594883033423344; account_id = \"dev-20240929072756-29684843205199\" }\n07:28:03 \u{1b}[94m debug\u{1b}[39m #2 chat_contract.claim_alias / { account_alias = Some(\"alias1\") }", ], receipt_ids: [ 7px6inysDHgjDSSKrjnWJTUE3zbXyPxRdjM9L6XyKDXU, ], gas_burnt: NearGas { inner: 2704263374018, }, tokens_burnt: NearToken { inner: 270426337401800000000, }, executor_id: AccountId( "dev-20240929072754-25400636132582", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.002012274994357472 outcome (success: true): outcome_gas_burnt_usd: 0.000205827060513448 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.001806447933844024 outcome_tokens_burnt_usd: 0.0 get_account_info(account1): Some( ( "alias2", 1727594883033423344, 0, ), ) get_alias_map(account1, alias2): Some( { AccountId( "dev-20240929072756-29684843205199", ): ( 1727594883033423344, 0, ), }, ) get_alias_map(account1, alias1): Some( { AccountId( "dev-20240929072759-27703108101354", ): ( 1727594882018242620, 1, ), }, ) claim_alias(account1, alias1): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 3239829686416, }, transaction: ExecutionOutcome { transaction_hash: 4H3p2j9qUjTfLERWynycVV52qn9np5XozJKpGbT27ozd, block_hash: 8HntfccmdCwwECgH1iuxuvSdNeaRfVM7o3zkkW4GbxCA, logs: [], receipt_ids: [ J2Wy6pzn1CwPdcFwiZwagHFHuj4mM952jd7Ns3G7qXe, ], gas_burnt: NearGas { inner: 308124342086, }, tokens_burnt: NearToken { inner: 30812434208600000000, }, executor_id: AccountId( "dev-20240929072756-29684843205199", ), status: SuccessReceiptId(J2Wy6pzn1CwPdcFwiZwagHFHuj4mM952jd7Ns3G7qXe), }, receipts: [ ExecutionOutcome { transaction_hash: J2Wy6pzn1CwPdcFwiZwagHFHuj4mM952jd7Ns3G7qXe, block_hash: ESAkXk7JFbfLtw463G5FB5MBm4LM6t9Podm3B3mVJrBd, logs: [ "07:28:03 \u{1b}[94m debug\u{1b}[39m #1 chat_contract.claim_alias / { alias = \"alias1\"; block_timestamp = 1727594883641547058; account_id = \"dev-20240929072756-29684843205199\" }\n07:28:03 \u{1b}[94m debug\u{1b}[39m #2 chat_contract.claim_alias / { account_alias = Some(\"alias2\") }", ], receipt_ids: [ D5uX3KjEKZoMci7dVNm94cs1zMMFWzJAc58HvHJhhX5s, ], gas_burnt: NearGas { inner: 2708522781830, }, tokens_burnt: NearToken { inner: 270852278183000000000, }, executor_id: AccountId( "dev-20240929072754-25400636132582", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: D5uX3KjEKZoMci7dVNm94cs1zMMFWzJAc58HvHJhhX5s, block_hash: 87Hk8eFSVuVTPRw5QyA29CWBkBDZnkLzm3MvUNqYfA4h, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240929072756-29684843205199", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.002164206230525888 outcome (success: true): outcome_gas_burnt_usd: 0.000205827060513448 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.0018092932182624398 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 get_account_info(account1): Some( ( "alias1", 1727594883641547058, 1, ), ) get_alias_map(account1, alias1): Some( { AccountId( "dev-20240929072759-27703108101354", ): ( 1727594882018242620, 0, ), AccountId( "dev-20240929072756-29684843205199", ): ( 1727594883641547058, 1, ), }, ) get_alias_map(account1, alias2): Some( {}, )
In [ ]:
{ pwsh ../apps/spiral/temp/extension/build.ps1 } | Invoke-Block
bun install v1.1.7 (b0b7db5c) Checked 11 installs across 13 packages (no changes) [31.00ms] [INFO]: 🎯 Checking for the Wasm target... [INFO]: 🌀 Compiling to Wasm... Compiling autocfg v1.4.0 Compiling syn v2.0.79 Compiling winnow v0.6.20 Compiling slab v0.4.9 Compiling lock_api v0.4.12 Compiling num-traits v0.2.19 Compiling dashmap v5.5.3 Compiling parking_lot v0.12.3 Compiling wasm-bindgen-backend v0.2.93 Compiling server_fn_macro v0.6.15 Compiling proc-macro2-diagnostics v0.10.1 Compiling manyhow v0.10.4 Compiling prettyplease v0.2.22 Compiling wasm-bindgen-macro-support v0.2.93 Compiling serde_derive v1.0.210 Compiling wasm-bindgen-macro v0.2.93 Compiling thiserror-impl v1.0.64 Compiling futures-macro v0.3.30 Compiling pin-project-internal v1.1.5 Compiling tracing-attributes v0.1.27 Compiling quote-use-macros v0.8.4 Compiling syn_derive v0.1.8 Compiling wasm-bindgen v0.2.93 Compiling quote-use v0.8.4 Compiling server_fn_macro_default v0.6.15 Compiling attribute-derive-macro v0.9.2 Compiling js-sys v0.3.70 Compiling futures-util v0.3.30 Compiling derive-where v1.2.7 Compiling pin-project v1.1.5 Compiling typed-builder-macro v0.18.2 Compiling thiserror v1.0.64 Compiling rstml v0.11.2 Compiling tracing v0.1.40 Compiling async-recursion v1.1.1 Compiling console_error_panic_hook v0.1.7 Compiling futures-executor v0.3.30 Compiling futures v0.3.30 Compiling attribute-derive v0.9.2 Compiling serde v1.0.210 Compiling typed-builder v0.18.2 Compiling web-sys v0.3.70 Compiling wasm-bindgen-futures v0.4.43 Compiling getrandom v0.2.15 Compiling serde_json v1.0.128 Compiling toml_datetime v0.6.8 Compiling serde_spanned v0.6.8 Compiling slotmap v1.0.7 Compiling ciborium v0.2.2 Compiling serde_qs v0.12.0 Compiling toml_edit v0.22.22 Compiling serde-wasm-bindgen v0.6.5 Compiling oco_ref v0.1.1 Compiling leptos_hot_reload v0.6.15 Compiling serde_test v1.0.177 Compiling serde_qs v0.13.0 Compiling serde_urlencoded v0.7.1 Compiling linear-map v1.2.0 Compiling leptos_macro v0.6.15 Compiling toml v0.8.19 Compiling config v0.14.0 Compiling leptos_config v0.6.15 Compiling gloo-utils v0.2.0 Compiling leptos_reactive v0.6.15 Compiling idb v0.6.3 Compiling reqwest-wasm v0.11.16 Compiling console_log v1.0.0 Compiling gloo-net v0.6.0 Compiling wasm-streams v0.4.1 Compiling rexie v0.6.2 Compiling server_fn v0.6.15 Compiling leptos_dom v0.6.15 Compiling leptos_server v0.6.15 Compiling leptos v0.6.15 Compiling leptos_meta v0.6.15 Compiling leptos_router v0.6.15 Compiling spiral_temp_extension v0.0.1 (C:\home\git\polyglot\apps\spiral\temp\extension) warning: enum `AlbumData` is never used --> C:\home\git\polyglot\apps\spiral\temp\extension\src\timer.rs:52:6 | 52 | enum AlbumData { | ^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default warning: `spiral_temp_extension` (lib) generated 1 warning Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 53s [INFO]: ⬇️ Installing wasm-bindgen... [INFO]: Optional field missing from Cargo.toml: 'description'. This is not necessary, but recommended [INFO]: origin crate has no LICENSE [INFO]: ✨ Done in 1m 54s [INFO]: 📦 Your wasm pkg is ready to publish at C:\home\git\polyglot\apps\spiral\temp\extension\pkg. ▲ [WARNING] "import.meta" is not available with the "iife" output format and will be empty [empty-import-meta] pkg/spiral_temp_extension.js:1517:66: 1517 │ ...ath = new URL('spiral_temp_extension_bg.wasm', import.meta.url); ╵ ~~~~~~~~~~~ You need to set the output format to "esm" for "import.meta" to work correctly. 1 warning dist\spiral_temp_extension_bg-2S257W2I.wasm 4.6mb ⚠️ dist\devtools.js 29.0kb dist\content_script.js 28.3kb dist\service_worker.js 2.2kb ⚡ Done in 78ms $ playwright test [WebServer] Saved lockfile Running 3 tests using 3 workers [1/3] [Desktop Chrome] › extension.spec.ts:3:5 › popup localhost [2/3] [Desktop Chrome] › extension.spec.ts:13:5 › libgen [3/3] [Desktop Chrome] › extension.spec.ts:8:5 › popup extension 3 passed (20.7s) To open last HTML report run: npx playwright show-report
In [ ]:
{ pwsh ../apps/spiral/temp/test/build.ps1 } | Invoke-Block
00:00:00 verbose #1 async.run_with_timeout_async / { timeout = 180 } 00:00:01 debug #1 runtime.execute_with_options_async / { options = { command = ../../../../workspace/target/release/spiral_builder.exe dib --path build.dib; cancellation_token = Some System.Threading.CancellationToken; environment_variables = [||]; on_line = None; stdin = None; trace = true; working_directory = None } } 00:00:01 verbose #2 > 00:00:00 debug #1 spiral_builder.main / { args = Array(MutCell(["dib", "--path", "build.dib"])) } 00:00:01 verbose #3 > 00:00:00 debug #2 runtime.execute_with_options / { file_name = dotnet; arguments = [ 00:00:01 verbose #4 > "repl", 00:00:01 verbose #5 > "--exit-after-run", 00:00:01 verbose #6 > "--run", 00:00:01 verbose #7 > "c:/home/git/polyglot/apps/spiral/temp/test/build.dib", 00:00:01 verbose #8 > "--output-path", 00:00:01 verbose #9 > "c:/home/git/polyglot/apps/spiral/temp/test/build.dib.ipynb", 00:00:01 verbose #10 > ]; options = { command = dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/spiral/temp/test/build.dib" --output-path "c:/home/git/polyglot/apps/spiral/temp/test/build.dib.ipynb"; cancellation_token = None; environment_variables = Array(MutCell([("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin = None; trace = false; working_directory = None } } 00:00:03 verbose #11 > > 00:00:03 verbose #12 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:03 verbose #13 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:03 verbose #14 > > │ # test │ 00:00:03 verbose #15 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:03 verbose #16 > > 00:00:03 verbose #17 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:03 verbose #18 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:03 verbose #19 > > │ ## include scripts │ 00:00:03 verbose #20 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:03 verbose #21 > > 00:00:03 verbose #22 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:03 verbose #23 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:03 verbose #24 > > │ ### include notebook core │ 00:00:03 verbose #25 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:03 verbose #26 > > 00:00:03 verbose #27 > > ── pwsh ──────────────────────────────────────────────────────────────────────── 00:00:03 verbose #28 > > . ../../../../scripts/nbs_header.ps1 00:00:04 verbose #29 > > 00:00:04 verbose #30 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:04 verbose #31 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:04 verbose #32 > > │ ### Include core functions script │ 00:00:04 verbose #33 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:04 verbose #34 > > 00:00:04 verbose #35 > > ── pwsh ──────────────────────────────────────────────────────────────────────── 00:00:04 verbose #36 > > . ../../../../scripts/core.ps1 00:00:04 verbose #37 > > 00:00:04 verbose #38 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:04 verbose #39 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:04 verbose #40 > > │ ### Include spiral library │ 00:00:04 verbose #41 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:04 verbose #42 > > 00:00:04 verbose #43 > > ── pwsh ──────────────────────────────────────────────────────────────────────── 00:00:04 verbose #44 > > . ../../../../lib/spiral/lib.ps1 00:00:04 verbose #45 > > 00:00:04 verbose #46 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:04 verbose #47 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:04 verbose #48 > > │ ## execute project commands │ 00:00:04 verbose #49 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:04 verbose #50 > > 00:00:04 verbose #51 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:04 verbose #52 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:04 verbose #53 > > │ ### run notebook with retries using spiral supervisor │ 00:00:04 verbose #54 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:04 verbose #55 > > 00:00:04 verbose #56 > > ── pwsh ──────────────────────────────────────────────────────────────────────── 00:00:04 verbose #57 > > { . ../../../../apps/spiral/dist/Supervisor$(_exe) --execute-command 00:00:04 verbose #58 > > "../../../../workspace/target/release/spiral_builder$(_exe) dib --path test.dib 00:00:04 verbose #59 > > --retries 3" } | Invoke-Block 00:00:24 verbose #60 > > 00:00:24 verbose #61 > > ╭─[ 19.85s - stdout ]──────────────────────────────────────────────────────────╮ 00:00:24 verbose #62 > > │ 00:00:00 verbose #1 async.run_with_timeout_async / { timeout = 180 } │ 00:00:24 verbose #63 > > │ 00:00:01 debug #1 runtime.execute_with_options_async / { options = { │ 00:00:24 verbose #64 > > │ command = ../../../../workspace/target/release/spiral_builder.exe dib --path │ 00:00:24 verbose #65 > > │ test.dib --retries 3; cancellation_token = Some │ 00:00:24 verbose #66 > > │ System.Threading.CancellationToken; environment_variables = [||]; on_line = │ 00:00:24 verbose #67 > > │ None; stdin = None; trace = true; working_directory = None } } │ 00:00:24 verbose #68 > > │ 00:00:01 verbose #2 > 00:00:00 debug #1 spiral_builder.main / { │ 00:00:24 verbose #69 > > │ args = Array(MutCell(["dib", "--path", "test.dib", "--retries", "3"])) } │ 00:00:24 verbose #70 > > │ 00:00:01 verbose #3 > 00:00:00 debug #2 │ 00:00:24 verbose #71 > > │ runtime.execute_with_options / { file_name = dotnet; arguments = [ │ 00:00:24 verbose #72 > > │ 00:00:01 verbose #4 > "repl", │ 00:00:24 verbose #73 > > │ 00:00:01 verbose #5 > "--exit-after-run", │ 00:00:24 verbose #74 > > │ 00:00:01 verbose #6 > "--run", │ 00:00:24 verbose #75 > > │ 00:00:01 verbose #7 > │ 00:00:24 verbose #76 > > │ "c:/home/git/polyglot/apps/spiral/temp/test/test.dib", │ 00:00:24 verbose #77 > > │ 00:00:01 verbose #8 > "--output-path", │ 00:00:24 verbose #78 > > │ 00:00:01 verbose #9 > │ 00:00:24 verbose #79 > > │ "c:/home/git/polyglot/apps/spiral/temp/test/test.dib.ipynb", │ 00:00:24 verbose #80 > > │ 00:00:01 verbose #10 > ]; options = { command = dotnet repl │ 00:00:24 verbose #81 > > │ --exit-after-run --run "c:/home/git/polyglot/apps/spiral/temp/test/test.dib" │ 00:00:24 verbose #82 > > │ --output-path "c:/home/git/polyglot/apps/spiral/temp/test/test.dib.ipynb"; │ 00:00:24 verbose #83 > > │ cancellation_token = None; environment_variables = Array(MutCell([ │ 00:00:24 verbose #84 > > │ ("TRACE_LEVEL", "Verbose"), ("AUTOMATION", "True")])); on_line = None; stdin │ 00:00:24 verbose #85 > > │ = None; trace = false; working_directory = None } } │ 00:00:24 verbose #86 > > │ 00:00:03 verbose #11 > > │ 00:00:24 verbose #87 > > │ 00:00:03 verbose #12 > > ── markdown │ 00:00:24 verbose #88 > > │ ──────────────────────────────────────────────────────────────────── │ 00:00:24 verbose #89 > > │ 00:00:03 verbose #13 > > │ 00:00:24 verbose #90 > > │ ╭─────────────────────────────────────────────────────────────────────────── │ 00:00:24 verbose #91 > > │ ───╮ │ 00:00:24 verbose #92 > > │ 00:00:03 verbose #14 > > │ # test (Polyglot) │ 00:00:24 verbose #93 > > │ │ │ 00:00:24 verbose #94 > > │ 00:00:03 verbose #15 > > │ 00:00:24 verbose #95 > > │ ╰─────────────────────────────────────────────────────────────────────────── │ 00:00:24 verbose #96 > > │ ───╯ │ 00:00:24 verbose #97 > > │ 00:00:07 verbose #16 > > │ 00:00:24 verbose #98 > > │ 00:00:07 verbose #17 > > ── spiral │ 00:00:24 verbose #99 > > │ ────────────────────────────────────────────────────────────────────── │ 00:00:24 verbose #100 > > │ 00:00:07 verbose #18 > > //// test │ 00:00:24 verbose #101 > > │ 00:00:07 verbose #19 > > │ 00:00:24 verbose #102 > > │ 00:00:07 verbose #20 > > open testing │ 00:00:24 verbose #103 > > │ 00:00:09 verbose #21 > > │ 00:00:24 verbose #104 > > │ 00:00:09 verbose #22 > > ── spiral │ 00:00:24 verbose #105 > > │ ────────────────────────────────────────────────────────────────────── │ 00:00:24 verbose #106 > > │ 00:00:09 verbose #23 > > nominal i = () │ 00:00:24 verbose #107 > > │ 00:00:09 verbose #24 > > nominal e = () │ 00:00:24 verbose #108 > > │ 00:00:09 verbose #25 > > nominal s = () │ 00:00:24 verbose #109 > > │ 00:00:09 verbose #26 > > nominal n = () │ 00:00:24 verbose #110 > > │ 00:00:09 verbose #27 > > nominal t = () │ 00:00:24 verbose #111 > > │ 00:00:09 verbose #28 > > nominal f = () │ 00:00:24 verbose #112 > > │ 00:00:09 verbose #29 > > nominal j = () │ 00:00:24 verbose #113 > > │ 00:00:09 verbose #30 > > nominal p = () │ 00:00:24 verbose #114 > > │ 00:00:09 verbose #31 > > │ 00:00:24 verbose #115 > > │ 00:00:09 verbose #32 > > union sensing = │ 00:00:24 verbose #116 > > │ 00:00:09 verbose #33 > > | Si : s * i │ 00:00:24 verbose #117 > > │ 00:00:09 verbose #34 > > | Se : s * e │ 00:00:24 verbose #118 > > │ 00:00:09 verbose #35 > > │ 00:00:24 verbose #119 > > │ 00:00:09 verbose #36 > > union intuition = │ 00:00:24 verbose #120 > > │ 00:00:09 verbose #37 > > | Ni : n * i │ 00:00:24 verbose #121 > > │ 00:00:09 verbose #38 > > | Ne : n * e │ 00:00:24 verbose #122 > > │ 00:00:09 verbose #39 > > │ 00:00:24 verbose #123 > > │ 00:00:09 verbose #40 > > union thinking = │ 00:00:24 verbose #124 > > │ 00:00:09 verbose #41 > > | Ti : t * i │ 00:00:24 verbose #125 > > │ 00:00:09 verbose #42 > > | Te : t * e │ 00:00:24 verbose #126 > > │ 00:00:09 verbose #43 > > │ 00:00:24 verbose #127 > > │ 00:00:09 verbose #44 > > union feeling = │ 00:00:24 verbose #128 > > │ 00:00:09 verbose #45 > > | Fi : f * i │ 00:00:24 verbose #129 > > │ 00:00:09 verbose #46 > > | Fe : f * e │ 00:00:24 verbose #130 > > │ 00:00:09 verbose #47 > > │ 00:00:24 verbose #131 > > │ 00:00:09 verbose #48 > > union function_stack = │ 00:00:24 verbose #132 > > │ 00:00:09 verbose #49 > > | FS : sensing * intuition * thinking * │ 00:00:24 verbose #133 > > │ feeling │ 00:00:24 verbose #134 > > │ 00:00:09 verbose #50 > > │ 00:00:24 verbose #135 > > │ 00:00:09 verbose #51 > > union personality_type = │ 00:00:24 verbose #136 > > │ 00:00:09 verbose #52 > > | ISTJ : i * s * t * j * function_stack │ 00:00:24 verbose #137 > > │ 00:00:09 verbose #53 > > | ISFJ : i * s * f * j * function_stack │ 00:00:24 verbose #138 > > │ 00:00:09 verbose #54 > > | INFJ : i * n * f * j * function_stack │ 00:00:24 verbose #139 > > │ 00:00:09 verbose #55 > > | INTJ : i * n * t * j * function_stack │ 00:00:24 verbose #140 > > │ 00:00:09 verbose #56 > > | ISTP : i * s * t * p * function_stack │ 00:00:24 verbose #141 > > │ 00:00:09 verbose #57 > > | ISFP : i * s * f * p * function_stack │ 00:00:24 verbose #142 > > │ 00:00:09 verbose #58 > > | INFP : i * n * f * p * function_stack │ 00:00:24 verbose #143 > > │ 00:00:09 verbose #59 > > | INTP : i * n * t * p * function_stack │ 00:00:24 verbose #144 > > │ 00:00:09 verbose #60 > > | ESTP : e * s * t * p * function_stack │ 00:00:24 verbose #145 > > │ 00:00:09 verbose #61 > > | ESFP : e * s * f * p * function_stack │ 00:00:24 verbose #146 > > │ 00:00:09 verbose #62 > > | ENFP : e * n * f * p * function_stack │ 00:00:24 verbose #147 > > │ 00:00:09 verbose #63 > > | ENTP : e * n * t * p * function_stack │ 00:00:24 verbose #148 > > │ 00:00:09 verbose #64 > > | ESTJ : e * s * t * j * function_stack │ 00:00:24 verbose #149 > > │ 00:00:09 verbose #65 > > | ESFJ : e * s * f * j * function_stack │ 00:00:24 verbose #150 > > │ 00:00:09 verbose #66 > > | ENFJ : e * n * f * j * function_stack │ 00:00:24 verbose #151 > > │ 00:00:09 verbose #67 > > | ENTJ : e * n * t * j * function_stack │ 00:00:24 verbose #152 > > │ 00:00:09 verbose #68 > > │ 00:00:24 verbose #153 > > │ 00:00:09 verbose #69 > > │ 00:00:24 verbose #154 > > │ 00:00:09 verbose #70 > > inl main () = │ 00:00:24 verbose #155 > > │ 00:00:09 verbose #71 > > inl istj_stack = FS ((Si (s, i)), Ne (n, │ 00:00:24 verbose #156 > > │ e), (Te (t, e)), (Fi (f, i))) │ 00:00:24 verbose #157 > > │ 00:00:09 verbose #72 > > inl istj_personality = ISTJ (i, s, t, j, │ 00:00:24 verbose #158 > > │ istj_stack) │ 00:00:24 verbose #159 > > │ 00:00:09 verbose #73 > > // inl isfj_stack = FS ((Si (s, i)), Ne │ 00:00:24 verbose #160 > > │ (n, e), (Fe (f, e)), (Ti (t, i))) │ 00:00:24 verbose #161 > > │ 00:00:09 verbose #74 > > // inl isfj_personality = ISFJ (i, s, f, │ 00:00:24 verbose #162 > > │ j, isfj_stack) │ 00:00:24 verbose #163 > > │ 00:00:09 verbose #75 > > │ 00:00:24 verbose #164 > > │ 00:00:09 verbose #76 > > ;[[ │ 00:00:24 verbose #165 > > │ 00:00:09 verbose #77 > > istj_personality │ 00:00:24 verbose #166 > > │ 00:00:09 verbose #78 > > ]] │ 00:00:24 verbose #167 > > │ 00:00:09 verbose #79 > > |> fun x => $'$"%A{!x}"' : string │ 00:00:24 verbose #168 > > │ 00:00:09 verbose #80 > > |> console.write_line │ 00:00:24 verbose #169 > > │ 00:00:09 verbose #81 > > │ 00:00:24 verbose #170 > > │ 00:00:09 verbose #82 > > inl main () = │ 00:00:24 verbose #171 > > │ 00:00:09 verbose #83 > > $'!main ()' : () │ 00:00:24 verbose #172 > > │ 00:00:11 verbose #84 > > │ 00:00:24 verbose #173 > > │ 00:00:11 verbose #85 > > ╭─[ 1.88s - stdout │ 00:00:24 verbose #174 > > │ ]───────────────────────────────────────────────────────────╮ │ 00:00:24 verbose #175 > > │ 00:00:11 verbose #86 > > │ [|US5_0 (US4_0 (US0_0, US1_1, US2_1, │ 00:00:24 verbose #176 > > │ US3_0))|] │ │ 00:00:24 verbose #177 > > │ 00:00:11 verbose #87 > > │ │ 00:00:24 verbose #178 > > │ │ 00:00:24 verbose #179 > > │ │ │ 00:00:24 verbose #180 > > │ 00:00:11 verbose #88 > > │ 00:00:24 verbose #181 > > │ ╰─────────────────────────────────────────────────────────────────────────── │ 00:00:24 verbose #182 > > │ ───╯ │ 00:00:24 verbose #183 > > │ 00:00:12 verbose #89 > > │ 00:00:24 verbose #184 > > │ 00:00:12 verbose #90 > > ── fsharp │ 00:00:24 verbose #185 > > │ ────────────────────────────────────────────────────────────────────── │ 00:00:24 verbose #186 > > │ 00:00:12 verbose #91 > > type PhonologicalFeature = │ 00:00:24 verbose #187 > > │ 00:00:12 verbose #92 > > | VowelFeature of │ 00:00:24 verbose #188 > > │ 00:00:12 verbose #93 > > height: Height │ 00:00:24 verbose #189 > > │ 00:00:12 verbose #94 > > * backness: Backness │ 00:00:24 verbose #190 > > │ 00:00:12 verbose #95 > > * roundedness: Roundedness │ 00:00:24 verbose #191 > > │ 00:00:12 verbose #96 > > * tone: Option<Tone> │ 00:00:24 verbose #192 > > │ 00:00:12 verbose #97 > > * stress: Option<Stress> │ 00:00:24 verbose #193 > > │ 00:00:12 verbose #98 > > * length: Option<Length> │ 00:00:24 verbose #194 > > │ 00:00:12 verbose #99 > > | ConsonantFeature of │ 00:00:24 verbose #195 > > │ 00:00:12 verbose #100 > > place: PlaceOfArticulation │ 00:00:24 verbose #196 > > │ 00:00:12 verbose #101 > > * manner: MannerOfArticulation │ 00:00:24 verbose #197 > > │ 00:00:12 verbose #102 > > * voicing: Voicing │ 00:00:24 verbose #198 > > │ 00:00:12 verbose #103 > > * length: Option<Length> │ 00:00:24 verbose #199 > > │ 00:00:12 verbose #104 > > | VowelHarmonyFeature │ 00:00:24 verbose #200 > > │ 00:00:12 verbose #105 > > | PitchAccentFeature │ 00:00:24 verbose #201 > > │ 00:00:12 verbose #106 > > │ 00:00:24 verbose #202 > > │ 00:00:12 verbose #107 > > and Stress = Primary | Secondary │ 00:00:24 verbose #203 > > │ 00:00:12 verbose #108 > > and Length = Long | Short | HalfLong │ 00:00:24 verbose #204 > > │ 00:00:12 verbose #109 > > │ 00:00:24 verbose #205 > > │ 00:00:12 verbose #110 > > and Height = │ 00:00:24 verbose #206 > > │ 00:00:12 verbose #111 > > | High | NearHigh | HighMid │ 00:00:24 verbose #207 > > │ 00:00:12 verbose #112 > > | Mid | LowMid | NearLow │ 00:00:24 verbose #208 > > │ 00:00:12 verbose #113 > > | Low │ 00:00:24 verbose #209 > > │ 00:00:12 verbose #114 > > │ 00:00:24 verbose #210 > > │ 00:00:12 verbose #115 > > and Backness = Front | Central | Back │ 00:00:24 verbose #211 > > │ 00:00:12 verbose #116 > > │ 00:00:24 verbose #212 > > │ 00:00:12 verbose #117 > > and Roundedness = Rounded | Unrounded │ 00:00:24 verbose #213 > > │ 00:00:12 verbose #118 > > │ 00:00:24 verbose #214 > > │ 00:00:12 verbose #119 > > and PlaceOfArticulation = │ 00:00:24 verbose #215 > > │ 00:00:12 verbose #120 > > | Bilabial | Labiodental | Dental │ 00:00:24 verbose #216 > > │ 00:00:12 verbose #121 > > | Alveolar | Postalveolar | Retroflex │ 00:00:24 verbose #217 > > │ 00:00:12 verbose #122 > > | Palatal | Velar | Uvular │ 00:00:24 verbose #218 > > │ 00:00:12 verbose #123 > > | Pharyngeal | Epiglottal | Glottal │ 00:00:24 verbose #219 > > │ 00:00:12 verbose #124 > > │ 00:00:24 verbose #220 > > │ 00:00:12 verbose #125 > > and MannerOfArticulation = │ 00:00:24 verbose #221 > > │ 00:00:12 verbose #126 > > | Plosive | Nasal | Trill │ 00:00:24 verbose #222 > > │ 00:00:12 verbose #127 > > | TapOrFlap | Fricative | │ 00:00:24 verbose #223 > > │ LateralFricative │ 00:00:24 verbose #224 > > │ 00:00:12 verbose #128 > > | Approximant | LateralApproximant │ 00:00:24 verbose #225 > > │ 00:00:12 verbose #129 > > │ 00:00:24 verbose #226 > > │ 00:00:12 verbose #130 > > and Voicing = Voiced | Voiceless │ 00:00:24 verbose #227 > > │ 00:00:12 verbose #131 > > │ 00:00:24 verbose #228 > > │ 00:00:12 verbose #132 > > and SecondaryArticulation = │ 00:00:24 verbose #229 > > │ 00:00:12 verbose #133 > > | Labialization | Palatalization | │ 00:00:24 verbose #230 > > │ Velarization │ 00:00:24 verbose #231 > > │ 00:00:12 verbose #134 > > | Pharyngealization | Aspiration │ 00:00:24 verbose #232 > > │ 00:00:12 verbose #135 > > │ 00:00:24 verbose #233 > > │ 00:00:12 verbose #136 > > and Tone = │ 00:00:24 verbose #234 > > │ 00:00:12 verbose #137 > > | LevelTone of int │ 00:00:24 verbose #235 > > │ 00:00:12 verbose #138 > > | ContourTone of int list │ 00:00:24 verbose #236 > > │ 00:00:12 verbose #139 > > │ 00:00:24 verbose #237 > > │ 00:00:12 verbose #140 > > and MorphologicalFeature = │ 00:00:24 verbose #238 > > │ 00:00:12 verbose #141 > > | RootFeature of string │ 00:00:24 verbose #239 > > │ 00:00:12 verbose #142 > > | AffixFeature of AffixType * string │ 00:00:24 verbose #240 > > │ 00:00:12 verbose #143 > > | IncorporationFeature of string * │ 00:00:24 verbose #241 > > │ MorphologicalFeature │ 00:00:24 verbose #242 > > │ 00:00:12 verbose #144 > > | NonConcatenativePattern of string * │ 00:00:24 verbose #243 > > │ string │ 00:00:24 verbose #244 > > │ 00:00:12 verbose #145 > > | AgglutinativeAffixFeature of │ 00:00:24 verbose #245 > > │ AgglutinativeAffixType * string │ 00:00:24 verbose #246 > > │ 00:00:12 verbose #146 > > | HonorificFeature of HonorificType * │ 00:00:24 verbose #247 > > │ string │ 00:00:24 verbose #248 > > │ 00:00:12 verbose #147 > > │ 00:00:24 verbose #249 > > │ 00:00:12 verbose #148 > > and AgglutinativeAffixType = Suffix | Prefix │ 00:00:24 verbose #250 > > │ 00:00:12 verbose #149 > > │ 00:00:24 verbose #251 > > │ 00:00:12 verbose #150 > > and HonorificType = VerbHonorific | │ 00:00:24 verbose #252 > > │ NounHonorific │ 00:00:24 verbose #253 > > │ 00:00:12 verbose #151 > > │ 00:00:24 verbose #254 > > │ 00:00:12 verbose #152 > > and AffixType = │ 00:00:24 verbose #255 > > │ 00:00:12 verbose #153 > > | Prefix | Suffix | Infix │ 00:00:24 verbose #256 > > │ 00:00:12 verbose #154 > > | Circumfix │ 00:00:24 verbose #257 > > │ 00:00:12 verbose #155 > > │ 00:00:24 verbose #258 > > │ 00:00:12 verbose #156 > > type SyntacticFeature = │ 00:00:24 verbose #259 > > │ 00:00:12 verbose #157 > > | WordFeature of MorphologicalFeature │ 00:00:24 verbose #260 > > │ list * LexicalCategory │ 00:00:24 verbose #261 > > │ 00:00:12 verbose #158 > > | PhraseFeature of PhraseType * │ 00:00:24 verbose #262 > > │ SyntacticFeature list │ 00:00:24 verbose #263 > > │ 00:00:12 verbose #159 > > | GrammaticalRelation of │ 00:00:24 verbose #264 > > │ GrammaticalRelationType * SyntacticFeature list │ 00:00:24 verbose #265 > > │ 00:00:12 verbose #160 > > | SOVOrderFeature │ 00:00:24 verbose #266 > > │ 00:00:12 verbose #161 > > | TopicCommentFeature │ 00:00:24 verbose #267 > > │ 00:00:12 verbose #162 > > │ 00:00:24 verbose #268 > > │ 00:00:12 verbose #163 > > and GrammaticalRelationType = │ 00:00:24 verbose #269 > > │ 00:00:12 verbose #164 > > | Ergative | Absolutive | Nominative │ 00:00:24 verbose #270 > > │ 00:00:12 verbose #165 > > | Accusative │ 00:00:24 verbose #271 > > │ 00:00:12 verbose #166 > > │ 00:00:24 verbose #272 > > │ 00:00:12 verbose #167 > > and LexicalCategory = │ 00:00:24 verbose #273 > > │ 00:00:12 verbose #168 > > | Noun | Verb | Adjective │ 00:00:24 verbose #274 > > │ 00:00:12 verbose #169 > > | Adverb | Pronoun | Preposition │ 00:00:24 verbose #275 > > │ 00:00:12 verbose #170 > > | Conjunction | Determiner | Interjection │ 00:00:24 verbose #276 > > │ 00:00:12 verbose #171 > > │ 00:00:24 verbose #277 > > │ 00:00:12 verbose #172 > > and PhraseType = │ 00:00:24 verbose #278 > > │ 00:00:12 verbose #173 > > | NP | VP | AP │ 00:00:24 verbose #279 > > │ 00:00:12 verbose #174 > > | PP | CP │ 00:00:24 verbose #280 > > │ 00:00:12 verbose #175 > > │ 00:00:24 verbose #281 > > │ 00:00:12 verbose #176 > > and SemanticFeature = │ 00:00:24 verbose #282 > > │ 00:00:12 verbose #177 > > | Meaning of string │ 00:00:24 verbose #283 > > │ 00:00:12 verbose #178 > > | SemanticRole of SemanticRoleType * │ 00:00:24 verbose #284 > > │ SemanticFeature │ 00:00:24 verbose #285 > > │ 00:00:12 verbose #179 > > │ 00:00:24 verbose #286 > > │ 00:00:12 verbose #180 > > and SemanticRoleType = │ 00:00:24 verbose #287 > > │ 00:00:12 verbose #181 > > | Agent | Patient | Instrument │ 00:00:24 verbose #288 > > │ 00:00:12 verbose #182 > > | Location | Time | Cause │ 00:00:24 verbose #289 > > │ 00:00:12 verbose #183 > > │ 00:00:24 verbose #290 > > │ 00:00:12 verbose #184 > > and PragmaticFeature = │ 00:00:24 verbose #291 > > │ 00:00:12 verbose #185 > > | UseContext of string │ 00:00:24 verbose #292 > > │ 00:00:12 verbose #186 > > | PolitenessLevel of Politeness │ 00:00:24 verbose #293 > > │ 00:00:12 verbose #187 > > | SpeechAct of SpeechActType │ 00:00:24 verbose #294 > > │ 00:00:12 verbose #188 > > | SpeechLevel of SpeechLevelType │ 00:00:24 verbose #295 > > │ 00:00:12 verbose #189 > > │ 00:00:24 verbose #296 > > │ 00:00:12 verbose #190 > > and Politeness = Formal | Informal | Neutral │ 00:00:24 verbose #297 > > │ 00:00:12 verbose #191 > > │ 00:00:24 verbose #298 > > │ 00:00:12 verbose #192 > > and SpeechActType = │ 00:00:24 verbose #299 > > │ 00:00:12 verbose #193 > > | Assertive | Directive | Commissive │ 00:00:24 verbose #300 > > │ 00:00:12 verbose #194 > > | Expressive | Declarative │ 00:00:24 verbose #301 > > │ 00:00:12 verbose #195 > > │ 00:00:24 verbose #302 > > │ 00:00:12 verbose #196 > > and SpeechLevelType = │ 00:00:24 verbose #303 > > │ 00:00:12 verbose #197 > > | FormalHigh | FormalLow | InformalHigh │ 00:00:24 verbose #304 > > │ 00:00:12 verbose #198 > > | InformalLow | Neutral │ 00:00:24 verbose #305 > > │ 00:00:12 verbose #199 > > │ 00:00:24 verbose #306 > > │ 00:00:12 verbose #200 > > type LinguisticFeature = │ 00:00:24 verbose #307 > > │ 00:00:12 verbose #201 > > | Phonological of PhonologicalFeature │ 00:00:24 verbose #308 > > │ 00:00:12 verbose #202 > > | Morphological of MorphologicalFeature │ 00:00:24 verbose #309 > > │ 00:00:12 verbose #203 > > | Syntactic of SyntacticFeature │ 00:00:24 verbose #310 > > │ 00:00:12 verbose #204 > > | Semantic of SemanticFeature │ 00:00:24 verbose #311 > > │ 00:00:12 verbose #205 > > | Pragmatic of PragmaticFeature │ 00:00:24 verbose #312 > > │ 00:00:12 verbose #206 > > │ 00:00:24 verbose #313 > > │ 00:00:12 verbose #207 > > type LanguageConstruct = │ 00:00:24 verbose #314 > > │ 00:00:12 verbose #208 > > | LanguageElement of LinguisticFeature │ 00:00:24 verbose #315 > > │ 00:00:12 verbose #209 > > | LanguageStructure of LanguageConstruct │ 00:00:24 verbose #316 > > │ list │ 00:00:24 verbose #317 > > │ 00:00:12 verbose #210 > > | TranslationElement of │ 00:00:24 verbose #318 > > │ TranslationFeature │ 00:00:24 verbose #319 > > │ 00:00:12 verbose #211 > > │ 00:00:24 verbose #320 > > │ 00:00:12 verbose #212 > > and TranslationFeature = │ 00:00:24 verbose #321 > > │ 00:00:12 verbose #213 > > | LinkedPhonological of │ 00:00:24 verbose #322 > > │ PhonologicalFeature * PhonologicalFeature │ 00:00:24 verbose #323 > > │ 00:00:12 verbose #214 > > | LinkedMorphological of │ 00:00:24 verbose #324 > > │ MorphologicalFeature * MorphologicalFeature │ 00:00:24 verbose #325 > > │ 00:00:12 verbose #215 > > | LinkedSyntactic of SyntacticFeature * │ 00:00:24 verbose #326 > > │ SyntacticFeature │ 00:00:24 verbose #327 > > │ 00:00:12 verbose #216 > > | LinkedSemantic of SemanticFeature * │ 00:00:24 verbose #328 > > │ SemanticFeature │ 00:00:24 verbose #329 > > │ 00:00:12 verbose #217 > > │ 00:00:24 verbose #330 > > │ 00:00:12 verbose #218 > > type Discourse = DiscourseUnit of │ 00:00:24 verbose #331 > > │ LanguageConstruct list │ 00:00:24 verbose #332 > > │ 00:00:12 verbose #219 > > │ 00:00:24 verbose #333 > > │ 00:00:12 verbose #220 > > type LanguageModel = │ 00:00:24 verbose #334 > > │ 00:00:12 verbose #221 > > | Model of discourse: Discourse │ 00:00:24 verbose #335 > > │ 00:00:13 verbose #222 > > │ 00:00:24 verbose #336 > > │ 00:00:13 verbose #223 > > ── fsharp │ 00:00:24 verbose #337 > > │ ────────────────────────────────────────────────────────────────────── │ 00:00:24 verbose #338 > > │ 00:00:13 verbose #224 > > let testEnglish = │ 00:00:24 verbose #339 > > │ 00:00:13 verbose #225 > > Model( │ 00:00:24 verbose #340 > > │ 00:00:13 verbose #226 > > DiscourseUnit [[ │ 00:00:24 verbose #341 > > │ 00:00:13 verbose #227 > > LanguageElement (Phonological │ 00:00:24 verbose #342 > > │ (ConsonantFeature (Alveolar, Nasal, │ 00:00:24 verbose #343 > > │ 00:00:13 verbose #228 > > Voiced, Some(HalfLong)))); │ 00:00:24 verbose #344 > > │ 00:00:13 verbose #229 > > LanguageElement (Phonological │ 00:00:24 verbose #345 > > │ (VowelFeature (High, Front, Unrounded, │ 00:00:24 verbose #346 > > │ 00:00:13 verbose #230 > > Some(LevelTone 1), Some(Primary), │ 00:00:24 verbose #347 > > │ Some(Short)))); │ 00:00:24 verbose #348 > > │ 00:00:13 verbose #231 > > LanguageElement (Phonological │ 00:00:24 verbose #349 > > │ (VowelFeature (Low, Front, Unrounded, │ 00:00:24 verbose #350 > > │ 00:00:13 verbose #232 > > Some(LevelTone 2), Some(Secondary), │ 00:00:24 verbose #351 > > │ Some(Long)))); │ 00:00:24 verbose #352 > > │ 00:00:13 verbose #233 > > LanguageElement (Phonological │ 00:00:24 verbose #353 > > │ (ConsonantFeature (Velar, Plosive, │ 00:00:24 verbose #354 > > │ 00:00:13 verbose #234 > > Voiceless, Some(HalfLong)))); │ 00:00:24 verbose #355 > > │ 00:00:13 verbose #235 > > LanguageElement (Morphological │ 00:00:24 verbose #356 > > │ (RootFeature "I")); │ 00:00:24 verbose #357 > > │ 00:00:13 verbose #236 > > LanguageElement (Morphological │ 00:00:24 verbose #358 > > │ (RootFeature "see")); │ 00:00:24 verbose #359 > > │ 00:00:13 verbose #237 > > LanguageElement (Morphological │ 00:00:24 verbose #360 > > │ (RootFeature "a")); │ 00:00:24 verbose #361 > > │ 00:00:13 verbose #238 > > LanguageElement (Morphological │ 00:00:24 verbose #362 > > │ (RootFeature "cat")); │ 00:00:24 verbose #363 > > │ 00:00:13 verbose #239 > > LanguageElement (Syntactic │ 00:00:24 verbose #364 > > │ (PhraseFeature (NP, [[WordFeature │ 00:00:24 verbose #365 > > │ 00:00:13 verbose #240 > > ([[RootFeature "I"]], Pronoun)]]))); │ 00:00:24 verbose #366 > > │ 00:00:13 verbose #241 > > LanguageElement (Syntactic │ 00:00:24 verbose #367 > > │ (PhraseFeature (VP, [[WordFeature │ 00:00:24 verbose #368 > > │ 00:00:13 verbose #242 > > ([[RootFeature "see"]], Verb)]]))); │ 00:00:24 verbose #369 > > │ 00:00:13 verbose #243 > > LanguageElement (Syntactic │ 00:00:24 verbose #370 > > │ (PhraseFeature (NP, [[WordFeature │ 00:00:24 verbose #371 > > │ 00:00:13 verbose #244 > > ([[RootFeature "a"; RootFeature "cat"]], │ 00:00:24 verbose #372 > > │ Noun)]]))); │ 00:00:24 verbose #373 > > │ 00:00:13 verbose #245 > > LanguageElement (Semantic │ 00:00:24 verbose #374 > > │ (Meaning "Perception act of a feline by │ 00:00:24 verbose #375 > > │ 00:00:13 verbose #246 > > the speaker")); │ 00:00:24 verbose #376 > > │ 00:00:13 verbose #247 > > LanguageElement (Pragmatic │ 00:00:24 verbose #377 > > │ (UseContext "Statement of an action being │ 00:00:24 verbose #378 > > │ 00:00:13 verbose #248 > > observed")) │ 00:00:24 verbose #379 > > │ 00:00:13 verbose #249 > > ]] │ 00:00:24 verbose #380 > > │ 00:00:13 verbose #250 > > ) │ 00:00:24 verbose #381 > > │ 00:00:13 verbose #251 > > │ 00:00:24 verbose #382 > > │ 00:00:13 verbose #252 > > let testPortuguese = │ 00:00:24 verbose #383 > > │ 00:00:13 verbose #253 > > Model( │ 00:00:24 verbose #384 > > │ 00:00:13 verbose #254 > > DiscourseUnit [[ │ 00:00:24 verbose #385 > > │ 00:00:13 verbose #255 > > LanguageElement (Phonological │ 00:00:24 verbose #386 > > │ (VowelFeature (High, Front, Unrounded, │ 00:00:24 verbose #387 > > │ 00:00:13 verbose #256 > > Some(LevelTone 1), Some(Primary), │ 00:00:24 verbose #388 > > │ Some(Short)))); │ 00:00:24 verbose #389 > > │ 00:00:13 verbose #257 > > LanguageElement (Phonological │ 00:00:24 verbose #390 > > │ (VowelFeature (Low, Front, Unrounded, │ 00:00:24 verbose #391 > > │ 00:00:13 verbose #258 > > Some(LevelTone 2), Some(Secondary), │ 00:00:24 verbose #392 > > │ Some(Long)))); │ 00:00:24 verbose #393 > > │ 00:00:13 verbose #259 > > LanguageElement (Phonological │ 00:00:24 verbose #394 > > │ (VowelFeature (Mid, Back, Rounded, │ 00:00:24 verbose #395 > > │ 00:00:13 verbose #260 > > Some(LevelTone 3), Some(Primary), │ 00:00:24 verbose #396 > > │ Some(Short)))); │ 00:00:24 verbose #397 > > │ 00:00:13 verbose #261 > > LanguageElement (Phonological │ 00:00:24 verbose #398 > > │ (ConsonantFeature (Velar, Plosive, │ 00:00:24 verbose #399 > > │ 00:00:13 verbose #262 > > Voiceless, Some(HalfLong)))); │ 00:00:24 verbose #400 > > │ 00:00:13 verbose #263 > > LanguageElement (Morphological │ 00:00:24 verbose #401 > > │ (RootFeature "Eu")); │ 00:00:24 verbose #402 > > │ 00:00:13 verbose #264 > > LanguageElement (Morphological │ 00:00:24 verbose #403 > > │ (RootFeature "ver" |> ignore; │ 00:00:24 verbose #404 > > │ 00:00:13 verbose #265 > > AffixFeature (Suffix, "o"))); │ 00:00:24 verbose #405 > > │ 00:00:13 verbose #266 > > LanguageElement (Morphological │ 00:00:24 verbose #406 > > │ (RootFeature "um")); │ 00:00:24 verbose #407 > > │ 00:00:13 verbose #267 > > LanguageElement (Morphological │ 00:00:24 verbose #408 > > │ (RootFeature "gato")); │ 00:00:24 verbose #409 > > │ 00:00:13 verbose #268 > > LanguageElement (Syntactic │ 00:00:24 verbose #410 > > │ (PhraseFeature (NP, [[WordFeature │ 00:00:24 verbose #411 > > │ 00:00:13 verbose #269 > > ([[RootFeature "Eu"]], Pronoun)]]))); │ 00:00:24 verbose #412 > > │ 00:00:13 verbose #270 > > LanguageElement (Syntactic │ 00:00:24 verbose #413 > > │ (PhraseFeature (VP, [[WordFeature │ 00:00:24 verbose #414 > > │ 00:00:13 verbose #271 > > ([[RootFeature "vejo"]], Verb)]]))); │ 00:00:24 verbose #415 > > │ 00:00:13 verbose #272 > > LanguageElement (Syntactic │ 00:00:24 verbose #416 > > │ (PhraseFeature (NP, [[WordFeature │ 00:00:24 verbose #417 > > │ 00:00:13 verbose #273 > > ([[RootFeature "um"; RootFeature "gato"]], │ 00:00:24 verbose #418 > > │ Noun)]]))); │ 00:00:24 verbose #419 > > │ 00:00:13 verbose #274 > > LanguageElement (Semantic │ 00:00:24 verbose #420 > > │ (Meaning "Ação de percepção de um felino │ 00:00:24 verbose #421 > > │ 00:00:13 verbose #275 > > pelo falante")); │ 00:00:24 verbose #422 > > │ 00:00:13 verbose #276 > > LanguageElement (Pragmatic │ 00:00:24 verbose #423 > > │ (UseContext "Declaração de uma ação sendo │ 00:00:24 verbose #424 > > │ 00:00:13 verbose #277 > > observada")) │ 00:00:24 verbose #425 > > │ 00:00:13 verbose #278 > > ]] │ 00:00:24 verbose #426 > > │ 00:00:13 verbose #279 > > ) │ 00:00:24 verbose #427 > > │ 00:00:13 verbose #280 > > │ 00:00:24 verbose #428 > > │ 00:00:13 verbose #281 > > let testKorean = │ 00:00:24 verbose #429 > > │ 00:00:13 verbose #282 > > Model( │ 00:00:24 verbose #430 > > │ 00:00:13 verbose #283 > > DiscourseUnit [[ │ 00:00:24 verbose #431 > > │ 00:00:13 verbose #284 > > LanguageElement (Phonological │ 00:00:24 verbose #432 > > │ (ConsonantFeature (Alveolar, Nasal, │ 00:00:24 verbose #433 > > │ 00:00:13 verbose #285 > > Voiced, Some(Short)))); │ 00:00:24 verbose #434 > > │ 00:00:13 verbose #286 > > LanguageElement (Phonological │ 00:00:24 verbose #435 > > │ (VowelFeature (High, Back, Rounded, │ 00:00:24 verbose #436 > > │ 00:00:13 verbose #287 > > None, None, Some(Short)))); │ 00:00:24 verbose #437 > > │ 00:00:13 verbose #288 > > LanguageElement (Phonological │ 00:00:24 verbose #438 > > │ (VowelFeature (Mid, Front, Unrounded, │ 00:00:24 verbose #439 > > │ 00:00:13 verbose #289 > > None, None, Some(Long)))); │ 00:00:24 verbose #440 > > │ 00:00:13 verbose #290 > > LanguageElement (Phonological │ 00:00:24 verbose #441 > > │ (ConsonantFeature (Bilabial, Plosive, │ 00:00:24 verbose #442 > > │ 00:00:13 verbose #291 > > Voiceless, Some(Short)))); │ 00:00:24 verbose #443 > > │ 00:00:13 verbose #292 > > LanguageElement (Morphological │ 00:00:24 verbose #444 > > │ (RootFeature "나")); │ 00:00:24 verbose #445 > > │ 00:00:13 verbose #293 > > LanguageElement (Morphological │ 00:00:24 verbose #446 > > │ (RootFeature "보다")); │ 00:00:24 verbose #447 > > │ 00:00:13 verbose #294 > > LanguageElement (Morphological │ 00:00:24 verbose #448 > > │ (AffixFeature (Suffix, "아"))); │ 00:00:24 verbose #449 > > │ 00:00:13 verbose #295 > > LanguageElement (Morphological │ 00:00:24 verbose #450 > > │ (RootFeature "고양이")); │ 00:00:24 verbose #451 > > │ 00:00:13 verbose #296 > > LanguageElement (Syntactic │ 00:00:24 verbose #452 > > │ (PhraseFeature (NP, [[WordFeature │ 00:00:24 verbose #453 > > │ 00:00:13 verbose #297 > > ([[RootFeature "나"]], Pronoun)]]))); │ 00:00:24 verbose #454 > > │ 00:00:13 verbose #298 > > LanguageElement (Syntactic │ 00:00:24 verbose #455 > > │ (PhraseFeature (VP, [[WordFeature │ 00:00:24 verbose #456 > > │ 00:00:13 verbose #299 > > ([[RootFeature "보다"; AffixFeature (Suffix, │ 00:00:24 verbose #457 > > │ "아")]], Verb)]]))); │ 00:00:24 verbose #458 > > │ 00:00:13 verbose #300 > > LanguageElement (Syntactic │ 00:00:24 verbose #459 > > │ (PhraseFeature (NP, [[WordFeature │ 00:00:24 verbose #460 > > │ 00:00:13 verbose #301 > > ([[RootFeature "고양이"]], Noun)]]))); │ 00:00:24 verbose #461 > > │ 00:00:13 verbose #302 > > LanguageElement (Semantic │ 00:00:24 verbose #462 > > │ (Meaning "화자에 의한 고양이의 관찰 │ 00:00:24 verbose #463 > > │ 00:00:13 verbose #303 > > 행위")); │ 00:00:24 verbose #464 > > │ 00:00:13 verbose #304 > > LanguageElement (Pragmatic │ 00:00:24 verbose #465 > > │ (UseContext "관찰되고 있는 행동의 진술")) │ 00:00:24 verbose #466 > > │ 00:00:13 verbose #305 > > ]] │ 00:00:24 verbose #467 > > │ 00:00:13 verbose #306 > > ) │ 00:00:24 verbose #468 > > │ 00:00:13 verbose #307 > > │ 00:00:24 verbose #469 > > │ 00:00:13 verbose #308 > > ── markdown │ 00:00:24 verbose #470 > > │ ──────────────────────────────────────────────────────────────────── │ 00:00:24 verbose #471 > > │ 00:00:13 verbose #309 > > │ 00:00:24 verbose #472 > > │ ╭─────────────────────────────────────────────────────────────────────────── │ 00:00:24 verbose #473 > > │ ───╮ │ 00:00:24 verbose #474 > > │ 00:00:13 verbose #310 > > │ ## main │ 00:00:24 verbose #475 > > │ │ │ 00:00:24 verbose #476 > > │ 00:00:13 verbose #311 > > │ 00:00:24 verbose #477 > > │ ╰─────────────────────────────────────────────────────────────────────────── │ 00:00:24 verbose #478 > > │ ───╯ │ 00:00:24 verbose #479 > > │ 00:00:13 verbose #312 > > │ 00:00:24 verbose #480 > > │ 00:00:13 verbose #313 > > ── spiral │ 00:00:24 verbose #481 > > │ ────────────────────────────────────────────────────────────────────── │ 00:00:24 verbose #482 > > │ 00:00:13 verbose #314 > > inl main (_args : array_base string) = │ 00:00:24 verbose #483 > > │ 00:00:13 verbose #315 > > 0i32 │ 00:00:24 verbose #484 > > │ 00:00:13 verbose #316 > > │ 00:00:24 verbose #485 > > │ 00:00:13 verbose #317 > > inl main () = │ 00:00:24 verbose #486 > > │ 00:00:13 verbose #318 > > $'let main args = !main args' : () │ 00:00:24 verbose #487 > > │ 00:00:13 verbose #319 > > │ 00:00:24 verbose #488 > > │ 00:00:13 verbose #320 > > ── spiral │ 00:00:24 verbose #489 > > │ ────────────────────────────────────────────────────────────────────── │ 00:00:24 verbose #490 > > │ 00:00:13 verbose #321 > > inl app () = │ 00:00:24 verbose #491 > > │ 00:00:13 verbose #322 > > "test" |> console.write_line │ 00:00:24 verbose #492 > > │ 00:00:13 verbose #323 > > 0i32 │ 00:00:24 verbose #493 > > │ 00:00:13 verbose #324 > > │ 00:00:24 verbose #494 > > │ 00:00:13 verbose #325 > > inl main () = │ 00:00:24 verbose #495 > > │ 00:00:13 verbose #326 > > print_static "<test>" │ 00:00:24 verbose #496 > > │ 00:00:13 verbose #327 > > │ 00:00:24 verbose #497 > > │ 00:00:13 verbose #328 > > app │ 00:00:24 verbose #498 > > │ 00:00:13 verbose #329 > > |> dyn │ 00:00:24 verbose #499 > > │ 00:00:13 verbose #330 > > |> ignore │ 00:00:24 verbose #500 > > │ 00:00:13 verbose #331 > > │ 00:00:24 verbose #501 > > │ 00:00:13 verbose #332 > > print_static "</test>" │ 00:00:24 verbose #502 > > │ 00:00:14 verbose #333 > 00:00:13 verbose #3 │ 00:00:24 verbose #503 > > │ runtime.execute_with_options / result / { exit_code = 0; std_trace_length = │ 00:00:24 verbose #504 > > │ 10945 } │ 00:00:24 verbose #505 > > │ 00:00:14 verbose #334 > 00:00:13 debug #4 │ 00:00:24 verbose #506 > > │ runtime.execute_with_options / { file_name = jupyter; arguments = [ │ 00:00:24 verbose #507 > > │ 00:00:14 verbose #335 > "nbconvert", │ 00:00:24 verbose #508 > > │ 00:00:14 verbose #336 > │ 00:00:24 verbose #509 > > │ "c:/home/git/polyglot/apps/spiral/temp/test/test.dib.ipynb", │ 00:00:24 verbose #510 > > │ 00:00:14 verbose #337 > "--to", │ 00:00:24 verbose #511 > > │ 00:00:14 verbose #338 > "html", │ 00:00:24 verbose #512 > > │ 00:00:14 verbose #339 > "--HTMLExporter.theme=dark", │ 00:00:24 verbose #513 > > │ 00:00:14 verbose #340 > ]; options = { command = jupyter nbconvert │ 00:00:24 verbose #514 > > │ "c:/home/git/polyglot/apps/spiral/temp/test/test.dib.ipynb" --to html │ 00:00:24 verbose #515 > > │ --HTMLExporter.theme=dark; cancellation_token = None; environment_variables │ 00:00:24 verbose #516 > > │ = Array(MutCell([])); on_line = None; stdin = None; trace = true; │ 00:00:24 verbose #517 > > │ working_directory = None } } │ 00:00:24 verbose #518 > > │ 00:00:16 verbose #341 > 00:00:15 verbose #5 ! [NbConvertApp] │ 00:00:24 verbose #519 > > │ Converting notebook │ 00:00:24 verbose #520 > > │ c:/home/git/polyglot/apps/spiral/temp/test/test.dib.ipynb to html │ 00:00:24 verbose #521 > > │ 00:00:16 verbose #342 > 00:00:15 verbose #6 ! │ 00:00:24 verbose #522 > > │ C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__ │ 00:00:24 verbose #523 > > │ .py:93: MissingIDFieldWarning: Code cell is missing an id field, this will │ 00:00:24 verbose #524 > > │ become a hard error in future nbformat versions. You may want to use │ 00:00:24 verbose #525 > > │ `normalize()` on your notebooks before validations (available since nbformat │ 00:00:24 verbose #526 > > │ 5.1.4). Previous versions of nbformat are fixing this issue transparently, │ 00:00:24 verbose #527 > > │ and will stop doing so in the future. │ 00:00:24 verbose #528 > > │ 00:00:16 verbose #343 > 00:00:15 verbose #7 ! validate(nb) │ 00:00:24 verbose #529 > > │ 00:00:18 verbose #344 > 00:00:17 verbose #8 ! [NbConvertApp] │ 00:00:24 verbose #530 > > │ Writing 318992 bytes to │ 00:00:24 verbose #531 > > │ c:\home\git\polyglot\apps\spiral\temp\test\test.dib.html │ 00:00:24 verbose #532 > > │ 00:00:19 verbose #345 > 00:00:18 verbose #9 │ 00:00:24 verbose #533 > > │ runtime.execute_with_options / result / { exit_code = 0; std_trace_length = │ 00:00:24 verbose #534 > > │ 661 } │ 00:00:24 verbose #535 > > │ 00:00:19 verbose #346 > 00:00:18 debug #10 spiral_builder.run / │ 00:00:24 verbose #536 > > │ dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 661 } │ 00:00:24 verbose #537 > > │ 00:00:19 verbose #347 > 00:00:18 debug #11 │ 00:00:24 verbose #538 > > │ runtime.execute_with_options / { file_name = pwsh; arguments = [ │ 00:00:24 verbose #539 > > │ 00:00:19 verbose #348 > "-c", │ 00:00:24 verbose #540 > > │ 00:00:19 verbose #349 > "$counter = 1; $path = │ 00:00:24 verbose #541 > > │ 'c:/home/git/polyglot/apps/spiral/temp/test/test.dib.html'; (Get-Content │ 00:00:24 verbose #542 > > │ $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value │ 00:00:24 verbose #543 > > │ + $counter++ } | Set-Content $path", │ 00:00:24 verbose #544 > > │ 00:00:19 verbose #350 > ]; options = { command = pwsh -c "$counter = 1; │ 00:00:24 verbose #545 > > │ $path = 'c:/home/git/polyglot/apps/spiral/temp/test/test.dib.html'; │ 00:00:24 verbose #546 > > │ (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { │ 00:00:24 verbose #547 > > │ $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = │ 00:00:24 verbose #548 > > │ None; environment_variables = Array(MutCell([])); on_line = None; stdin = │ 00:00:24 verbose #549 > > │ None; trace = true; working_directory = None } } │ 00:00:24 verbose #550 > > │ 00:00:19 verbose #351 > 00:00:18 verbose #12 │ 00:00:24 verbose #551 > > │ runtime.execute_with_options / result / { exit_code = 0; std_trace_length = │ 00:00:24 verbose #552 > > │ 0 } │ 00:00:24 verbose #553 > > │ 00:00:19 verbose #352 > 00:00:18 debug #13 spiral_builder.run / │ 00:00:24 verbose #554 > > │ dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } │ 00:00:24 verbose #555 > > │ 00:00:19 verbose #353 > 00:00:18 debug #14 spiral_builder.run / │ 00:00:24 verbose #556 > > │ dib / { exit_code = 0; result_length = 11665 } │ 00:00:24 verbose #557 > > │ 00:00:19 debug #354 runtime.execute_with_options_async / { exit_code │ 00:00:24 verbose #558 > > │ = 0; output_length = 15057 } │ 00:00:24 verbose #559 > > │ 00:00:19 debug #1 main / executeCommand / exitCode: 0 / command: │ 00:00:24 verbose #560 > > │ ../../../../workspace/target/release/spiral_builder.exe dib --path test.dib │ 00:00:24 verbose #561 > > │ --retries 3 │ 00:00:24 verbose #562 > > │ │ 00:00:24 verbose #563 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:24 verbose #564 > > 00:00:24 verbose #565 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:24 verbose #566 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:24 verbose #567 > > │ ### parse the .dib file into .spi format with dibparser │ 00:00:24 verbose #568 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:24 verbose #569 > > 00:00:24 verbose #570 > > ── pwsh ──────────────────────────────────────────────────────────────────────── 00:00:24 verbose #571 > > { . ../../../../apps/parser/dist/DibParser$(_exe) test.dib spi } | Invoke-Block 00:00:24 verbose #572 > > 00:00:24 verbose #573 > > ╭─[ 604.10ms - stdout ]────────────────────────────────────────────────────────╮ 00:00:24 verbose #574 > > │ 00:00:00 debug #1 writeDibCode / output: Spi / path: test.dib │ 00:00:24 verbose #575 > > │ 00:00:00 debug #2 parseDibCode / output: Spi / file: test.dib │ 00:00:24 verbose #576 > > │ │ 00:00:24 verbose #577 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:24 verbose #578 > > 00:00:24 verbose #579 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:24 verbose #580 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:24 verbose #581 > > │ ### build .fsx file from .spi using supervisor │ 00:00:24 verbose #582 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:24 verbose #583 > > 00:00:24 verbose #584 > > ── pwsh ──────────────────────────────────────────────────────────────────────── 00:00:24 verbose #585 > > { . ../../../../apps/spiral/dist/Supervisor$(_exe) --build-file test.spi 00:00:24 verbose #586 > > test.fsx } | Invoke-Block 00:00:26 verbose #587 > > 00:00:26 verbose #588 > > ╭─[ 2.10s - stdout ]───────────────────────────────────────────────────────────╮ 00:00:26 verbose #589 > > │ 00:00:00 verbose #1 async.run_with_timeout_async / { timeout = 180 } │ 00:00:26 verbose #590 > > │ 00:00:01 verbose #2 async.run_with_timeout_async / { timeout = 180 } │ 00:00:26 verbose #591 > > │ 00:00:01 debug #1 Supervisor.buildFile / takeWhileInclusive / │ 00:00:26 verbose #592 > > │ outputContent: │ 00:00:26 verbose #593 > > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: test.spi │ 00:00:26 verbose #594 > > │ 00:00:01 debug #2 Supervisor.buildFile / AsyncSeq.scan / │ 00:00:26 verbose #595 > > │ outputContent: │ 00:00:26 verbose #596 > > │ / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / │ 00:00:26 verbose #597 > > │ error: / path: test.spi │ 00:00:26 verbose #598 > > │ 00:00:01 debug #3 Supervisor.buildFile / takeWhileInclusive / │ 00:00:26 verbose #599 > > │ outputContent: │ 00:00:26 verbose #600 > > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: test.spi │ 00:00:26 verbose #601 > > │ 00:00:01 verbose #4 Supervisor.sendJson / port: 13805 / json: │ 00:00:26 verbose #602 > > │ {"FileOpen":{"spiText":"/// # test (Polyglot)\nnominal i = ()\nnominal e = │ 00:00:26 verbose #603 > > │ ()\nnominal s = │ 00:00:26 verbose #604 > > │ ()\nnomin...0022\u003C/test\u003E\u0022\n","uri":"file:///c:/home/git/polygl │ 00:00:26 verbose #605 > > │ ot/apps/spiral/temp/test/test.spi"}} / result: │ 00:00:26 verbose #606 > > │ 00:00:01 verbose #5 Supervisor.sendJson / port: 13805 / json: │ 00:00:26 verbose #607 > > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/apps/sp │ 00:00:26 verbose #608 > > │ iral/temp/test/test.spi"}} / result: │ 00:00:26 verbose #609 > > │ 00:00:01 debug #6 Supervisor.buildFile / AsyncSeq.scan / │ 00:00:26 verbose #610 > > │ outputContent: │ 00:00:26 verbose #611 > > │ let rec closure1 () () : unit = │ 00:00:26 verbose #612 > > │ let v0 : (string -> unit) = System.Console.WriteLine │ 00:00:26 verbose #613 > > │ let v1 : string = "test" │ 00:00:26 verbose #614 > > │ v0 v1 │ 00:00:26 verbose #615 > > │ and closure0 () () : i...t v0 : unit = () │ 00:00:26 verbose #616 > > │ let v1 : (unit -> unit) = closure1() │ 00:00:26 verbose #617 > > │ let v2 : unit = (fun () -> v1 (); v0) () │ 00:00:26 verbose #618 > > │ 0 │ 00:00:26 verbose #619 > > │ let v0 : (unit -> int32) = closure0() │ 00:00:26 verbose #620 > > │ () │ 00:00:26 verbose #621 > > │ / errors: [] / outputContentResult: / typeErrorCount: 0 / retry: 0 / │ 00:00:26 verbose #622 > > │ error: / path: test.spi │ 00:00:26 verbose #623 > > │ 00:00:01 debug #7 Supervisor.buildFile / takeWhileInclusive / │ 00:00:26 verbose #624 > > │ outputContent: │ 00:00:26 verbose #625 > > │ let rec closure1 () () : unit = │ 00:00:26 verbose #626 > > │ let v0 : (string -> unit) = System.Console.WriteLine │ 00:00:26 verbose #627 > > │ let v1 : string = "test" │ 00:00:26 verbose #628 > > │ v0 v1 │ 00:00:26 verbose #629 > > │ and closure0 () () : i...t v0 : unit = () │ 00:00:26 verbose #630 > > │ let v1 : (unit -> unit) = closure1() │ 00:00:26 verbose #631 > > │ let v2 : unit = (fun () -> v1 (); v0) () │ 00:00:26 verbose #632 > > │ 0 │ 00:00:26 verbose #633 > > │ let v0 : (unit -> int32) = closure0() │ 00:00:26 verbose #634 > > │ () │ 00:00:26 verbose #635 > > │ / errors: [] / typeErrorCount: 0 / retry: 0 / path: test.spi │ 00:00:26 verbose #636 > > │ 00:00:01 debug #8 FileSystem.watchWithFilter / Disposing watch stream │ 00:00:26 verbose #637 > > │ / filter: FileName, LastWrite │ 00:00:26 verbose #638 > > │ │ 00:00:26 verbose #639 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:26 verbose #640 > > 00:00:26 verbose #641 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:26 verbose #642 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:26 verbose #643 > > │ ## compile and format the project │ 00:00:26 verbose #644 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:26 verbose #645 > > 00:00:26 verbose #646 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:26 verbose #647 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:26 verbose #648 > > │ ### compile project with fable targeting optimized rust │ 00:00:26 verbose #649 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:26 verbose #650 > > 00:00:26 verbose #651 > > ── pwsh ──────────────────────────────────────────────────────────────────────── 00:00:26 verbose #652 > > dotnet fable --optimize --lang rs --extension .rs 00:00:30 verbose #653 > > 00:00:30 verbose #654 > > ╭─[ 3.57s - stdout ]───────────────────────────────────────────────────────────╮ 00:00:30 verbose #655 > > │ Fable 4.21.0: F# to Rust compiler (status: alpha) │ 00:00:30 verbose #656 > > │ │ 00:00:30 verbose #657 > > │ Thanks to the contributor! @SCullman │ 00:00:30 verbose #658 > > │ Stand with Ukraine! https://standwithukraine.com.ua/ │ 00:00:30 verbose #659 > > │ │ 00:00:30 verbose #660 > > │ Parsing test.fsproj... │ 00:00:30 verbose #661 > > │ Retrieving project options from cache, in case of issues run `dotnet fable │ 00:00:30 verbose #662 > > │ clean` or try `--noCache` option. │ 00:00:30 verbose #663 > > │ Project and references (1 source files) parsed in 245ms │ 00:00:30 verbose #664 > > │ │ 00:00:30 verbose #665 > > │ Started Fable compilation... │ 00:00:30 verbose #666 > > │ │ 00:00:30 verbose #667 > > │ Fable compilation finished in 1768ms │ 00:00:30 verbose #668 > > │ │ 00:00:30 verbose #669 > > │ .\test.fsx(11,0): (11,2) warning FABLE: For Rust, support for F# static and │ 00:00:30 verbose #670 > > │ module do bindings is disabled by default. It can be enabled with the │ 00:00:30 verbose #671 > > │ 'static_do_bindings' feature. Use at your own risk! │ 00:00:30 verbose #672 > > │ │ 00:00:30 verbose #673 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:30 verbose #674 > > 00:00:30 verbose #675 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:30 verbose #676 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:30 verbose #677 > > │ ### fix formatting issues in the .rs file using regex and set-content │ 00:00:30 verbose #678 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:30 verbose #679 > > 00:00:30 verbose #680 > > ── pwsh ──────────────────────────────────────────────────────────────────────── 00:00:30 verbose #681 > > (Get-Content test.rs) ` 00:00:30 verbose #682 > > -replace [[regex]]::Escape("),);"), "));" ` 00:00:30 verbose #683 > > | FixRust ` 00:00:30 verbose #684 > > | Set-Content test.rs 00:00:30 verbose #685 > > 00:00:30 verbose #686 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:30 verbose #687 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:30 verbose #688 > > │ ### format the rust code using cargo fmt │ 00:00:30 verbose #689 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:30 verbose #690 > > 00:00:30 verbose #691 > > ── pwsh ──────────────────────────────────────────────────────────────────────── 00:00:30 verbose #692 > > cargo fmt -- 00:00:30 verbose #693 > > 00:00:30 verbose #694 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:30 verbose #695 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:30 verbose #696 > > │ ## build and test the project │ 00:00:30 verbose #697 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:30 verbose #698 > > 00:00:30 verbose #699 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:30 verbose #700 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:30 verbose #701 > > │ ### build the project in release mode using nightly rust compiler │ 00:00:30 verbose #702 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:30 verbose #703 > > 00:00:30 verbose #704 > > ── pwsh ──────────────────────────────────────────────────────────────────────── 00:00:30 verbose #705 > > cargo build --release 00:00:52 verbose #706 > > 00:00:52 verbose #707 > > ╭─[ 21.52s - stdout ]──────────────────────────────────────────────────────────╮ 00:00:52 verbose #708 > > │ Compiling num-traits v0.2.19 │ 00:00:52 verbose #709 > > │ Compiling syn v2.0.79 │ 00:00:52 verbose #710 > > │ Compiling tempfile v3.13.0 │ 00:00:52 verbose #711 > > │ Compiling fable_library_rust v0.1.0 │ 00:00:52 verbose #712 > > │ (C:\home\git\polyglot\lib\rust\fable\fable_modules\fable-library-rust) │ 00:00:52 verbose #713 > > │ Compiling rusty-fork v0.3.0 │ 00:00:52 verbose #714 > > │ Compiling zerocopy-derive v0.7.35 │ 00:00:52 verbose #715 > > │ Compiling thiserror-impl v1.0.64 │ 00:00:52 verbose #716 > > │ Compiling zerocopy v0.7.35 │ 00:00:52 verbose #717 > > │ Compiling thiserror v1.0.64 │ 00:00:52 verbose #718 > > │ Compiling ppv-lite86 v0.2.20 │ 00:00:52 verbose #719 > > │ Compiling rand_chacha v0.3.1 │ 00:00:52 verbose #720 > > │ Compiling rand v0.8.5 │ 00:00:52 verbose #721 > > │ Compiling proptest v1.5.0 │ 00:00:52 verbose #722 > > │ Compiling spiral_temp_test v0.0.1 │ 00:00:52 verbose #723 > > │ (C:\home\git\polyglot\apps\spiral\temp\test) │ 00:00:52 verbose #724 > > │ warning: enum `Item` is never used │ 00:00:52 verbose #725 > > │ --> C:\home\git\polyglot\apps\spiral\temp\test\./main.rs:16:6 │ 00:00:52 verbose #726 > > │ | │ 00:00:52 verbose #727 > > │ 16 | enum Item { │ 00:00:52 verbose #728 > > │ | ^^^^ │ 00:00:52 verbose #729 > > │ | │ 00:00:52 verbose #730 > > │ = note: `#[warn(dead_code)]` on by default │ 00:00:52 verbose #731 > > │ │ 00:00:52 verbose #732 > > │ warning: struct `Cart` is never constructed │ 00:00:52 verbose #733 > > │ --> C:\home\git\polyglot\apps\spiral\temp\test\./main.rs:41:8 │ 00:00:52 verbose #734 > > │ | │ 00:00:52 verbose #735 > > │ 41 | struct Cart { │ 00:00:52 verbose #736 > > │ | ^^^^ │ 00:00:52 verbose #737 > > │ │ 00:00:52 verbose #738 > > │ warning: associated items `new`, `add_item`, and `remove_item` are │ 00:00:52 verbose #739 > > │ never used │ 00:00:52 verbose #740 > > │ --> C:\home\git\polyglot\apps\spiral\temp\test\./main.rs:46:8 │ 00:00:52 verbose #741 > > │ | │ 00:00:52 verbose #742 > > │ 45 | impl Cart { │ 00:00:52 verbose #743 > > │ | --------- associated items in this implementation │ 00:00:52 verbose #744 > > │ 46 | fn new() -> Cart { │ 00:00:52 verbose #745 > > │ | ^^^ │ 00:00:52 verbose #746 > > │ ... │ 00:00:52 verbose #747 > > │ 50 | fn add_item(&mut self, item: Item) { │ 00:00:52 verbose #748 > > │ | ^^^^^^^^ │ 00:00:52 verbose #749 > > │ ... │ 00:00:52 verbose #750 > > │ 56 | fn remove_item(&mut self, item: &Item) { │ 00:00:52 verbose #751 > > │ | ^^^^^^^^^^^ │ 00:00:52 verbose #752 > > │ │ 00:00:52 verbose #753 > > │ warning: function `parse_comment` is never used │ 00:00:52 verbose #754 > > │ --> C:\home\git\polyglot\apps\spiral\temp\test\./main.rs:124:4 │ 00:00:52 verbose #755 > > │ | │ 00:00:52 verbose #756 > > │ 124 | fn parse_comment(input: &str) -> IResult<&str, SpiralToken> { │ 00:00:52 verbose #757 > > │ | ^^^^^^^^^^^^^ │ 00:00:52 verbose #758 > > │ │ 00:00:52 verbose #759 > > │ warning: function `parse_string` is never used │ 00:00:52 verbose #760 > > │ --> C:\home\git\polyglot\apps\spiral\temp\test\./main.rs:130:4 │ 00:00:52 verbose #761 > > │ | │ 00:00:52 verbose #762 > > │ 130 | fn parse_string(input: &str) -> IResult<&str, SpiralToken> { │ 00:00:52 verbose #763 > > │ | ^^^^^^^^^^^^ │ 00:00:52 verbose #764 > > │ │ 00:00:52 verbose #765 > > │ warning: function `parse_identifier` is never used │ 00:00:52 verbose #766 > > │ --> C:\home\git\polyglot\apps\spiral\temp\test\./main.rs:145:4 │ 00:00:52 verbose #767 > > │ | │ 00:00:52 verbose #768 > > │ 145 | fn parse_identifier(input: &str) -> IResult<&str, SpiralToken> {[ │ 00:00:52 verbose #769 > > │ 0m │ 00:00:52 verbose #770 > > │ | ^^^^^^^^^^^^^^^^ │ 00:00:52 verbose #771 > > │ │ 00:00:52 verbose #772 > > │ warning: function `parse_integer` is never used │ 00:00:52 verbose #773 > > │ --> C:\home\git\polyglot\apps\spiral\temp\test\./main.rs:157:4 │ 00:00:52 verbose #774 > > │ | │ 00:00:52 verbose #775 > > │ 157 | fn parse_integer(input: &str) -> IResult<&str, SpiralToken> { │ 00:00:52 verbose #776 > > │ | ^^^^^^^^^^^^^ │ 00:00:52 verbose #777 > > │ │ 00:00:52 verbose #778 > > │ warning: function `parse_operator` is never used │ 00:00:52 verbose #779 > > │ --> C:\home\git\polyglot\apps\spiral\temp\test\./main.rs:165:4 │ 00:00:52 verbose #780 > > │ | │ 00:00:52 verbose #781 > > │ 165 | fn parse_operator(input: &str) -> IResult<&str, SpiralToken> { │ 00:00:52 verbose #782 > > │ | ^^^^^^^^^^^^^^ │ 00:00:52 verbose #783 > > │ │ 00:00:52 verbose #784 > > │ warning: function `parse_token` is never used │ 00:00:52 verbose #785 > > │ --> C:\home\git\polyglot\apps\spiral\temp\test\./main.rs:170:4 │ 00:00:52 verbose #786 > > │ | │ 00:00:52 verbose #787 > > │ 170 | fn parse_token(input: &str) -> IResult<&str, SpiralToken> { │ 00:00:52 verbose #788 > > │ | ^^^^^^^^^^^ │ 00:00:52 verbose #789 > > │ │ 00:00:52 verbose #790 > > │ warning: function `format_token` is never used │ 00:00:52 verbose #791 > > │ --> C:\home\git\polyglot\apps\spiral\temp\test\./main.rs:180:4 │ 00:00:52 verbose #792 > > │ | │ 00:00:52 verbose #793 > > │ 180 | fn format_token(token: &SpiralToken) -> String { │ 00:00:52 verbose #794 > > │ | ^^^^^^^^^^^^ │ 00:00:52 verbose #795 > > │ │ 00:00:52 verbose #796 > > │ warning: function `parse_expression` is never used │ 00:00:52 verbose #797 > > │ --> C:\home\git\polyglot\apps\spiral\temp\test\./main.rs:201:4 │ 00:00:52 verbose #798 > > │ | │ 00:00:52 verbose #799 > > │ 201 | fn parse_expression(input: &str) -> IResult<&str, SpiralToken> {[ │ 00:00:52 verbose #800 > > │ 0m │ 00:00:52 verbose #801 > > │ | ^^^^^^^^^^^^^^^^ │ 00:00:52 verbose #802 > > │ │ 00:00:52 verbose #803 > > │ warning: `spiral_temp_test` (bin "spiral_temp_test") generated 11 │ 00:00:52 verbose #804 > > │ warnings │ 00:00:52 verbose #805 > > │ Finished `release` profile [optimized] target(s) in 21.39s │ 00:00:52 verbose #806 > > │ │ 00:00:52 verbose #807 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:52 verbose #808 > > 00:00:52 verbose #809 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:00:52 verbose #810 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:00:52 verbose #811 > > │ ### run release tests with output enabled │ 00:00:52 verbose #812 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:52 verbose #813 > > 00:00:52 verbose #814 > > ── pwsh ──────────────────────────────────────────────────────────────────────── 00:00:52 verbose #815 > > { cargo test --release -- --show-output } | Invoke-Block 00:01:27 verbose #816 > > 00:01:27 verbose #817 > > ╭─[ 34.84s - stdout ]──────────────────────────────────────────────────────────╮ 00:01:27 verbose #818 > > │ Compiling num-traits v0.2.19 │ 00:01:27 verbose #819 > > │ Compiling zerocopy v0.7.35 │ 00:01:27 verbose #820 > > │ Compiling tempfile v3.13.0 │ 00:01:27 verbose #821 > > │ Compiling thiserror v1.0.64 │ 00:01:27 verbose #822 > > │ Compiling fable_library_rust v0.1.0 │ 00:01:27 verbose #823 > > │ (C:\home\git\polyglot\lib\rust\fable\fable_modules\fable-library-rust) │ 00:01:27 verbose #824 > > │ Compiling rusty-fork v0.3.0 │ 00:01:27 verbose #825 > > │ Compiling ppv-lite86 v0.2.20 │ 00:01:27 verbose #826 > > │ Compiling rand_chacha v0.3.1 │ 00:01:27 verbose #827 > > │ Compiling rand v0.8.5 │ 00:01:27 verbose #828 > > │ Compiling proptest v1.5.0 │ 00:01:27 verbose #829 > > │ Compiling spiral_temp_test v0.0.1 │ 00:01:27 verbose #830 > > │ (C:\home\git\polyglot\apps\spiral\temp\test) │ 00:01:27 verbose #831 > > │ Finished `release` profile [optimized] target(s) in 34.50s │ 00:01:27 verbose #832 > > │ Running unittests main.rs │ 00:01:27 verbose #833 > > │ (C:\home\git\polyglot\workspace\target\release\deps\spiral_temp_test-2319fdb │ 00:01:27 verbose #834 > > │ 638494cd4.exe) │ 00:01:27 verbose #835 > > │ │ 00:01:27 verbose #836 > > │ running 3 tests │ 00:01:27 verbose #837 > > │ test test_parse_number ... ok │ 00:01:27 verbose #838 > > │ test prop_parse_format_idempotent ... ok │ 00:01:27 verbose #839 > > │ test │ 00:01:27 verbose #840 > > │ adding_and_then_removing_an_item_from_the_cart_leaves_the_cart_unchanged ... │ 00:01:27 verbose #841 > > │ ok │ 00:01:27 verbose #842 > > │ │ 00:01:27 verbose #843 > > │ successes: │ 00:01:27 verbose #844 > > │ │ 00:01:27 verbose #845 > > │ ---- prop_parse_format_idempotent stdout ---- │ 00:01:27 verbose #846 > > │ input=StringLiteral("=~e5&gQC{$:&~Xi`/M>") │ 00:01:27 verbose #847 > > │ input=Comment("?v`") │ 00:01:27 verbose #848 > > │ input=Operator("(") │ 00:01:27 verbose #849 > > │ input=Operator("=") │ 00:01:27 verbose #850 > > │ input=Operator("=") │ 00:01:27 verbose #851 > > │ input=Comment("V/d\"'[S*u#2>jG~*\\py{\"$*A") │ 00:01:27 verbose #852 > > │ input=Integer(-2614551947139262190) │ 00:01:27 verbose #853 > > │ input=StringLiteral("iS'.5G@33#:<<Px`/'.xd%k?2G`z=") │ 00:01:27 verbose #854 > > │ input=StringLiteral("${0VqiwP&4YHm3G") │ 00:01:27 verbose #855 > > │ input=Identifier("z8A2J57g") │ 00:01:27 verbose #856 > > │ input=Operator("/") │ 00:01:27 verbose #857 > > │ input=Operator("=") │ 00:01:27 verbose #858 > > │ input=Integer(4559753761783966075) │ 00:01:27 verbose #859 > > │ input=Identifier("PC4cVzES8Kt5UB7q7") │ 00:01:27 verbose #860 > > │ input=Integer(-4950133827967717209) │ 00:01:27 verbose #861 > > │ input=Comment("%H['u_L\\Z$%el/?Mo'G2*") │ 00:01:27 verbose #862 > > │ input=StringLiteral("SZGs2`Shb<&Hp$W'd:=ck7=4VcH?BN") │ 00:01:27 verbose #863 > > │ input=Comment("") │ 00:01:27 verbose #864 > > │ input=Operator("=") │ 00:01:27 verbose #865 > > │ input=StringLiteral("JA0:F&ig.*XM{b88gEz") │ 00:01:27 verbose #866 > > │ input=Comment("lz8ng\":") │ 00:01:27 verbose #867 > > │ input=Identifier("XGoqRXsgdDOro56hM") │ 00:01:27 verbose #868 > > │ input=Comment("I") │ 00:01:27 verbose #869 > > │ input=Operator("=") │ 00:01:27 verbose #870 > > │ input=Identifier("EAwFxZWXjw") │ 00:01:27 verbose #871 > > │ input=Operator(")") │ 00:01:27 verbose #872 > > │ input=Integer(-5748546423747915494) │ 00:01:27 verbose #873 > > │ input=Comment("(1FN{:/>") │ 00:01:27 verbose #874 > > │ input=StringLiteral("(=x<f^8g*`_c&{:`yNO=") │ 00:01:27 verbose #875 > > │ input=Identifier("T2HNTof61ww4zYcGsPD6KiEN") │ 00:01:27 verbose #876 > > │ input=Identifier("zO39brHOCjRHOOsli1") │ 00:01:27 verbose #877 > > │ input=Identifier("WSHxBzsTlEBEW595hU") │ 00:01:27 verbose #878 > > │ input=Identifier("l0nPm4gtYIzBaq7") │ 00:01:27 verbose #879 > > │ input=StringLiteral("d~,*c8f0L@oq<]P^<&9FJ") │ 00:01:27 verbose #880 > > │ input=Operator("(") │ 00:01:27 verbose #881 > > │ input=Operator("+") │ 00:01:27 verbose #882 > > │ input=Comment("") │ 00:01:27 verbose #883 > > │ input=Integer(7460866107477116573) │ 00:01:27 verbose #884 > > │ input=Comment("'.a") │ 00:01:27 verbose #885 > > │ input=Comment("?%\\X\\y&(.|U\\@%=P&S\\8k*>:w<qMV") │ 00:01:27 verbose #886 > > │ input=Identifier("L") │ 00:01:27 verbose #887 > > │ input=StringLiteral("&|{j:%") │ 00:01:27 verbose #888 > > │ input=Operator("+") │ 00:01:27 verbose #889 > > │ input=StringLiteral("`/7F)#4HBr=/") │ 00:01:27 verbose #890 > > │ input=Comment("V \"X") │ 00:01:27 verbose #891 > > │ input=Identifier("iW68afUSlyQ6S") │ 00:01:27 verbose #892 > > │ input=StringLiteral("/<&KZ:e<") │ 00:01:27 verbose #893 > > │ input=Integer(6019178467799178997) │ 00:01:27 verbose #894 > > │ input=Comment("y\">M.regSq&uY") │ 00:01:27 verbose #895 > > │ input=Comment("[fVV") │ 00:01:27 verbose #896 > > │ input=Integer(1164192109734165160) │ 00:01:27 verbose #897 > > │ input=Operator("-") │ 00:01:27 verbose #898 > > │ input=Operator(")") │ 00:01:27 verbose #899 > > │ input=Comment("k{QZCl") │ 00:01:27 verbose #900 > > │ input=Comment("\"#=g#") │ 00:01:27 verbose #901 > > │ input=Comment("w`R{Y{'g8roGeM{!bk3F`E{Hg`") │ 00:01:27 verbose #902 > > │ input=Comment("l6` h8 HI2T+.@ O%70''") │ 00:01:27 verbose #903 > > │ input=Integer(-4160536319153816774) │ 00:01:27 verbose #904 > > │ input=Identifier("w") │ 00:01:27 verbose #905 > > │ input=Comment("r%?K\"2s\"%7") │ 00:01:27 verbose #906 > > │ input=StringLiteral("&q<>2Uh(|") │ 00:01:27 verbose #907 > > │ input=Integer(-2411081391129810582) │ 00:01:27 verbose #908 > > │ input=StringLiteral("`'<C!9W&qbJyh<j&1ua)U$3Z}1") │ 00:01:27 verbose #909 > > │ input=Comment("=)<&`p{$`:]oG0`\"'A\\Myk+W") │ 00:01:27 verbose #910 > > │ input=StringLiteral("XQK2:7=#sPA-=") │ 00:01:27 verbose #911 > > │ input=StringLiteral("{.A?[&GM9n.MzQ/B=04") │ 00:01:27 verbose #912 > > │ input=StringLiteral("Mb%") │ 00:01:27 verbose #913 > > │ input=Comment("sS[oa/`S$&a)t") │ 00:01:27 verbose #914 > > │ input=Identifier("qO") │ 00:01:27 verbose #915 > > │ input=Integer(-1316144149013588467) │ 00:01:27 verbose #916 > > │ input=Identifier("EbU1Tp") │ 00:01:27 verbose #917 > > │ input=Operator("-") │ 00:01:27 verbose #918 > > │ input=Operator("*") │ 00:01:27 verbose #919 > > │ input=Identifier("uqAWZDK93B0") │ 00:01:27 verbose #920 > > │ input=Integer(3474256110420904959) │ 00:01:27 verbose #921 > > │ input=StringLiteral("s.Y?wov:{S_Lb/-% e,{-5/=d-H") │ 00:01:27 verbose #922 > > │ input=StringLiteral("H)&7@*d{/o<..'<*z%{.+?5Lm5/b") │ 00:01:27 verbose #923 > > │ input=Operator("+") │ 00:01:27 verbose #924 > > │ input=Identifier("f2GR9su7u0nAwWrJ2") │ 00:01:27 verbose #925 > > │ input=Operator("/") │ 00:01:27 verbose #926 > > │ input=Comment("[4y='C\"w]!m'Z$I0\"\".8\\9DtSuY*@") │ 00:01:27 verbose #927 > > │ input=Identifier("qkUym3CpFWeuzZ6BVTI") │ 00:01:27 verbose #928 > > │ input=Identifier("QTc93EqXij2") │ 00:01:27 verbose #929 > > │ input=Comment("V!=6n*/m.-tftIg oO*m$.^mtDXU`.!") │ 00:01:27 verbose #930 > > │ input=Integer(-3826197581629676217) │ 00:01:27 verbose #931 > > │ input=Operator("=") │ 00:01:27 verbose #932 > > │ input=Comment(":I!iY*AZ$UeK;{t'WfRh\\vo*k$ &") │ 00:01:27 verbose #933 > > │ input=Comment("=2X*_?\"=4.=hBp*N%AEJ&apZ'") │ 00:01:27 verbose #934 > > │ input=Identifier("Y3FunrDQAAjIiIXoyuj6EFesvV72lXT3") │ 00:01:27 verbose #935 > > │ input=Comment("?c<>x{vu3*r<YjOiD'g^*\"0-kn") │ 00:01:27 verbose #936 > > │ input=Integer(-9015460493957763435) │ 00:01:27 verbose #937 > > │ input=Operator("/") │ 00:01:27 verbose #938 > > │ input=StringLiteral("=UH]LCbYJU|yHv=$(=") │ 00:01:27 verbose #939 > > │ input=Integer(630934884385723973) │ 00:01:27 verbose #940 > > │ input=StringLiteral("v-") │ 00:01:27 verbose #941 > > │ input=Integer(6749753200400657488) │ 00:01:27 verbose #942 > > │ input=Comment("dMQ_4!8y/'fW!%h^'*G: /Sf<t2jz=") │ 00:01:27 verbose #943 > > │ input=Integer(-1574683534613398517) │ 00:01:27 verbose #944 > > │ input=StringLiteral("m;J~&?k<&E_v<iZNxC?$19g") │ 00:01:27 verbose #945 > > │ input=Integer(1789339923437807807) │ 00:01:27 verbose #946 > > │ input=Comment("8a){'9I'?xiM:'#.{/&!g") │ 00:01:27 verbose #947 > > │ input=Identifier("sicYDV38BLcNi8") │ 00:01:27 verbose #948 > > │ input=StringLiteral("=") │ 00:01:27 verbose #949 > > │ input=Integer(-1219000567329043954) │ 00:01:27 verbose #950 > > │ input=Identifier("AGt7uryMBM") │ 00:01:27 verbose #951 > > │ input=Operator(")") │ 00:01:27 verbose #952 > > │ input=Comment("%I9!!1!v@`8@O.7-? &'Xuv$`z:|%") │ 00:01:27 verbose #953 > > │ input=Comment("FU%.]9APz)'") │ 00:01:27 verbose #954 > > │ input=Comment("(L.zx :\"") │ 00:01:27 verbose #955 > > │ input=StringLiteral("jxKKmXXwI?Vr") │ 00:01:27 verbose #956 > > │ input=StringLiteral("A'@ AV3to") │ 00:01:27 verbose #957 > > │ input=Operator("*") │ 00:01:27 verbose #958 > > │ input=Comment(">x?") │ 00:01:27 verbose #959 > > │ input=Integer(2880889025117111703) │ 00:01:27 verbose #960 > > │ input=Operator("+") │ 00:01:27 verbose #961 > > │ input=StringLiteral(",:&.:m5m-*{*o.fS{{<]%%o6A1?") │ 00:01:27 verbose #962 > > │ input=Operator("/") │ 00:01:27 verbose #963 > > │ input=StringLiteral(";?pvL0Xx'$*_MR'%:%Cpd%=") │ 00:01:27 verbose #964 > > │ input=Operator("(") │ 00:01:27 verbose #965 > > │ input=Identifier("U8F3KXGH3IHvzK5Bv19DQ13S39Wflis") │ 00:01:27 verbose #966 > > │ input=Comment("") │ 00:01:27 verbose #967 > > │ input=Operator("*") │ 00:01:27 verbose #968 > > │ input=StringLiteral("3`kW$/y&&-6H'c~=^A1%ADJo'Z{BFl/") │ 00:01:27 verbose #969 > > │ input=Comment("\"6`{_'SD?XP\\&HbC1") │ 00:01:27 verbose #970 > > │ input=StringLiteral("%.`+Q'yo((`=s`bsgm&MON=`+00E") │ 00:01:27 verbose #971 > > │ input=StringLiteral("") │ 00:01:27 verbose #972 > > │ input=Identifier("XzUr7Ko7Mu119EQl81d6M") │ 00:01:27 verbose #973 > > │ input=Operator("+") │ 00:01:27 verbose #974 > > │ input=Comment(".m86UpnsVo:d%2S:/).,P[];:{g=(O6h") │ 00:01:27 verbose #975 > > │ input=Operator("*") │ 00:01:27 verbose #976 > > │ input=StringLiteral("MXKh%u8%") │ 00:01:27 verbose #977 > > │ input=Operator(")") │ 00:01:27 verbose #978 > > │ input=Operator("(") │ 00:01:27 verbose #979 > > │ input=Operator("-") │ 00:01:27 verbose #980 > > │ input=Operator("*") │ 00:01:27 verbose #981 > > │ input=Identifier("INKfYW") │ 00:01:27 verbose #982 > > │ input=Comment("c\\XjhyL=xR2=Cvxr[$,$x:?") │ 00:01:27 verbose #983 > > │ input=Comment(",46=XH\\e;R[/\\") │ 00:01:27 verbose #984 > > │ input=Comment("uF/m!wR<e?*A>*O-") │ 00:01:27 verbose #985 > > │ input=Comment("7(sb<,``%YVNU/`O\"-=r") │ 00:01:27 verbose #986 > > │ input=Integer(-5060777255128230097) │ 00:01:27 verbose #987 > > │ input=Operator("*") │ 00:01:27 verbose #988 > > │ input=StringLiteral("B{.`:])w?y.{.aQX ~'Qx~'") │ 00:01:27 verbose #989 > > │ input=Integer(8072481853346259690) │ 00:01:27 verbose #990 > > │ input=Identifier("r4Fl") │ 00:01:27 verbose #991 > > │ input=StringLiteral("~+2Hz..?/@#%nQWYj") │ 00:01:27 verbose #992 > > │ input=Integer(-7522318769314440309) │ 00:01:27 verbose #993 > > │ input=Identifier("gZreFI5ZPOsEE1rljX") │ 00:01:27 verbose #994 > > │ input=Identifier("gheZpEt2IEp2") │ 00:01:27 verbose #995 > > │ input=Identifier("lRqduMkCR2") │ 00:01:27 verbose #996 > > │ input=Identifier("K437n0JB") │ 00:01:27 verbose #997 > > │ input=StringLiteral("7Fo_FPoBM") │ 00:01:27 verbose #998 > > │ input=StringLiteral("q*e<:&$") │ 00:01:27 verbose #999 > > │ input=StringLiteral("B//O,%u`O<K^b%*?[h:-R<A") │ 00:01:27 verbose #1000 > > │ input=Operator("-") │ 00:01:27 verbose #1001 > > │ input=StringLiteral("gb{xL=#4F66") │ 00:01:27 verbose #1002 > > │ input=Identifier("X60gEo2i2gF4mrwY511Um8WyI") │ 00:01:27 verbose #1003 > > │ input=Integer(-853888179989877613) │ 00:01:27 verbose #1004 > > │ input=Operator("+") │ 00:01:27 verbose #1005 > > │ input=StringLiteral("`oh|)Y%*?1ayr{[3mK") │ 00:01:27 verbose #1006 > > │ input=Integer(-1325127424734449447) │ 00:01:27 verbose #1007 > > │ input=StringLiteral("_") │ 00:01:27 verbose #1008 > > │ input=Comment("9_`~{<=VRD9ULN!|;o<[") │ 00:01:27 verbose #1009 > > │ input=Identifier("K8oSa") │ 00:01:27 verbose #1010 > > │ input=Operator(")") │ 00:01:27 verbose #1011 > > │ input=StringLiteral("t`o**'f}f;") │ 00:01:27 verbose #1012 > > │ input=Operator(")") │ 00:01:27 verbose #1013 > > │ input=Identifier("O0I00lGJzF6mHD0z7JWTAdIL1h48") │ 00:01:27 verbose #1014 > > │ input=Identifier("v6B5TSqkqcG3jH8") │ 00:01:27 verbose #1015 > > │ input=Integer(9090866006466423313) │ 00:01:27 verbose #1016 > > │ input=Operator(")") │ 00:01:27 verbose #1017 > > │ input=Operator("+") │ 00:01:27 verbose #1018 > > │ input=Comment("n,cu~ezhH%Ck") │ 00:01:27 verbose #1019 > > │ input=Comment("&nKK:$p*\\s{\"%iv.6n") │ 00:01:27 verbose #1020 > > │ input=Comment("c0#") │ 00:01:27 verbose #1021 > > │ input=Integer(-8349835345144837732) │ 00:01:27 verbose #1022 > > │ input=StringLiteral("'}x {,D^x(6&)~N%>j5$") │ 00:01:27 verbose #1023 > > │ input=Identifier("Q3Wsw917V46ooQskV9pT") │ 00:01:27 verbose #1024 > > │ input=Identifier("Gmb949HRtOWm8liJ") │ 00:01:27 verbose #1025 > > │ input=Identifier("L4") │ 00:01:27 verbose #1026 > > │ input=Identifier("DCc1lKwanQmKwpuBY7frUC8dtgq9CF2s") │ 00:01:27 verbose #1027 > > │ input=Identifier("QNVCaH4tA0QTLa2") │ 00:01:27 verbose #1028 > > │ input=Operator("+") │ 00:01:27 verbose #1029 > > │ input=StringLiteral("Pgs$WM==") │ 00:01:27 verbose #1030 > > │ input=Integer(-2835643876026904990) │ 00:01:27 verbose #1031 > > │ input=StringLiteral("=8cPjL+=mo") │ 00:01:27 verbose #1032 > > │ input=Identifier("XLYCg6FEeIb0b") │ 00:01:27 verbose #1033 > > │ input=StringLiteral("scUQtgd`={{x*wq&") │ 00:01:27 verbose #1034 > > │ input=Operator("-") │ 00:01:27 verbose #1035 > > │ input=Operator(")") │ 00:01:27 verbose #1036 > > │ input=Identifier("ldNSP4GAOa3wxpvGzL9") │ 00:01:27 verbose #1037 > > │ input=StringLiteral(",^%fvm") │ 00:01:27 verbose #1038 > > │ input=Identifier("E7n6hobamGJRrTRMVFxtfvQtY0R") │ 00:01:27 verbose #1039 > > │ input=Operator(")") │ 00:01:27 verbose #1040 > > │ input=StringLiteral("MFbDP$Vkn>#") │ 00:01:27 verbose #1041 > > │ input=Comment("^'IW_N*&ulIg`%|r\\aU\\l<%%_=") │ 00:01:27 verbose #1042 > > │ input=Operator("(") │ 00:01:27 verbose #1043 > > │ input=Identifier("MDlYHCo") │ 00:01:27 verbose #1044 > > │ input=Identifier("O00V3kuf2271Cs5zT2O8lEWCr33f") │ 00:01:27 verbose #1045 > > │ input=StringLiteral("%SE") │ 00:01:27 verbose #1046 > > │ input=Operator("*") │ 00:01:27 verbose #1047 > > │ input=Integer(-2973393038856623570) │ 00:01:27 verbose #1048 > > │ input=Comment("`L\\6d") │ 00:01:27 verbose #1049 > > │ input=StringLiteral("e$kSj?N") │ 00:01:27 verbose #1050 > > │ input=Integer(2029758553073024489) │ 00:01:27 verbose #1051 > > │ input=Comment("eK?<=Lo3|G") │ 00:01:27 verbose #1052 > > │ input=Operator("/") │ 00:01:27 verbose #1053 > > │ input=Integer(-7732681687241087715) │ 00:01:27 verbose #1054 > > │ input=Identifier("DT6") │ 00:01:27 verbose #1055 > > │ input=Integer(-9180610584010165335) │ 00:01:27 verbose #1056 > > │ input=Operator("*") │ 00:01:27 verbose #1057 > > │ input=Comment("5R$al.Z") │ 00:01:27 verbose #1058 > > │ input=Integer(-5432132643376505961) │ 00:01:27 verbose #1059 > > │ input=StringLiteral("&N?*bQ~BHE]!k*>$$rQb(-SK|*K/") │ 00:01:27 verbose #1060 > > │ input=Identifier("e") │ 00:01:27 verbose #1061 > > │ input=Comment("B\\Gd!") │ 00:01:27 verbose #1062 > > │ input=Integer(-3629375722722897004) │ 00:01:27 verbose #1063 > > │ input=StringLiteral(".") │ 00:01:27 verbose #1064 > > │ input=StringLiteral("YJe*+hO^") │ 00:01:27 verbose #1065 > > │ input=StringLiteral("p1Kj&%o@`=b*af&j.") │ 00:01:27 verbose #1066 > > │ input=Operator(")") │ 00:01:27 verbose #1067 > > │ input=Operator("*") │ 00:01:27 verbose #1068 > > │ input=Operator("*") │ 00:01:27 verbose #1069 > > │ input=StringLiteral("Q2") │ 00:01:27 verbose #1070 > > │ input=Operator("=") │ 00:01:27 verbose #1071 > > │ input=Comment("\\?q3\"{fU#") │ 00:01:27 verbose #1072 > > │ input=Operator("/") │ 00:01:27 verbose #1073 > > │ input=Comment("`-\"$U`=V:[[UqU).M}JS%.0=(") │ 00:01:27 verbose #1074 > > │ input=Comment("t?Y_K%mBSw$3[!d.>pT3F{b") │ 00:01:27 verbose #1075 > > │ input=Identifier("PcJEWVhw1a1P5") │ 00:01:27 verbose #1076 > > │ input=Identifier("b") │ 00:01:27 verbose #1077 > > │ input=Comment("~Yn?bJ{/N.J?E/J\\t&+\"!") │ 00:01:27 verbose #1078 > > │ input=Identifier("IjoYnYaX30wkbWy49Z") │ 00:01:27 verbose #1079 > > │ input=Comment(":\"v\\/|4%VJ") │ 00:01:27 verbose #1080 > > │ input=StringLiteral("XV$:IWAT@5x8jy^ZqU7h {$..aQ") │ 00:01:27 verbose #1081 > > │ input=Identifier("N") │ 00:01:27 verbose #1082 > > │ input=Operator("(") │ 00:01:27 verbose #1083 > > │ input=Comment("kM7VL.\\:H{s1g%7S@[O\"dS") │ 00:01:27 verbose #1084 > > │ input=Identifier("DBq255yi777h77AKhQ5jN9S") │ 00:01:27 verbose #1085 > > │ input=Comment("D(.`/t||d)sk/AN`:") │ 00:01:27 verbose #1086 > > │ input=Comment("$4cu-'K\\;.>~[I(<pB:et|1={") │ 00:01:27 verbose #1087 > > │ input=Integer(-3918065396524734157) │ 00:01:27 verbose #1088 > > │ input=Comment("$\\Nf<9t$-#~Jg.sq'{e':") │ 00:01:27 verbose #1089 > > │ input=StringLiteral("d{`x`Nfs!%>.u") │ 00:01:27 verbose #1090 > > │ input=Integer(9063846151608040798) │ 00:01:27 verbose #1091 > > │ input=Integer(-2683256993673411279) │ 00:01:27 verbose #1092 > > │ input=Comment(":hc?:R:Z7+5\\Nm.6S,Bd*rP") │ 00:01:27 verbose #1093 > > │ input=Comment("/?x_'^0i\"%`%^Y${k[oH=03eT.") │ 00:01:27 verbose #1094 > > │ input=Comment("!M%=<C{vua'r") │ 00:01:27 verbose #1095 > > │ input=Integer(-4111684129491701759) │ 00:01:27 verbose #1096 > > │ input=Operator("*") │ 00:01:27 verbose #1097 > > │ input=StringLiteral("4k:$:H- {ggRpGr]u4'}j/F`?") │ 00:01:27 verbose #1098 > > │ input=Identifier("E97CZX4Dtrjy") │ 00:01:27 verbose #1099 > > │ input=Integer(2205553649033044567) │ 00:01:27 verbose #1100 > > │ input=Integer(2674530972027003247) │ 00:01:27 verbose #1101 > > │ input=Comment("D$<'.sc'#yb'f\"Pz3(5}-dSh0{?b*w*T") │ 00:01:27 verbose #1102 > > │ │ 00:01:27 verbose #1103 > > │ │ 00:01:27 verbose #1104 > > │ successes: │ 00:01:27 verbose #1105 > > │ adding_and_then_removing_an_item_from_the_cart_leaves_the_cart_unchanged │ 00:01:27 verbose #1106 > > │ prop_parse_format_idempotent │ 00:01:27 verbose #1107 > > │ test_parse_number │ 00:01:27 verbose #1108 > > │ │ 00:01:27 verbose #1109 > > │ test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; │ 00:01:27 verbose #1110 > > │ finished in 0.18s │ 00:01:27 verbose #1111 > > │ │ 00:01:27 verbose #1112 > > │ │ 00:01:27 verbose #1113 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:27 verbose #1114 > > 00:01:27 verbose #1115 > > ── markdown ──────────────────────────────────────────────────────────────────── 00:01:27 verbose #1116 > > ╭──────────────────────────────────────────────────────────────────────────────╮ 00:01:27 verbose #1117 > > │ ### execute the binary in release mode │ 00:01:27 verbose #1118 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:27 verbose #1119 > > 00:01:27 verbose #1120 > > ── pwsh ──────────────────────────────────────────────────────────────────────── 00:01:27 verbose #1121 > > { . $ScriptDir/../../../../workspace/target/release/spiral_temp_test$(_exe) } | 00:01:27 verbose #1122 > > Invoke-Block 00:01:27 verbose #1123 > > 00:01:27 verbose #1124 > > ╭─[ 24.99ms - stdout ]─────────────────────────────────────────────────────────╮ 00:01:27 verbose #1125 > > │ app=test │ 00:01:27 verbose #1126 > > │ │ 00:01:27 verbose #1127 > > ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:27 verbose #1128 > 00:01:26 verbose #3 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 88775 } 00:01:27 verbose #1129 > 00:01:26 debug #4 runtime.execute_with_options / { file_name = jupyter; arguments = [ 00:01:27 verbose #1130 > "nbconvert", 00:01:27 verbose #1131 > "c:/home/git/polyglot/apps/spiral/temp/test/build.dib.ipynb", 00:01:27 verbose #1132 > "--to", 00:01:27 verbose #1133 > "html", 00:01:27 verbose #1134 > "--HTMLExporter.theme=dark", 00:01:27 verbose #1135 > ]; options = { command = jupyter nbconvert "c:/home/git/polyglot/apps/spiral/temp/test/build.dib.ipynb" --to html --HTMLExporter.theme=dark; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:01:29 verbose #1136 > 00:01:28 verbose #5 ! [NbConvertApp] Converting notebook c:/home/git/polyglot/apps/spiral/temp/test/build.dib.ipynb to html 00:01:29 verbose #1137 > 00:01:28 verbose #6 ! C:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future. 00:01:29 verbose #1138 > 00:01:28 verbose #7 ! validate(nb) 00:01:30 verbose #1139 > 00:01:29 verbose #8 ! [NbConvertApp] Writing 357891 bytes to c:\home\git\polyglot\apps\spiral\temp\test\build.dib.html 00:01:31 verbose #1140 > 00:01:29 verbose #9 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 663 } 00:01:31 verbose #1141 > 00:01:29 debug #10 spiral_builder.run / dib / jupyter nbconvert / { exit_code = 0; jupyter_result_length = 663 } 00:01:31 verbose #1142 > 00:01:29 debug #11 runtime.execute_with_options / { file_name = pwsh; arguments = [ 00:01:31 verbose #1143 > "-c", 00:01:31 verbose #1144 > "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/temp/test/build.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path", 00:01:31 verbose #1145 > ]; options = { command = pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/temp/test/build.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"; cancellation_token = None; environment_variables = Array(MutCell([])); on_line = None; stdin = None; trace = true; working_directory = None } } 00:01:31 verbose #1146 > 00:01:30 verbose #12 runtime.execute_with_options / result / { exit_code = 0; std_trace_length = 0 } 00:01:31 verbose #1147 > 00:01:30 debug #13 spiral_builder.run / dib / html cell ids / { exit_code = 0; pwsh_replace_html_result_length = 0 } 00:01:31 verbose #1148 > 00:01:30 debug #14 spiral_builder.run / dib / { exit_code = 0; result_length = 89497 } 00:01:31 debug #1149 runtime.execute_with_options_async / { exit_code = 0; output_length = 94470 } 00:01:31 debug #1 main / executeCommand / exitCode: 0 / command: ../../../../workspace/target/release/spiral_builder.exe dib --path build.dib
In [ ]:
{ pwsh ../apps/spiral/vscode/build.ps1 } | Invoke-Block
bun install v1.1.7 (b0b7db5c) Checked 203 installs across 191 packages (no changes) [203.00ms] Symlink already exists: C:\home\git\polyglot\apps\spiral\vscode\LICENSE -> C:\home\git\polyglot\LICENSE out\src\extension.js 2.4kb out\media\cellOutputScrollButtons.js 1.9kb ⚡ Done in 8ms DONE Packaged: out\spiral-vscode-0.0.1.vsix (26 files, 98.15KB)
In [ ]:
{ pwsh ../apps/ipfs/build.ps1 } | Invoke-Block
bun install v1.1.7 (b0b7db5c)
Done! Checked 220 packages (no changes) [187.00ms]
In [ ]:
{ pwsh ./outdated.ps1 } | Invoke-Block
Paket version 8.1.0-alpha004+7aa412f49b32de979c3d5acde07e88e6d47c965b
Resolving dependency graph...
Outdated packages found:
Group: Main
* Expecto 10.2.1 -> 11.0.0-alpha2
* Expecto.FsCheck 10.2.1-fscheck3 -> 11.0.0-alpha2-fscheck2
* FsCheck 3.0.0-rc3 -> 2.16.6
* FSharp.Core 8.0.300-beta.24080.5 -> 9.0.100-beta.24422.2
* Microsoft.AspNetCore.Connections.Abstractions 7.0 -> 9.0.0-rc.1.24452.1
* Microsoft.AspNetCore.Http.Connections.Client 7.0 -> 9.0.0-rc.1.24452.1
* Microsoft.AspNetCore.Http.Connections.Common 7.0 -> 9.0.0-rc.1.24452.1
* Microsoft.AspNetCore.SignalR.Client 7.0 -> 9.0.0-rc.1.24452.1
* Microsoft.AspNetCore.SignalR.Client.Core 7.0 -> 9.0.0-rc.1.24452.1
* Microsoft.AspNetCore.SignalR.Common 7.0 -> 9.0.0-rc.1.24452.1
* Microsoft.AspNetCore.SignalR.Protocols.Json 7.0 -> 9.0.0-rc.1.24452.1
* Microsoft.Extensions.DependencyInjection 8.0 -> 9.0.0-rc.1.24431.7
* Microsoft.Extensions.DependencyInjection.Abstractions 8.0.1 -> 9.0.0-rc.1.24431.7
* Microsoft.Extensions.Features 7.0 -> 9.0.0-rc.1.24452.1
* Microsoft.Extensions.Logging 8.0 -> 9.0.0-rc.1.24431.7
* Microsoft.Extensions.Logging.Abstractions 8.0.1 -> 9.0.0-rc.1.24431.7
* Microsoft.Extensions.Options 8.0.2 -> 9.0.0-rc.1.24431.7
* Microsoft.Extensions.Primitives 8.0 -> 9.0.0-rc.1.24431.7
* System.CodeDom 8.0 -> 9.0.0-rc.1.24431.7
* System.Management 7.0 -> 9.0.0-rc.1.24431.7
* System.Threading.Channels 8.0 -> 9.0.0-rc.1.24431.7
Total time taken: 59 seconds
CheckToml / toml: C:\home\git\polyglot\workspace\Cargo.toml
chat_contract_tests
================
Name Project Compat Latest Kind Platform
---- ------- ------ ------ ---- --------
ahash 0.7.8 0.8.11 0.8.11 Normal ---
android-tzdata 0.1.1 Removed --- Normal cfg(target_os = "android")
android_system_properties 0.1.5 Removed --- Normal cfg(target_os = "android")
autocfg 1.4.0 Removed --- Build ---
autocfg 1.4.0 Removed Removed Build ---
bumpalo 3.16.0 Removed --- Normal ---
bumpalo 3.16.0 Removed Removed Normal ---
cc 1.1.22 Removed --- Build ---
cfg-if 1.0.0 Removed --- Normal ---
cfg-if 1.0.0 Removed Removed Normal ---
chrono 0.4.38 Removed --- Normal ---
core-foundation-sys 0.8.7 Removed --- Normal cfg(any(target_os = "macos", target_os = "ios"))
getrandom 0.2.15 Removed Removed Normal cfg(any(target_os = "linux", target_os = "android", target_os = "windows", target_os = "macos", target_os = "ios", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd", target_os = "dragonfly", target_os = "solaris", target_os = "illumos", target_os = "fuchsia", target_os = "redox", target_os = "cloudabi", target_os = "haiku", target_os = "vxworks", target_os = "emscripten", target_os = "wasi"))
hashbrown 0.12.3 0.14.5 0.14.5 Normal ---
iana-time-zone 0.1.61 Removed --- Normal cfg(unix)
iana-time-zone-haiku 0.1.2 Removed --- Normal cfg(target_os = "haiku")
indexmap 1.9.3 2.5.0 2.5.0 Normal ---
jobserver 0.1.32 Removed --- Normal ---
js-sys 0.3.70 Removed --- Normal cfg(all(target_arch = "wasm32", not(any(target_os = "emscripten", target_os = "wasi"))))
js-sys 0.3.70 Removed --- Normal cfg(all(target_arch = "wasm32", target_os = "unknown"))
js-sys 0.3.70 Removed Removed Normal cfg(all(any(target_arch = "wasm32", target_arch = "wasm64"), target_os = "unknown"))
libc 0.2.159 Removed --- Normal ---
libc 0.2.159 Removed --- Normal cfg(unix)
libc 0.2.159 Removed Removed Normal cfg(unix)
libm 0.2.8 Removed --- Normal ---
log 0.4.22 Removed --- Normal ---
log 0.4.22 Removed Removed Normal ---
near-sandbox-utils 0.8.0 0.9.0 --- Build ---
near-sandbox-utils 0.9.0 --- 0.8.0 Normal ---
num-traits 0.2.19 Removed --- Normal ---
once_cell 1.19.0 Removed --- Normal ---
once_cell 1.19.0 Removed Removed Normal ---
proc-macro2 1.0.86 Removed --- Normal ---
proc-macro2 1.0.86 Removed Removed Normal ---
quote 1.0.37 Removed --- Normal ---
quote 1.0.37 Removed Removed Normal ---
serde 1.0.210 Removed --- Normal ---
serde_derive 1.0.210 Removed --- Normal ---
shlex 1.3.0 Removed --- Normal ---
syn 2.0.79 Removed --- Normal ---
syn 2.0.79 Removed Removed Normal ---
unicode-ident 1.0.13 Removed --- Normal ---
unicode-ident 1.0.13 Removed Removed Normal ---
wasi 0.11.0+wasi-snapshot-preview1 Removed Removed Normal cfg(target_os = "wasi")
wasm-bindgen 0.2.93 Removed --- Normal ---
wasm-bindgen 0.2.93 Removed --- Normal cfg(all(target_arch = "wasm32", not(any(target_os = "emscripten", target_os = "wasi"))))
wasm-bindgen 0.2.93 Removed --- Normal cfg(all(target_arch = "wasm32", target_os = "unknown"))
wasm-bindgen 0.2.93 Removed Removed Normal ---
wasm-bindgen 0.2.93 Removed Removed Normal cfg(all(any(target_arch = "wasm32", target_arch = "wasm64"), target_os = "unknown"))
wasm-bindgen-backend 0.2.93 Removed --- Normal ---
wasm-bindgen-backend 0.2.93 Removed Removed Normal ---
wasm-bindgen-macro 0.2.93 Removed --- Normal ---
wasm-bindgen-macro 0.2.93 Removed Removed Normal ---
wasm-bindgen-macro-support 0.2.93 Removed --- Normal ---
wasm-bindgen-macro-support 0.2.93 Removed Removed Normal ---
wasm-bindgen-shared 0.2.93 Removed --- Normal ---
wasm-bindgen-shared 0.2.93 Removed Removed Normal ---
windows-core 0.52.0 Removed --- Normal cfg(target_os = "windows")
windows-targets 0.52.6 Removed --- Normal ---
windows-targets 0.52.6 Removed --- Normal cfg(windows)
windows_aarch64_gnullvm 0.52.6 Removed --- Normal aarch64-pc-windows-gnullvm
windows_aarch64_msvc 0.52.6 Removed --- Normal cfg(all(target_arch = "aarch64", target_env = "msvc", not(windows_raw_dylib)))
windows_i686_gnu 0.52.6 Removed --- Normal cfg(all(target_arch = "x86", target_env = "gnu", not(target_abi = "llvm"), not(windows_raw_dylib)))
windows_i686_gnullvm 0.52.6 Removed --- Normal i686-pc-windows-gnullvm
windows_i686_msvc 0.52.6 Removed --- Normal cfg(all(target_arch = "x86", target_env = "msvc", not(windows_raw_dylib)))
windows_x86_64_gnu 0.52.6 Removed --- Normal cfg(all(target_arch = "x86_64", target_env = "gnu", not(target_abi = "llvm"), not(windows_raw_dylib)))
windows_x86_64_gnullvm 0.52.6 Removed --- Normal x86_64-pc-windows-gnullvm
windows_x86_64_msvc 0.52.6 Removed --- Normal cfg(all(any(target_arch = "x86_64", target_arch = "arm64ec"), target_env = "msvc", not(windows_raw_dylib)))
spiral_wasm
================
Name Project Compat Latest Kind Platform
---- ------- ------ ------ ---- --------
ahash 0.7.8 0.8.11 0.8.11 Normal ---
android-tzdata 0.1.1 Removed --- Normal cfg(target_os = "android")
android_system_properties 0.1.5 Removed --- Normal cfg(target_os = "android")
autocfg 1.4.0 Removed --- Build ---
autocfg 1.4.0 Removed Removed Build ---
bumpalo 3.16.0 Removed --- Normal ---
bumpalo 3.16.0 Removed Removed Normal ---
cc 1.1.22 Removed --- Build ---
cfg-if 1.0.0 Removed --- Normal ---
cfg-if 1.0.0 Removed Removed Normal ---
chrono 0.4.38 Removed --- Normal ---
core-foundation-sys 0.8.7 Removed --- Normal cfg(any(target_os = "macos", target_os = "ios"))
getrandom 0.2.15 Removed Removed Normal cfg(any(target_os = "linux", target_os = "android", target_os = "windows", target_os = "macos", target_os = "ios", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd", target_os = "dragonfly", target_os = "solaris", target_os = "illumos", target_os = "fuchsia", target_os = "redox", target_os = "cloudabi", target_os = "haiku", target_os = "vxworks", target_os = "emscripten", target_os = "wasi"))
hashbrown 0.12.3 0.14.5 0.14.5 Normal ---
iana-time-zone 0.1.61 Removed --- Normal cfg(unix)
iana-time-zone-haiku 0.1.2 Removed --- Normal cfg(target_os = "haiku")
indexmap 1.9.3 2.5.0 2.5.0 Normal ---
jobserver 0.1.32 Removed --- Normal ---
js-sys 0.3.70 Removed --- Normal cfg(all(target_arch = "wasm32", not(any(target_os = "emscripten", target_os = "wasi"))))
js-sys 0.3.70 Removed --- Normal cfg(all(target_arch = "wasm32", target_os = "unknown"))
js-sys 0.3.70 Removed Removed Normal cfg(all(any(target_arch = "wasm32", target_arch = "wasm64"), target_os = "unknown"))
libc 0.2.159 Removed --- Normal ---
libc 0.2.159 Removed --- Normal cfg(unix)
libc 0.2.159 Removed Removed Normal cfg(unix)
libm 0.2.8 Removed --- Normal ---
log 0.4.22 Removed --- Normal ---
log 0.4.22 Removed Removed Normal ---
near-sandbox-utils 0.8.0 0.9.0 --- Build ---
near-sandbox-utils 0.9.0 --- 0.8.0 Normal ---
num-traits 0.2.19 Removed --- Normal ---
once_cell 1.19.0 Removed --- Normal ---
once_cell 1.19.0 Removed Removed Normal ---
proc-macro2 1.0.86 Removed --- Normal ---
proc-macro2 1.0.86 Removed Removed Normal ---
quote 1.0.37 Removed --- Normal ---
quote 1.0.37 Removed Removed Normal ---
serde 1.0.210 Removed --- Normal ---
serde_derive 1.0.210 Removed --- Normal ---
shlex 1.3.0 Removed --- Normal ---
syn 2.0.79 Removed --- Normal ---
syn 2.0.79 Removed Removed Normal ---
unicode-ident 1.0.13 Removed --- Normal ---
unicode-ident 1.0.13 Removed Removed Normal ---
wasi 0.11.0+wasi-snapshot-preview1 Removed Removed Normal cfg(target_os = "wasi")
wasm-bindgen 0.2.93 Removed --- Normal ---
wasm-bindgen 0.2.93 Removed --- Normal cfg(all(target_arch = "wasm32", not(any(target_os = "emscripten", target_os = "wasi"))))
wasm-bindgen 0.2.93 Removed --- Normal cfg(all(target_arch = "wasm32", target_os = "unknown"))
wasm-bindgen 0.2.93 Removed Removed Normal ---
wasm-bindgen 0.2.93 Removed Removed Normal cfg(all(any(target_arch = "wasm32", target_arch = "wasm64"), target_os = "unknown"))
wasm-bindgen-backend 0.2.93 Removed --- Normal ---
wasm-bindgen-backend 0.2.93 Removed Removed Normal ---
wasm-bindgen-macro 0.2.93 Removed --- Normal ---
wasm-bindgen-macro 0.2.93 Removed Removed Normal ---
wasm-bindgen-macro-support 0.2.93 Removed --- Normal ---
wasm-bindgen-macro-support 0.2.93 Removed Removed Normal ---
wasm-bindgen-shared 0.2.93 Removed --- Normal ---
wasm-bindgen-shared 0.2.93 Removed Removed Normal ---
windows-core 0.52.0 Removed --- Normal cfg(target_os = "windows")
windows-targets 0.52.6 Removed --- Normal ---
windows-targets 0.52.6 Removed --- Normal cfg(windows)
windows_aarch64_gnullvm 0.52.6 Removed --- Normal aarch64-pc-windows-gnullvm
windows_aarch64_msvc 0.52.6 Removed --- Normal cfg(all(target_arch = "aarch64", target_env = "msvc", not(windows_raw_dylib)))
windows_i686_gnu 0.52.6 Removed --- Normal cfg(all(target_arch = "x86", target_env = "gnu", not(target_abi = "llvm"), not(windows_raw_dylib)))
windows_i686_gnullvm 0.52.6 Removed --- Normal i686-pc-windows-gnullvm
windows_i686_msvc 0.52.6 Removed --- Normal cfg(all(target_arch = "x86", target_env = "msvc", not(windows_raw_dylib)))
windows_x86_64_gnu 0.52.6 Removed --- Normal cfg(all(target_arch = "x86_64", target_env = "gnu", not(target_abi = "llvm"), not(windows_raw_dylib)))
windows_x86_64_gnullvm 0.52.6 Removed --- Normal x86_64-pc-windows-gnullvm
windows_x86_64_msvc 0.52.6 Removed --- Normal cfg(all(any(target_arch = "x86_64", target_arch = "arm64ec"), target_env = "msvc", not(windows_raw_dylib)))
CheckToml / toml: C:\home\git\polyglot\apps\chat\contract\Cargo.toml
All dependencies are up to date, yay!
CheckToml / toml: C:\home\git\polyglot\apps\chat\contract\tests\Cargo.toml
Name Project Compat Latest Kind Platform
---- ------- ------ ------ ---- --------
ahash->cfg-if 1.0.0 --- Removed Normal ---
ahash->getrandom 0.2.15 Removed --- Normal cfg(any(target_os = "linux", target_os = "android", target_os = "windows", target_os = "macos", target_os = "ios", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd", target_os = "dragonfly", target_os = "solaris", target_os = "illumos", target_os = "fuchsia", target_os = "redox", target_os = "cloudabi", target_os = "haiku", target_os = "vxworks", target_os = "emscripten", target_os = "wasi"))
ahash->zerocopy 0.7.35 --- Removed Normal ---
android_system_properties->libc 0.2.159 Removed Removed Normal ---
cc->jobserver 0.1.32 Removed Removed Normal ---
cc->libc 0.2.159 Removed Removed Normal cfg(unix)
cc->shlex 1.3.0 Removed Removed Normal ---
chrono->android-tzdata 0.1.1 Removed Removed Normal cfg(target_os = "android")
chrono->iana-time-zone 0.1.61 Removed Removed Normal cfg(unix)
chrono->js-sys 0.3.70 Removed Removed Normal cfg(all(target_arch = "wasm32", not(any(target_os = "emscripten", target_os = "wasi"))))
chrono->num-traits 0.2.19 Removed Removed Normal ---
chrono->serde 1.0.210 Removed Removed Normal ---
chrono->wasm-bindgen 0.2.93 Removed Removed Normal cfg(all(target_arch = "wasm32", not(any(target_os = "emscripten", target_os = "wasi"))))
chrono->windows-targets 0.52.6 Removed Removed Normal cfg(windows)
getrandom->cfg-if 1.0.0 Removed --- Normal ---
getrandom->js-sys 0.3.70 Removed --- Normal cfg(all(any(target_arch = "wasm32", target_arch = "wasm64"), target_os = "unknown"))
getrandom->libc 0.2.159 Removed --- Normal cfg(unix)
getrandom->wasi 0.11.0+wasi-snapshot-preview1 Removed --- Normal cfg(target_os = "wasi")
getrandom->wasm-bindgen 0.2.93 Removed --- Normal cfg(all(any(target_arch = "wasm32", target_arch = "wasm64"), target_os = "unknown"))
hashbrown->ahash 0.7.8 0.8.11 --- Normal ---
hashbrown->ahash 0.8.11 --- 0.7.8 Normal ---
hashbrown->serde 1.0.210 --- Removed Normal ---
iana-time-zone->android_system_properties 0.1.5 Removed Removed Normal cfg(target_os = "android")
iana-time-zone->core-foundation-sys 0.8.7 Removed Removed Normal cfg(any(target_os = "macos", target_os = "ios"))
iana-time-zone->iana-time-zone-haiku 0.1.2 Removed Removed Normal cfg(target_os = "haiku")
iana-time-zone->js-sys 0.3.70 Removed Removed Normal cfg(all(target_arch = "wasm32", target_os = "unknown"))
iana-time-zone->wasm-bindgen 0.2.93 Removed Removed Normal cfg(all(target_arch = "wasm32", target_os = "unknown"))
iana-time-zone->windows-core 0.52.0 Removed Removed Normal cfg(target_os = "windows")
iana-time-zone-haiku->cc 1.1.22 Removed Removed Build ---
indexmap->autocfg 1.4.0 Removed --- Build ---
indexmap->equivalent 1.0.1 --- Removed Normal ---
indexmap->hashbrown 0.12.3 0.14.5 --- Normal ---
indexmap->hashbrown 0.14.5 --- 0.12.3 Normal ---
jobserver->libc 0.2.159 Removed Removed Normal cfg(unix)
js-sys->wasm-bindgen 0.2.93 Removed --- Normal ---
js-sys->wasm-bindgen 0.2.93 Removed Removed Normal ---
near-sandbox-utils->chrono 0.4.38 Removed Removed Normal ---
near-workspaces->near-sandbox-utils 0.8.0 0.9.0 0.9.0 Build ---
num-traits->autocfg 1.4.0 Removed Removed Build ---
num-traits->libm 0.2.8 Removed Removed Normal ---
proc-macro2->unicode-ident 1.0.13 --- Removed Normal ---
proc-macro2->unicode-ident 1.0.13 Removed --- Normal ---
proc-macro2->unicode-ident 1.0.13 Removed Removed Normal ---
quote->proc-macro2 1.0.86 --- Removed Normal ---
quote->proc-macro2 1.0.86 Removed --- Normal ---
quote->proc-macro2 1.0.86 Removed Removed Normal ---
serde->serde_derive 1.0.210 --- Removed Normal ---
serde->serde_derive 1.0.210 Removed Removed Normal ---
serde_derive->proc-macro2 1.0.86 --- Removed Normal ---
serde_derive->proc-macro2 1.0.86 Removed Removed Normal ---
serde_derive->quote 1.0.37 --- Removed Normal ---
serde_derive->quote 1.0.37 Removed Removed Normal ---
serde_derive->syn 2.0.79 --- Removed Normal ---
serde_derive->syn 2.0.79 Removed Removed Normal ---
serde_with->indexmap 1.9.3 2.5.0 --- Normal ---
serde_with->indexmap 2.5.0 --- 1.9.3 Normal ---
syn->proc-macro2 1.0.86 --- Removed Normal ---
syn->proc-macro2 1.0.86 Removed --- Normal ---
syn->proc-macro2 1.0.86 Removed Removed Normal ---
syn->quote 1.0.37 --- Removed Normal ---
syn->quote 1.0.37 Removed --- Normal ---
syn->quote 1.0.37 Removed Removed Normal ---
syn->unicode-ident 1.0.13 --- Removed Normal ---
syn->unicode-ident 1.0.13 Removed --- Normal ---
syn->unicode-ident 1.0.13 Removed Removed Normal ---
wasm-bindgen->cfg-if 1.0.0 Removed --- Normal ---
wasm-bindgen->cfg-if 1.0.0 Removed Removed Normal ---
wasm-bindgen->once_cell 1.19.0 Removed --- Normal ---
wasm-bindgen->once_cell 1.19.0 Removed Removed Normal ---
wasm-bindgen->wasm-bindgen-macro 0.2.93 Removed --- Normal ---
wasm-bindgen->wasm-bindgen-macro 0.2.93 Removed Removed Normal ---
wasm-bindgen-backend->bumpalo 3.16.0 Removed --- Normal ---
wasm-bindgen-backend->bumpalo 3.16.0 Removed Removed Normal ---
wasm-bindgen-backend->log 0.4.22 Removed --- Normal ---
wasm-bindgen-backend->log 0.4.22 Removed Removed Normal ---
wasm-bindgen-backend->once_cell 1.19.0 Removed --- Normal ---
wasm-bindgen-backend->once_cell 1.19.0 Removed Removed Normal ---
wasm-bindgen-backend->proc-macro2 1.0.86 Removed --- Normal ---
wasm-bindgen-backend->proc-macro2 1.0.86 Removed Removed Normal ---
wasm-bindgen-backend->quote 1.0.37 Removed --- Normal ---
wasm-bindgen-backend->quote 1.0.37 Removed Removed Normal ---
wasm-bindgen-backend->syn 2.0.79 Removed --- Normal ---
wasm-bindgen-backend->syn 2.0.79 Removed Removed Normal ---
wasm-bindgen-backend->wasm-bindgen-shared 0.2.93 Removed --- Normal ---
wasm-bindgen-backend->wasm-bindgen-shared 0.2.93 Removed Removed Normal ---
wasm-bindgen-macro->quote 1.0.37 Removed --- Normal ---
wasm-bindgen-macro->quote 1.0.37 Removed Removed Normal ---
wasm-bindgen-macro->wasm-bindgen-macro-support 0.2.93 Removed --- Normal ---
wasm-bindgen-macro->wasm-bindgen-macro-support 0.2.93 Removed Removed Normal ---
wasm-bindgen-macro-support->proc-macro2 1.0.86 Removed --- Normal ---
wasm-bindgen-macro-support->proc-macro2 1.0.86 Removed Removed Normal ---
wasm-bindgen-macro-support->quote 1.0.37 Removed --- Normal ---
wasm-bindgen-macro-support->quote 1.0.37 Removed Removed Normal ---
wasm-bindgen-macro-support->syn 2.0.79 Removed --- Normal ---
wasm-bindgen-macro-support->syn 2.0.79 Removed Removed Normal ---
wasm-bindgen-macro-support->wasm-bindgen-backend 0.2.93 Removed --- Normal ---
wasm-bindgen-macro-support->wasm-bindgen-backend 0.2.93 Removed Removed Normal ---
wasm-bindgen-macro-support->wasm-bindgen-shared 0.2.93 Removed --- Normal ---
wasm-bindgen-macro-support->wasm-bindgen-shared 0.2.93 Removed Removed Normal ---
windows-core->windows-targets 0.52.6 Removed Removed Normal ---
windows-targets->windows_aarch64_gnullvm 0.52.6 Removed Removed Normal aarch64-pc-windows-gnullvm
windows-targets->windows_aarch64_msvc 0.52.6 Removed Removed Normal cfg(all(target_arch = "aarch64", target_env = "msvc", not(windows_raw_dylib)))
windows-targets->windows_i686_gnu 0.52.6 Removed Removed Normal cfg(all(target_arch = "x86", target_env = "gnu", not(target_abi = "llvm"), not(windows_raw_dylib)))
windows-targets->windows_i686_gnullvm 0.52.6 Removed Removed Normal i686-pc-windows-gnullvm
windows-targets->windows_i686_msvc 0.52.6 Removed Removed Normal cfg(all(target_arch = "x86", target_env = "msvc", not(windows_raw_dylib)))
windows-targets->windows_x86_64_gnu 0.52.6 Removed Removed Normal cfg(all(target_arch = "x86_64", target_env = "gnu", not(target_abi = "llvm"), not(windows_raw_dylib)))
windows-targets->windows_x86_64_gnullvm 0.52.6 Removed Removed Normal x86_64-pc-windows-gnullvm
windows-targets->windows_x86_64_msvc 0.52.6 Removed Removed Normal cfg(all(any(target_arch = "x86_64", target_arch = "arm64ec"), target_env = "msvc", not(windows_raw_dylib)))
zerocopy->byteorder 1.5.0 --- Removed Normal ---
zerocopy->zerocopy-derive 0.7.35 --- Removed Normal ---
zerocopy-derive->proc-macro2 1.0.86 --- Removed Normal ---
zerocopy-derive->quote 1.0.37 --- Removed Normal ---
zerocopy-derive->syn 2.0.79 --- Removed Normal ---
CheckToml / toml: C:\home\git\polyglot\apps\plot\Cargo.toml
All dependencies are up to date, yay!
CheckJson / json: C:/home/git/polyglot
$ npm-check-updates --target greatest
Using bun
Checking C:\home\git\polyglot\package.json
CheckJson / json: C:/home/git/polyglot/apps/ipfs
$ npm-check-updates --target greatest
Using bun
Checking C:\home\git\polyglot\apps\ipfs\package.json
CheckJson / json: C:/home/git/polyglot/apps/spiral/temp/extension
$ npm-check-updates --target greatest
Using bun
Checking C:\home\git\polyglot\apps\spiral\temp\extension\package.json
CheckJson / json: C:/home/git/polyglot/apps/spiral/vscode
$ npm-check-updates --target greatest
Using bun
Checking C:\home\git\polyglot\apps\spiral\vscode\package.json
CheckJson / json: C:/home/git/polyglot/deps/The-Spiral-Language/VS Code Plugin
$ npm-check-updates --target greatest
Checking C:\home\git\polyglot\deps\The-Spiral-Language\VS Code Plugin\package.json